37722-vm/test_v5_8.php
Flatlogic Bot 40250521e3 Newest ok
2026-01-24 14:49:16 +00:00

34 lines
1.2 KiB
PHP

<?php
$code = "\nprint(\"Hyperion V5.8 Test\")\nmsg = \"Instruction Folding is active\"\nprint(msg)\ncopy = msg\nprint(copy)\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' => $code]));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
if ($data && $data['success']) {
$protectedCode = $data['protected_code'];
file_put_contents('protected_v5_8.lua', $protectedCode);
echo "Successfully protected code. Saved to protected_v5_8.lua\n";
echo "Stats: " . json_encode($data['stats']) . "\n";
// Test the protected code
$output = shell_exec('lua protected_v5_8.lua 2>&1');
echo "\nExecution output:\n";
echo $output;
if (strpos($output, 'Hyperion V5.8 Test') !== false &&
strpos($output, 'Instruction Folding is active') !== false) {
echo "\nVerification: SUCCESS\n";
} else {
echo "\nVerification: FAILED\n";
}
} else {
echo "Error: " . ($data['error'] ?? 'Unknown error') . "\n";
echo "Raw response: " . $response . "\n";
}