37722-vm/test_v6_0.php
2026-01-24 15:25:45 +00:00

24 lines
1.0 KiB
PHP

<?php
$code = '\nprint("Hyperion V6.0 Test")\nlocal x = 100\nlocal y = 200\nlocal z = x + y\nprint("Sum is:", z)\n\nfunction nested(a) \n print("Nested call with:", a)\n if a > 0 then\n nested(a - 1)\n end\nend\n\nnested(3)\nprint("Finished")\n';
$payload = json_encode(['code' => $code]);
$ch = curl_init('http://localhost/process.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
$res = json_decode($response, true);
if ($res && $res['success']) {
$protected_code = $res['protected_code'];
file_put_contents('protected_v6_0.lua', $protected_code);
echo "Obfuscation successful. Output saved to protected_v6_0.lua\n";
echo "Stats: " . json_encode($res['stats']) . "\n";
} else {
echo "Obfuscation failed: " . ($res['error'] ?? 'Unknown error') . "\n";
echo "Response: " . $response . "\n";
}