46 lines
1.3 KiB
PHP
46 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* Test script for Luartex V3.2
|
|
*/
|
|
|
|
$test_code = "
|
|
local x = 10
|
|
local y = 20
|
|
local z = x + y
|
|
print('The sum of x and y is: ' .. tostring(z))
|
|
local myTable = {}
|
|
myTable['secret'] = 'LuartexV3.2'
|
|
print('Secret retrieved: ' .. myTable['secret'])
|
|
";
|
|
|
|
echo "Testing Luartex V3.2 Protection...\n";
|
|
|
|
$ch = curl_init('http://localhost/process.php');
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
curl_setopt($ch, CURLOPT_POST, true);
|
|
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['code' => $test_code]));
|
|
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
|
|
|
|
$response = curl_exec($ch);
|
|
$data = json_decode($response, true);
|
|
|
|
if ($data && $data['success']) {
|
|
echo "SUCCESS: Obfuscation completed.\n";
|
|
echo "Stats: " . json_encode($data['stats']) . "\n";
|
|
$protected_file = 'protected_v3_2.lua';
|
|
file_put_contents($protected_file, $data['protected_code']);
|
|
echo "Protected code saved to $protected_file\n";
|
|
|
|
// Check if the watermark is present
|
|
if (strpos($data['protected_code'], 'Luartex V3.2 | https://discord.gg/GpucUKeCtF') !== false) {
|
|
echo "VERIFIED: Watermark present.\n";
|
|
} else {
|
|
echo "FAILED: Watermark missing!\n";
|
|
}
|
|
} else {
|
|
echo "FAILED: " . ($data['error'] ?? 'Unknown error') . "\n";
|
|
}
|
|
|
|
curl_close($ch);
|
|
|