49 lines
1.4 KiB
PHP
49 lines
1.4 KiB
PHP
<?php
|
|
$code = '
|
|
print("Luartex Hyperion V8.0 Test")
|
|
local message = "Roblox Executor Compatibility Layer"
|
|
print(message)
|
|
|
|
function calculate(a, b)
|
|
local result = a * b + 50
|
|
return result
|
|
end
|
|
|
|
local val = calculate(10, 5)
|
|
print("Calculation Result:", val)
|
|
|
|
local x = 123.456
|
|
print("Floating point test:", x)
|
|
|
|
print("Finished Test")
|
|
';
|
|
|
|
$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_v8_0.lua', $protected_code);
|
|
echo "Obfuscation successful. Output saved to protected_v8_0.lua\n";
|
|
echo "Stats: " . json_encode($res['stats']) . "\n";
|
|
|
|
// Quick syntax check using php if lua is not available,
|
|
// but better to just confirm the file exists and has content.
|
|
if (strlen($protected_code) > 1000) {
|
|
echo "Protected code looks valid (size: " . strlen($protected_code) . " bytes)\n";
|
|
}
|
|
} else {
|
|
echo "Obfuscation failed: " . ($res['error'] ?? 'Unknown error') . "\n";
|
|
echo "Response: " . $response . "\n";
|
|
}
|
|
|