The newest coolest version
This commit is contained in:
parent
40250521e3
commit
aba65e04e2
216
process.php
216
process.php
@ -14,7 +14,7 @@ if (!$input || empty($input['code'])) {
|
||||
|
||||
$code = $input['code'];
|
||||
|
||||
class LuartexHyperionV5 {
|
||||
class LuartexHyperionV6_2 {
|
||||
private $rawCode;
|
||||
private $constants = [];
|
||||
private $instructions = [];
|
||||
@ -38,7 +38,8 @@ class LuartexHyperionV5 {
|
||||
'JMP', 'EQ', 'LT', 'LE', 'RETURN', 'GETTABLE', 'SETTABLE', 'NEWTABLE',
|
||||
'CLOSURE', 'VARARG', 'FORPREP', 'FORLOOP', 'AND', 'OR', 'NOT', 'LEN',
|
||||
'TFORLOOP', 'SETLIST', 'CLOSE', 'JUNK1', 'JUNK2', 'JUNK3', 'OPAQUE',
|
||||
'SET_GLOBAL_CONST', 'MOVE_GLOBAL', 'CALL_GLOBAL_K', 'CALL_GLOBAL_V'
|
||||
'SET_GLOBAL_CONST', 'MOVE_GLOBAL', 'CALL_GLOBAL_K', 'CALL_GLOBAL_V',
|
||||
'RECURSIVE_CALL', 'TAMPER_CHECK', 'LAYER_ENTER', 'STACK_SHUFFLE'
|
||||
];
|
||||
shuffle($ops);
|
||||
foreach ($ops as $op) {
|
||||
@ -46,11 +47,54 @@ class LuartexHyperionV5 {
|
||||
}
|
||||
}
|
||||
|
||||
private function genVar($len = 16) {
|
||||
$chars = 'l1Ii_';
|
||||
$res = 'L_';
|
||||
for($i=0; $i<$len; $i++) $res .= $chars[rand(0, 4)];
|
||||
return $res;
|
||||
private function genVar($len = 24) {
|
||||
$sets = [
|
||||
'l1Ii', 'O0Q', 'uvvw', 'nmM', 'il1I', 'oO0Q',
|
||||
'S5s', 'Z2z', 'B8b', 'g9q', '01OI'
|
||||
];
|
||||
$res = '_';
|
||||
for($i=0; $i<$len; $i++) {
|
||||
$set = $sets[array_rand($sets)];
|
||||
$res .= $set[rand(0, strlen($set)-1)];
|
||||
}
|
||||
return $res . bin2hex(random_bytes(3));
|
||||
}
|
||||
|
||||
private function numToLuaExpr($n, $depth = 0) {
|
||||
if (!is_numeric($n)) return $n;
|
||||
$n = (float)$n;
|
||||
|
||||
if ($depth > 3) return $n;
|
||||
|
||||
$ops = ['+', '-', '*', 'xor', 'math'];
|
||||
$op = $ops[array_rand($ops)];
|
||||
|
||||
switch($op) {
|
||||
case '+':
|
||||
$v1 = rand(1, 10000) / 10;
|
||||
$v2 = $n - $v1;
|
||||
return "(" . $this->numToLuaExpr($v1, $depth + 1) . " + " . $this->numToLuaExpr($v2, $depth + 1) . ")";
|
||||
case '-':
|
||||
$v1 = rand((int)$n + 1, (int)$n + 10000) / 10;
|
||||
$v2 = $v1 - $n;
|
||||
return "(" . $this->numToLuaExpr($v1, $depth + 1) . " - " . $this->numToLuaExpr($v2, $depth + 1) . ")";
|
||||
case '*':
|
||||
if ($n == 0) return "(0 * " . rand(1, 100) . ")";
|
||||
for ($v1 = 2; $v1 <= 8; $v1++) {
|
||||
if ($n != 0 && fmod($n, $v1) == 0) {
|
||||
$v2 = $n / $v1;
|
||||
return "(" . $this->numToLuaExpr($v1, $depth + 1) . " * " . $this->numToLuaExpr($v2, $depth + 1) . ")";
|
||||
}
|
||||
}
|
||||
return "(" . $this->numToLuaExpr($n - 1, $depth + 1) . " + 1)";
|
||||
case 'xor':
|
||||
$v1 = rand(1, 65535);
|
||||
$v2 = (int)$n ^ $v1;
|
||||
return "bit32.bxor(" . $this->numToLuaExpr($v1, $depth + 1) . ", " . $this->numToLuaExpr($v2, $depth + 1) . ")";
|
||||
case 'math':
|
||||
return "(math.abs(" . $this->numToLuaExpr($n, $depth + 1) . "))";
|
||||
}
|
||||
return $n;
|
||||
}
|
||||
|
||||
private function addConst($val) {
|
||||
@ -71,7 +115,10 @@ class LuartexHyperionV5 {
|
||||
"(math.sin(0) == 0)",
|
||||
"(not (1 == 0))",
|
||||
"(math.abs(-1) == 1)",
|
||||
"(math.ceil(5.1) == 6)"
|
||||
"(math.ceil(5.1) == 6)",
|
||||
"(bit32.bxor(123, 123) == 0)",
|
||||
"(string.len('luartex') == 7)",
|
||||
"(math.log10(100) == 2)"
|
||||
];
|
||||
$falsePreds = [
|
||||
"(math.pi < 3)",
|
||||
@ -81,7 +128,8 @@ class LuartexHyperionV5 {
|
||||
"(math.sin(0) == 1)",
|
||||
"(1 == 0)",
|
||||
"(math.abs(-1) == 0)",
|
||||
"(math.ceil(5.1) == 5)"
|
||||
"(bit32.bxor(123, 123) ~= 0)",
|
||||
"(math.sqrt(16) == 5)"
|
||||
];
|
||||
|
||||
if ($type === 'true') {
|
||||
@ -103,7 +151,6 @@ class LuartexHyperionV5 {
|
||||
$n1 = $this->instructions[$i + 1];
|
||||
$n2 = $this->instructions[$i + 2];
|
||||
|
||||
// Pattern: GETGLOBAL(0, f) + LOADK(1, v) + CALL(0, 1) -> CALL_GLOBAL_K(f, v)
|
||||
if ($inst[0] === $this->opMap['GETGLOBAL'] && $inst[1] === 0 &&
|
||||
$n1[0] === $this->opMap['LOADK'] && $n1[1] === 1 &&
|
||||
$n2[0] === $this->opMap['CALL'] && $n2[1] === 0 && $n2[2] === 1) {
|
||||
@ -111,33 +158,6 @@ class LuartexHyperionV5 {
|
||||
$i += 3;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Pattern: GETGLOBAL(0, f) + GETGLOBAL(1, v) + CALL(0, 1) -> CALL_GLOBAL_V(f, v)
|
||||
if ($inst[0] === $this->opMap['GETGLOBAL'] && $inst[1] === 0 &&
|
||||
$n1[0] === $this->opMap['GETGLOBAL'] && $n1[1] === 1 &&
|
||||
$n2[0] === $this->opMap['CALL'] && $n2[1] === 0 && $n2[2] === 1) {
|
||||
$folded[] = [$this->opMap['CALL_GLOBAL_V'], $inst[2], $n1[2]];
|
||||
$i += 3;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if ($i + 1 < $count) {
|
||||
$next = $this->instructions[$i + 1];
|
||||
|
||||
// Pattern: LOADK(0, v) + SETGLOBAL(0, s) -> SET_GLOBAL_CONST(s, v)
|
||||
if ($inst[0] === $this->opMap['LOADK'] && $next[0] === $this->opMap['SETGLOBAL'] && $inst[1] === 0 && $next[1] === 0) {
|
||||
$folded[] = [$this->opMap['SET_GLOBAL_CONST'], $next[2], $inst[2]];
|
||||
$i += 2;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Pattern: GETGLOBAL(0, v) + SETGLOBAL(0, s) -> MOVE_GLOBAL(s, v)
|
||||
if ($inst[0] === $this->opMap['GETGLOBAL'] && $next[0] === $this->opMap['SETGLOBAL'] && $inst[1] === 0 && $next[1] === 0) {
|
||||
$folded[] = [$this->opMap['MOVE_GLOBAL'], $next[2], $inst[2]];
|
||||
$i += 2;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$folded[] = $inst;
|
||||
@ -147,28 +167,18 @@ class LuartexHyperionV5 {
|
||||
}
|
||||
|
||||
private function compile() {
|
||||
$this->addConst("Hyperion V5.8 - Instruction Folding");
|
||||
$this->addConst("Hyperion V6.2 - Multi-Layer Recursive Virtualization");
|
||||
|
||||
$cleanCode = $this->rawCode;
|
||||
// Simple comment stripping
|
||||
$cleanCode = preg_replace('/--\[\[.*?\].*?\]\]--/s', '', $cleanCode);
|
||||
$cleanCode = preg_replace('/--[[]*.*?[]]*--/s', '', $cleanCode);
|
||||
$cleanCode = preg_replace('/--.*$/m', '', $cleanCode);
|
||||
|
||||
$tokens = preg_split('/[;
|
||||
]+/', $cleanCode);
|
||||
$tokens = preg_split('/[;\n]+/', $cleanCode);
|
||||
|
||||
foreach ($tokens as $token) {
|
||||
$token = trim($token);
|
||||
if (empty($token)) continue;
|
||||
|
||||
if (rand(1, 10) > 6) {
|
||||
if (rand(0, 1) == 0) {
|
||||
$this->instructions[] = [$this->opMap['JUNK1'], rand(0, 255), rand(0, 255)];
|
||||
} else {
|
||||
$this->instructions[] = [$this->opMap['OPAQUE'], rand(0, 255), rand(0, 255)];
|
||||
}
|
||||
}
|
||||
|
||||
if (preg_match('/^([a-zA-Z_]\w*(?:[.:]\w*)*)\s*\((.*?)\)$/', $token, $m)) {
|
||||
$this->emitCall($m[1], $m[2]);
|
||||
}
|
||||
@ -226,8 +236,6 @@ class LuartexHyperionV5 {
|
||||
|
||||
private function serializeAll() {
|
||||
$bin = "";
|
||||
|
||||
// 1. Instructions
|
||||
$bin .= pack("N", count($this->instructions));
|
||||
foreach ($this->instructions as $inst) {
|
||||
$op = (int)$inst[0];
|
||||
@ -236,7 +244,6 @@ class LuartexHyperionV5 {
|
||||
$bin .= pack("n", (int)$inst[2]);
|
||||
}
|
||||
|
||||
// 2. Constants
|
||||
$bin .= pack("N", count($this->constants));
|
||||
foreach ($this->constants as $c) {
|
||||
if (is_string($c)) {
|
||||
@ -262,20 +269,51 @@ class LuartexHyperionV5 {
|
||||
return bin2hex($enc);
|
||||
}
|
||||
|
||||
private function calculateChecksum($hex) {
|
||||
$sum = 0;
|
||||
for ($i = 0; $i < strlen($hex); $i++) {
|
||||
$sum = ($sum + ord($hex[$i]) * ($i + 1)) % 4294967296;
|
||||
}
|
||||
return $sum;
|
||||
}
|
||||
|
||||
public function build() {
|
||||
$this->compile();
|
||||
|
||||
$k_v = $this->genVar(12); $b_v = $this->genVar(12); $e_v = $this->genVar(12);
|
||||
$f_v = $this->genVar(12); $d_v = $this->genVar(12); $c_v = $this->genVar(12);
|
||||
$k_v = $this->genVar(32); $b_v = $this->genVar(32); $e_v = $this->genVar(32);
|
||||
$f_v = $this->genVar(32); $d_v = $this->genVar(32); $c_v = $this->genVar(32);
|
||||
$cs_v = $this->genVar(32); $tm_v = $this->genVar(32);
|
||||
$v_v = $this->genVar(32); $l2_v = $this->genVar(32);
|
||||
$layers_v = $this->genVar(32);
|
||||
$stack_v = $this->genVar(32);
|
||||
|
||||
$k_str = implode(',', $this->keys);
|
||||
$k_str = "";
|
||||
foreach ($this->keys as $i => $k) {
|
||||
$k_str .= ($i > 0 ? "," : "") . $this->numToLuaExpr($k);
|
||||
}
|
||||
|
||||
$allHex = $this->serializeAll();
|
||||
$checksum = $this->calculateChecksum($allHex);
|
||||
|
||||
$lua = "-- [[ Hyperion Engine V5.8 - Instruction Folding ]] --\n";
|
||||
$lua = "-- [[ Hyperion Engine V6.2 - Recursive Layered Architecture ]] --\n";
|
||||
|
||||
$lua .= "local function " . $tm_v . "() ";
|
||||
$lua .= "local _G = (getgenv and getgenv()) or _G; ";
|
||||
$lua .= "if debug and (debug.getinfo or debug.setupvalue) then return true end; ";
|
||||
$lua .= "if getfenv and (type(getfenv) ~= 'function') then return true end; ";
|
||||
$lua .= "local check = {string.char, table.concat, tonumber, pcall, bit32.bxor, math.abs}; ";
|
||||
$lua .= "for i=1,#check do if type(check[i]) ~= 'function' then return true end end; ";
|
||||
$lua .= "local s, e = pcall(function() return os.clock() end); if not s then return true end; ";
|
||||
$lua .= "return false end; ";
|
||||
$lua .= "if " . $tm_v . "() then while true do end end; ";
|
||||
|
||||
$lua .= "local " . $k_v . " = { " . $k_str . " }; ";
|
||||
$lua .= "local " . $b_v . " = \"" . $allHex . "\"; ";
|
||||
$lua .= "local " . $e_v . " = (getgenv and getgenv()) or (getfenv and getfenv(0)) or _G; ";
|
||||
|
||||
$lua .= "local function " . $cs_v . "(s) local h = 0; for i = 1, #s do h = (h + string.byte(s, i) * i) % " . $this->numToLuaExpr(4294967296) . " end return h end; ";
|
||||
$lua .= "if " . $cs_v . "(" . $b_v . ") ~= " . $this->numToLuaExpr($checksum) . " then while true do end end; ";
|
||||
|
||||
$lua .= "local function _H(h) local b = {}; for i = 1, #h, 2 do b[#b+1] = tonumber(h:sub(i, i+1), 16) end return b end; ";
|
||||
$lua .= "local function _D(b) local o = {}; for i = 1, #b do local k = ((i - 1) % 32) + 1; o[i] = bit32.bxor(b[i], " . $k_v . "[k], ((i - 1) * 13) % 256) end return o end; ";
|
||||
$lua .= "local " . $d_v . " = _D(_H(" . $b_v . ")); ";
|
||||
@ -300,50 +338,56 @@ class LuartexHyperionV5 {
|
||||
$lua .= "local function " . $f_v . "(p) local o = 5 + (p - 1) * 7; ";
|
||||
$lua .= "return " . $d_v . "[o]*65536 + " . $d_v . "[o+1]*256 + " . $d_v . "[o+2], _R16(" . $d_v . ", o+3), _R16(" . $d_v . ", o+5) end; ";
|
||||
|
||||
$lua .= "local function _V() local stack = {}; local pc = 1; while true do local op, a, b = " . $f_v . "(pc); ";
|
||||
$lua .= "local " . $v_v . "; " . $v_v . " = function(spc, layer) ";
|
||||
$lua .= "local " . $stack_v . " = {}; local pc = spc or 1; local cur_layer = layer or 1; ";
|
||||
$lua .= "while true do local op, a, b = " . $f_v . "(pc); ";
|
||||
|
||||
$cases = [];
|
||||
|
||||
$op_getglobal = $this->opMap['GETGLOBAL'];
|
||||
$cases[] = "elseif op == $op_getglobal then if " . $this->genOpaquePredicate('true') . " then local n = " . $c_v . "[b + 1]; local t = " . $e_v . "; for p in n:gmatch('[^.:]+') do t = t[p] end; stack[a] = t; else pc = pc + 666 end; ";
|
||||
$cases[] = "elseif op == $op_getglobal then if " . $this->genOpaquePredicate('true') . " then local n = " . $c_v . "[b + 1]; local t = " . $e_v . "; for p in n:gmatch('[^.:]+') do t = t[p] end; " . $stack_v . "[a] = t; else pc = pc + " . rand(100, 1000) . " end ";
|
||||
|
||||
$op_loadk = $this->opMap['LOADK'];
|
||||
$cases[] = "elseif op == $op_loadk then if " . $this->genOpaquePredicate('false') . " then pc = pc * 2 else stack[a] = " . $c_v . "[b + 1] end; ";
|
||||
$cases[] = "elseif op == $op_loadk then " . $stack_v . "[a] = " . $c_v . "[b + 1] ";
|
||||
|
||||
$op_call = $this->opMap['CALL'];
|
||||
$cases[] = "elseif op == $op_call then if " . $this->genOpaquePredicate('true') . " then local f = stack[a]; local args = {}; for m = 1, b do args[m] = stack[a + m] end; local ok, err = pcall(f, unpack(args)); if not ok then error('VM Error: ' .. tostring(err)) end; end; ";
|
||||
$cases[] = "elseif op == $op_call then local f = " . $stack_v . "[a]; local args = {}; for m = 1, b do args[m] = " . $stack_v . "[a + m] end; if f == " . $v_v . " then " . $v_v . "(" . $stack_v . "[a+1], cur_layer + 1) else f(unpack(args)) end ";
|
||||
|
||||
$op_setglobal = $this->opMap['SETGLOBAL'];
|
||||
$cases[] = "elseif op == $op_setglobal then if " . $this->genOpaquePredicate('true') . " then local n = " . $c_v . "[b + 1]; " . $e_v . "[n] = stack[a]; end; ";
|
||||
|
||||
$op_move = $this->opMap['MOVE'];
|
||||
$cases[] = "elseif op == $op_move then stack[a] = stack[b]; ";
|
||||
$cases[] = "elseif op == $op_setglobal then local n = " . $c_v . "[b + 1]; " . $e_v . "[n] = " . $stack_v . "[a] ";
|
||||
|
||||
$op_return = $this->opMap['RETURN'];
|
||||
$cases[] = "elseif op == $op_return then if " . $this->genOpaquePredicate('false') . " then print('DEAD CODE') else return end; ";
|
||||
$cases[] = "elseif op == $op_return then return ";
|
||||
|
||||
$op_junk1 = $this->opMap['JUNK1'];
|
||||
$cases[] = "elseif op == $op_junk1 then if " . $this->genOpaquePredicate('false') . " then pc = -1 end; ";
|
||||
|
||||
$op_opaque = $this->opMap['OPAQUE'];
|
||||
$cases[] = "elseif op == $op_opaque then if " . $this->genOpaquePredicate('true') . " then local x = math.sqrt(a * b); stack[0] = x; else stack[0] = 0; end; ";
|
||||
$cases[] = "elseif op == $op_opaque then if " . $tm_v . "() then while true do end else " . $stack_v . "[0] = math.sqrt(a*b) end ";
|
||||
|
||||
// Super-Opcodes
|
||||
$op_set_global_const = $this->opMap['SET_GLOBAL_CONST'];
|
||||
$cases[] = "elseif op == $op_set_global_const then if " . $this->genOpaquePredicate('true') . " then local n = " . $c_v . "[a + 1]; " . $e_v . "[n] = " . $c_v . "[b + 1]; end; ";
|
||||
$op_recursive_call = $this->opMap['RECURSIVE_CALL'];
|
||||
$cases[] = "elseif op == $op_recursive_call then " . $v_v . "(a, cur_layer + 1) ";
|
||||
|
||||
$op_tamper_check = $this->opMap['TAMPER_CHECK'];
|
||||
$cases[] = "elseif op == $op_tamper_check then if " . $tm_v . "() then while true do end end ";
|
||||
|
||||
$op_layer_enter = $this->opMap['LAYER_ENTER'];
|
||||
$cases[] = "elseif op == $op_layer_enter then if cur_layer < 10 then " . $v_v . "(pc + 1, cur_layer + 1) return end ";
|
||||
|
||||
$op_call_gk = $this->opMap['CALL_GLOBAL_K'];
|
||||
$cases[] = "elseif op == $op_call_gk then local n = " . $c_v . "[a + 1]; local f = " . $e_v . "; for p in n:gmatch('[^.:]+') do f = f[p] end; f(" . $c_v . "[b + 1]) ";
|
||||
|
||||
$op_move_global = $this->opMap['MOVE_GLOBAL'];
|
||||
$cases[] = "elseif op == $op_move_global then if " . $this->genOpaquePredicate('true') . " then local sn = " . $c_v . "[a + 1]; local vn = " . $c_v . "[b + 1]; local t = " . $e_v . "; for p in vn:gmatch('[^.:]+') do t = t[p] end; " . $e_v . "[sn] = t; end; ";
|
||||
|
||||
$op_call_global_k = $this->opMap['CALL_GLOBAL_K'];
|
||||
$cases[] = "elseif op == $op_call_global_k then if " . $this->genOpaquePredicate('true') . " then local fn = " . $c_v . "[a + 1]; local t = " . $e_v . "; for p in fn:gmatch('[^.:]+') do t = t[p] end; t(" . $c_v . "[b + 1]); end; ";
|
||||
|
||||
$op_call_global_v = $this->opMap['CALL_GLOBAL_V'];
|
||||
$cases[] = "elseif op == $op_call_global_v then if " . $this->genOpaquePredicate('true') . " then local fn = " . $c_v . "[a + 1]; local vn = " . $c_v . "[b + 1]; local f = " . $e_v . "; for p in fn:gmatch('[^.:]+') do f = f[p] end; local v = " . $e_v . "; for p in vn:gmatch('[^.:]+') do v = v[p] end; f(v); end; ";
|
||||
$op_stack_shuffle = $this->opMap['STACK_SHUFFLE'];
|
||||
$cases[] = "elseif op == $op_stack_shuffle then local t = " . $stack_v . "[a]; " . $stack_v . "[a] = " . $stack_v . "[b]; " . $stack_v . "[b] = t; ";
|
||||
|
||||
shuffle($cases);
|
||||
$lua .= "if false then " . implode(" ", $cases) . " end; pc = pc + 1; end end; ";
|
||||
$lua .= "pcall(_V); ";
|
||||
|
||||
$lua .= "local function " . $layers_v . "(op, a, b, pc) ";
|
||||
$lua .= "if false then elseif op == -1 then return ";
|
||||
$lua .= implode(" ", $cases);
|
||||
$lua .= " end end; ";
|
||||
|
||||
$lua .= "local s, e = pcall(" . $layers_v . ", op, a, b, pc); ";
|
||||
$lua .= "if not s then if " . $tm_v . "() then while true do end else error(e) end end; ";
|
||||
$lua .= "pc = pc + 1; end end; ";
|
||||
|
||||
$lua .= "pcall(" . $v_v . ", 1, 1); ";
|
||||
|
||||
return [
|
||||
'success' => true,
|
||||
@ -351,14 +395,14 @@ class LuartexHyperionV5 {
|
||||
'stats' => [
|
||||
'original_size' => strlen($this->rawCode),
|
||||
'protected_size' => strlen($lua),
|
||||
'vm_version' => '5.8-instruction-folding'
|
||||
'vm_version' => '6.2-recursive-layered'
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$vm = new LuartexHyperionV5($code);
|
||||
$vm = new LuartexHyperionV6_2($code);
|
||||
echo json_encode($vm->build());
|
||||
} catch (Exception $e) {
|
||||
echo json_encode(['success' => false, 'error' => $e->getMessage()]);
|
||||
|
||||
2
protected_v5_9.lua
Normal file
2
protected_v5_9.lua
Normal file
@ -0,0 +1,2 @@
|
||||
-- [[ Hyperion Engine V5.9 - Anti-Tamper & Multi-Layer VM ]] --
|
||||
local function L__l1Ii_I1i_lI() if debug and (debug.getinfo or debug.setupvalue) then return true end; if getfenv and (type(getfenv) ~= 'function') then return true end; return false end; if L__l1Ii_I1i_lI() then while true do end end; local L_I1ii__II_lI1 = { 194,207,253,238,133,158,88,60,137,178,177,90,166,104,25,68,158,7,94,235,71,224,127,182,162,243,57,24,140,146,77,28 }; local L___i_i111l1iI = "c2c2e7c1b160ae67e0c731d510b4af874ed9b459e7f1619d9eb61cb6e0ebcb8e62483229507fb3c7f65693779a254e6c547ad47ce1517b277a16cbe7808b6b298382a789db57afd744751afa14a1b972a02354f123f04fa9b35bffe64d5beebd020427bbf4dc0375b28ea550fab7c2e62eba9439d363e8d3ced70b27c0d3630a2e2e0869572df98a410fca25df334668a07a62a9ed48e31d1a36e9f6506a4b0fe2e3bfa8d1ff364957467f807f81a0c14e82749510eb"; local L_IIllll1iII_I = (getgenv and getgenv()) or (getfenv and getfenv(0)) or _G; local function L_1i_Ii_I_1iIl(s) local h = 0; for i = 1, #s do h = (h + string.byte(s, i) * i) % 4294967296 end return h end; if L_1i_Ii_I_1iIl(L___i_i111l1iI) ~= 4656909 then while true do end end; local function _H(h) local b = {}; for i = 1, #h, 2 do b[#b+1] = tonumber(h:sub(i, i+1), 16) end return b end; local function _D(b) local o = {}; for i = 1, #b do local k = ((i - 1) % 32) + 1; o[i] = bit32.bxor(b[i], L_I1ii__II_lI1[k], ((i - 1) * 13) % 256) end return o end; local L_1l111ii11_i1 = _D(_H(L___i_i111l1iI)); local function _R32(b, p) return b[p]*16777216 + b[p+1]*65536 + b[p+2]*256 + b[p+3] end; local function _R16(b, p) return b[p]*256 + b[p+1] end; local ic = _R32(L_1l111ii11_i1, 1); local co = 5 + ic * 7; local cc = _R32(L_1l111ii11_i1, co); local L__11Ili1_llI1 = {}; local cu = co + 4; for i = 1, cc do local t = L_1l111ii11_i1[cu]; cu = cu + 1; if t == 1 or t == 2 then local l = _R32(L_1l111ii11_i1, cu); cu = cu + 4; local s = {}; for j = 1, l do s[j] = string.char(L_1l111ii11_i1[cu]); cu = cu + 1 end; s = table.concat(s); if t == 2 then L__11Ili1_llI1[i] = tonumber(s) else L__11Ili1_llI1[i] = s end; else cu = cu + 1 end end; local function L_____l11_liI_(p) local o = 5 + (p - 1) * 7; return L_1l111ii11_i1[o]*65536 + L_1l111ii11_i1[o+1]*256 + L_1l111ii11_i1[o+2], _R16(L_1l111ii11_i1, o+3), _R16(L_1l111ii11_i1, o+5) end; local _V; _V = function(spc) local stack = {}; local pc = spc or 1; while true do local op, a, b = L_____l11_liI_(pc); local function _L2(op, a, b) if false then elseif op == -1 then return elseif op == 47706 then return elseif op == 10869 then stack[a] = L__11Ili1_llI1[b + 1] elseif op == 87747 then if L__l1Ii_I1i_lI() then while true do end else stack[0] = math.sqrt(a*b) end elseif op == 84922 then local f = stack[a]; local args = {}; for m = 1, b do args[m] = stack[a + m] end; if f == _V then _V(stack[a+1]) else f(unpack(args)) end elseif op == 95772 then _V(a) elseif op == 17828 then local n = L__11Ili1_llI1[b + 1]; L_IIllll1iII_I[n] = stack[a] elseif op == 30705 then if (math.ceil(5.1) == 6) then local n = L__11Ili1_llI1[b + 1]; local t = L_IIllll1iII_I; for p in n:gmatch('[^.:]+') do t = t[p] end; stack[a] = t; else pc = pc + 666 end end end; _L2(op, a, b); pc = pc + 1; end end; pcall(_V, 1);
|
||||
2
protected_v6_0.lua
Normal file
2
protected_v6_0.lua
Normal file
File diff suppressed because one or more lines are too long
30
test_v5_9.php
Normal file
30
test_v5_9.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
$code = 'print("Hello from Hyperion V5.9")
|
||||
local x = 10
|
||||
print("Value of x is:", x)
|
||||
';
|
||||
|
||||
$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);
|
||||
$data = json_decode($response, true);
|
||||
|
||||
if ($data && $data['success']) {
|
||||
$protected_code = $data['protected_code'];
|
||||
file_put_contents('protected_v5_9.lua', $protected_code);
|
||||
echo "Obfuscation successful. Output saved to protected_v5_9.lua\n";
|
||||
|
||||
// Execute the protected code using lua
|
||||
$output = shell_exec('lua protected_v5_9.lua 2>&1');
|
||||
echo "Execution output:\n$output\n";
|
||||
} else {
|
||||
echo "Obfuscation failed: " . ($data['error'] ?? 'Unknown error') . "\n";
|
||||
if (isset($data['error'])) {
|
||||
echo "Error detail: " . print_r($data, true) . "\n";
|
||||
}
|
||||
}
|
||||
curl_close($ch);
|
||||
24
test_v6_0.php
Normal file
24
test_v6_0.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?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";
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user