diff --git a/process.php b/process.php index 8abe134..d4bae65 100644 --- a/process.php +++ b/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()]); diff --git a/protected_v5_9.lua b/protected_v5_9.lua new file mode 100644 index 0000000..5ff6d10 --- /dev/null +++ b/protected_v5_9.lua @@ -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); \ No newline at end of file diff --git a/protected_v6_0.lua b/protected_v6_0.lua new file mode 100644 index 0000000..5050894 --- /dev/null +++ b/protected_v6_0.lua @@ -0,0 +1,2 @@ +-- [[ Hyperion Engine V6.2 - Recursive Layered Architecture ]] -- +local function _qizOzQwiZ9IbzOOB9iOu0M1MbBOsoBlvc670b8() local _G = (getgenv and getgenv()) or _G; if debug and (debug.getinfo or debug.setupvalue) then return true end; if getfenv and (type(getfenv) ~= 'function') then return true end; local check = {string.char, table.concat, tonumber, pcall, bit32.bxor, math.abs}; for i=1,#check do if type(check[i]) ~= 'function' then return true end end; local s, e = pcall(function() return os.clock() end); if not s then return true end; return false end; if _qizOzQwiZ9IbzOOB9iOu0M1MbBOsoBlvc670b8() then while true do end end; local _Oglzvl1Oq0Og81glMizo158I1OlIlOMb0ff19b = { ((bit32.bxor((math.abs(47032)), bit32.bxor(54551, 24579)) - (math.abs((731.7 + -195.5)))) + ((bit32.bxor(63870, 64487) + (752.8 + -1344.8)) + 1)),((math.abs(((math.abs(698.5)) + (-692.5 + 1)))) * (((623.6 - -305) + (-804.8 + 1)) - ((math.abs(100.8)) + 1))),bit32.bxor(bit32.bxor(((math.abs(6848.8)) - (-55803.2 + 1)), (math.abs((math.abs(54050))))), (math.abs(((755.7 + 1.0999999999999) + (math.abs(9237.2)))))),(bit32.bxor((math.abs((895.9 + 17184.1))), (math.abs((505.3 + 17107.7)))) - (bit32.bxor(bit32.bxor(42154, 23942), (math.abs(64372))) + 1)),(math.abs((((914.1 + -852.7) + bit32.bxor(32035, 32415)) - ((math.abs(799.5)) - (889 + -884))))),bit32.bxor(bit32.bxor(bit32.bxor((2 * 25346), (3 * 1397)), ((40.6 + 4866.3) - (-44030.1 + 1))), ((math.abs((949.7 + 2465.8))) - bit32.bxor((5245 - -44884), (2 * -19468)))),(math.abs((math.abs(((111.6 - -678.4) + bit32.bxor(43670, -43182)))))),(math.abs(bit32.bxor(((math.abs(2)) * (5 * 883)), ((2 * 1) * (2 * 2202))))),((math.abs(((135.5 - -740.5) - (22.6 + 1)))) - ((math.abs((410.1 + 429.3))) + 1)),(math.abs(bit32.bxor(((math.abs(2)) * (833.9 + 19101.1)), bit32.bxor((6430.4 - -51565.6), bit32.bxor(45528, 51268))))),((bit32.bxor((math.abs(39504)), (2 * 19624)) + 1) - (math.abs(bit32.bxor((2 * 12446), (5 * 5093))))),bit32.bxor((((114.9 + 291.4) + (math.abs(-404.3))) * ((307.6 + 1) - (-104.3 - 2292.1))), (math.abs(((2 * 2721) + 1)))),(math.abs(bit32.bxor((bit32.bxor(11018, 10711) + (5885.2 - -48503.9)), (bit32.bxor(46938, 46936) * (math.abs(27601)))))),((((math.abs(860.2)) - (618.6 + 1)) - ((540.2 + -462.9) + 1)) + bit32.bxor(((332.5 - 329.5) * bit32.bxor(37457, 43892)), bit32.bxor((2071.8 - -14527.2), bit32.bxor(19620, -42827)))),((((math.abs(515.8)) + bit32.bxor(30411, 29928)) - ((math.abs(583.2)) - (416 + 1))) + bit32.bxor(((4509.6 + 1) - (334 + -39185.4)), bit32.bxor((math.abs(41746)), (841.3 + -3230.3)))),(bit32.bxor(bit32.bxor(bit32.bxor(23433, 62348), (464.9 + 31369.1)), ((math.abs(5595.3)) - bit32.bxor(50144, -679))) - (((math.abs(420.6)) - bit32.bxor(53898, -53907)) + (bit32.bxor(40665, 40951) + 1))),((math.abs((math.abs(bit32.bxor(17577, 17423))))) + 1),((((1034.8 - 80.6) - (592.9 - -57.8)) - ((462.4 + 31.3) - bit32.bxor(49147, 48955))) * bit32.bxor(((435.6 + 338.5) + (362.2 + 19701.7)), (bit32.bxor(65287, 65285) * (2030 - -8400)))),(math.abs((((math.abs(617.1)) - (math.abs(615.1))) * bit32.bxor((2172.5 - -17587.5), (804.4 + 19001.6))))),((((646.7 + 1) + (131.7 + 1)) + 1) - (((164 + 706.4) - (math.abs(186))) + 1)),bit32.bxor((bit32.bxor(bit32.bxor(503, 20863), (math.abs(20487))) + bit32.bxor((math.abs(59631)), (830.2 + 15212.8))), ((bit32.bxor(26920, 27775) - (-4807.7 + 1)) - bit32.bxor((math.abs(33761)), (3 * -5217)))),(((math.abs((35.1 - -113.2))) + 1) + ((math.abs((16.9 + 915.6))) - (bit32.bxor(34530, 33475) + 1))),(bit32.bxor(((312.6 - 307.6) * (5 * 749)), (math.abs(bit32.bxor(40071, 55058)))) + ((bit32.bxor(41177, 41519) + 1) - ((math.abs(850.7)) + (math.abs(445))))),((((801.9 - -29.9) + bit32.bxor(9730, 9825)) - bit32.bxor((1888 - -13882), (268.9 + 15788.1))) + bit32.bxor((bit32.bxor(43476, 43341) + (math.abs(42156.3))), ((909.9 - 904.9) * (math.abs(-8453))))),(((bit32.bxor(21774, 22009) - (329.2 + -912.5)) - bit32.bxor((math.abs(12482)), bit32.bxor(16930, 28675))) - ((math.abs(bit32.bxor(59381, 59352))) + 1)),((math.abs(((495.1 + 506.8) - (131.9 + 1)))) + (((590.6 - 586) + bit32.bxor(45602, 45370)) + bit32.bxor((2 * 409), (446.9 + -1791.9)))),((bit32.bxor((math.abs(47527)), (2 * 23808)) + (math.abs((945.2 + -1466)))) - (((874.4 + 56.1) - (math.abs(635.2))) + 1)),((math.abs((bit32.bxor(24450, 24449) * (838 + -837)))) * (bit32.bxor(bit32.bxor(46490, 23325), (2 * 30529)) * bit32.bxor((2 * 29330), (5991 - -52666)))),((bit32.bxor((2 * 29788), bit32.bxor(50272, 12117)) + (math.abs(bit32.bxor(40952, -40378)))) + (((223.7 + 1) + 1) - (math.abs((715.4 - 397.8))))),((((342.4 + 445.8) + 1) + 1) - bit32.bxor(bit32.bxor((881.5 + 63431.5), (483.9 + 54533.1)), (math.abs((391 + 11698))))),(math.abs(((math.abs((math.abs(2)))) * (math.abs((math.abs(34))))))),(((math.abs(bit32.bxor(64611, 64609))) * (math.abs(bit32.bxor(30927, 30950)))) + 1) }; local _MOII0vZlBOgbSBvS28nQ0I9oQlm5Igzze805f7 = "dfac8932ea2e894d64db3eee6de2eb4d77e936a37b7ff66f67224b7aa302f4ee4d2c04f346f858996d96d22fb46778cc852c3582e1d54f9c90cbd2dd91401701f385b312df843be3"; local _1qgziBI5O9qMSQvzw9m1IOMz0OO0QSOM956860 = (getgenv and getgenv()) or (getfenv and getfenv(0)) or _G; local function _1BizquOqIoilgiOss1qwmOnml0SO00lSc23495(s) local h = 0; for i = 1, #s do h = (h + string.byte(s, i) * i) % ((math.abs(((math.abs(374.4)) - (708.5 - 336.1)))) * bit32.bxor(((749.4 - 575.9) + (math.abs(54555.5))), ((2 * 1073769188) + 1))) end return h end; if _1BizquOqIoilgiOss1qwmOnml0SO00lSc23495(_MOII0vZlBOgbSBvS28nQ0I9oQlm5Igzze805f7) ~= (((bit32.bxor(62563, 62805) + 1) + bit32.bxor((math.abs(49749)), (63.7 + 49775.3))) + (bit32.bxor((2 * 27980), (math.abs(116484))) - ((100.6 + 160.9) + (681.3 + -649348.4)))) 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], _Oglzvl1Oq0Og81glMizo158I1OlIlOMb0ff19b[k], ((i - 1) * 13) % 256) end return o end; local _8II100nSzqg100522b9iSZ1iIogqo0ZQb5a34f = _D(_H(_MOII0vZlBOgbSBvS28nQ0I9oQlm5Igzze805f7)); 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(_8II100nSzqg100522b9iSZ1iIogqo0ZQb5a34f, 1); local co = 5 + ic * 7; local cc = _R32(_8II100nSzqg100522b9iSZ1iIogqo0ZQb5a34f, co); local _gMSbI10vInmOO0ig0ZI9iwObIIMSBiQ2cda14a = {}; local cu = co + 4; for i = 1, cc do local t = _8II100nSzqg100522b9iSZ1iIogqo0ZQb5a34f[cu]; cu = cu + 1; if t == 1 or t == 2 then local l = _R32(_8II100nSzqg100522b9iSZ1iIogqo0ZQb5a34f, cu); cu = cu + 4; local s = {}; for j = 1, l do s[j] = string.char(_8II100nSzqg100522b9iSZ1iIogqo0ZQb5a34f[cu]); cu = cu + 1 end; s = table.concat(s); if t == 2 then _gMSbI10vInmOO0ig0ZI9iwObIIMSBiQ2cda14a[i] = tonumber(s) else _gMSbI10vInmOO0ig0ZI9iwObIIMSBiQ2cda14a[i] = s end; else cu = cu + 1 end end; local function _ZvQo1QQz5181qgmQnoQ1OQo12mZ2lIII7211d0(p) local o = 5 + (p - 1) * 7; return _8II100nSzqg100522b9iSZ1iIogqo0ZQb5a34f[o]*65536 + _8II100nSzqg100522b9iSZ1iIogqo0ZQb5a34f[o+1]*256 + _8II100nSzqg100522b9iSZ1iIogqo0ZQb5a34f[o+2], _R16(_8II100nSzqg100522b9iSZ1iIogqo0ZQb5a34f, o+3), _R16(_8II100nSzqg100522b9iSZ1iIogqo0ZQb5a34f, o+5) end; local _8voQ8lBvQSOvS2gl90nl9wI0IbqBmizid82c7b; _8voQ8lBvQSOvS2gl90nl9wI0IbqBmizid82c7b = function(spc, layer) local _lbnbvoo0B8simMBQunqSQiQi1uzQ0QSi47d951 = {}; local pc = spc or 1; local cur_layer = layer or 1; while true do local op, a, b = _ZvQo1QQz5181qgmQnoQ1OQo12mZ2lIII7211d0(pc); local function _Z2Smi1M0i2lv1bz9s20111nQ11zO01gq5cdc5e(op, a, b, pc) if false then elseif op == -1 then return elseif op == 11549 then if _qizOzQwiZ9IbzOOB9iOu0M1MbBOsoBlvc670b8() then while true do end else _lbnbvoo0B8simMBQunqSQiQi1uzQ0QSi47d951[0] = math.sqrt(a*b) end elseif op == 44265 then local t = _lbnbvoo0B8simMBQunqSQiQi1uzQ0QSi47d951[a]; _lbnbvoo0B8simMBQunqSQiQi1uzQ0QSi47d951[a] = _lbnbvoo0B8simMBQunqSQiQi1uzQ0QSi47d951[b]; _lbnbvoo0B8simMBQunqSQiQi1uzQ0QSi47d951[b] = t; elseif op == 45885 then local n = _gMSbI10vInmOO0ig0ZI9iwObIIMSBiQ2cda14a[b + 1]; _1qgziBI5O9qMSQvzw9m1IOMz0OO0QSOM956860[n] = _lbnbvoo0B8simMBQunqSQiQi1uzQ0QSi47d951[a] elseif op == 57478 then _lbnbvoo0B8simMBQunqSQiQi1uzQ0QSi47d951[a] = _gMSbI10vInmOO0ig0ZI9iwObIIMSBiQ2cda14a[b + 1] elseif op == 62835 then _8voQ8lBvQSOvS2gl90nl9wI0IbqBmizid82c7b(a, cur_layer + 1) elseif op == 66333 then return elseif op == 52166 then local n = _gMSbI10vInmOO0ig0ZI9iwObIIMSBiQ2cda14a[a + 1]; local f = _1qgziBI5O9qMSQvzw9m1IOMz0OO0QSOM956860; for p in n:gmatch('[^.:]+') do f = f[p] end; f(_gMSbI10vInmOO0ig0ZI9iwObIIMSBiQ2cda14a[b + 1]) elseif op == 64000 then local f = _lbnbvoo0B8simMBQunqSQiQi1uzQ0QSi47d951[a]; local args = {}; for m = 1, b do args[m] = _lbnbvoo0B8simMBQunqSQiQi1uzQ0QSi47d951[a + m] end; if f == _8voQ8lBvQSOvS2gl90nl9wI0IbqBmizid82c7b then _8voQ8lBvQSOvS2gl90nl9wI0IbqBmizid82c7b(_lbnbvoo0B8simMBQunqSQiQi1uzQ0QSi47d951[a+1], cur_layer + 1) else f(unpack(args)) end elseif op == 26142 then if _qizOzQwiZ9IbzOOB9iOu0M1MbBOsoBlvc670b8() then while true do end end elseif op == 18078 then if cur_layer < 10 then _8voQ8lBvQSOvS2gl90nl9wI0IbqBmizid82c7b(pc + 1, cur_layer + 1) return end elseif op == 43789 then if (math.ceil(5.1) == 6) then local n = _gMSbI10vInmOO0ig0ZI9iwObIIMSBiQ2cda14a[b + 1]; local t = _1qgziBI5O9qMSQvzw9m1IOMz0OO0QSOM956860; for p in n:gmatch('[^.:]+') do t = t[p] end; _lbnbvoo0B8simMBQunqSQiQi1uzQ0QSi47d951[a] = t; else pc = pc + 416 end end end; local s, e = pcall(_Z2Smi1M0i2lv1bz9s20111nQ11zO01gq5cdc5e, op, a, b, pc); if not s then if _qizOzQwiZ9IbzOOB9iOu0M1MbBOsoBlvc670b8() then while true do end else error(e) end end; pc = pc + 1; end end; pcall(_8voQ8lBvQSOvS2gl90nl9wI0IbqBmizid82c7b, 1, 1); \ No newline at end of file diff --git a/test_v5_9.php b/test_v5_9.php new file mode 100644 index 0000000..6790471 --- /dev/null +++ b/test_v5_9.php @@ -0,0 +1,30 @@ + $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); \ No newline at end of file diff --git a/test_v6_0.php b/test_v6_0.php new file mode 100644 index 0000000..0c2d441 --- /dev/null +++ b/test_v6_0.php @@ -0,0 +1,24 @@ + 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"; +} \ No newline at end of file