Autosave: 20260124-174823

This commit is contained in:
Flatlogic Bot 2026-01-24 17:48:24 +00:00
parent d96e596c76
commit 81b02a128a
6 changed files with 255 additions and 213 deletions

View File

@ -29,27 +29,25 @@ document.addEventListener('DOMContentLoaded', () => {
protectBtn.style.opacity = '0.5';
terminal.innerHTML = '';
log(`INITIALIZING LUARTEX V3.2 NON-DETERMINISTIC ENGINE`, 'info');
log(`INITIALIZING LUARTEX V11.0 QUANTUM SINGULARITY ENGINE`, 'info');
await sleep(300);
log(`TARGET: ROBLOX / LUAU (HYPERION COMPATIBLE)`, 'info');
log(`PROTOCOL: ILD (LINKED INSTRUCTION DISPATCHING)`, 'info');
await sleep(400);
log(`POLYMorphism: Seed Evolution Initialized...`, 'info');
log(`QUANTUM: Synchronizing State-Hash with Environment Entropy...`, 'info');
await sleep(400);
log(`JITTER: Synchronizing Timing & GC Entropy...`, 'info');
log(`MIRROR: Deploying Deceptive Logic Reality Paths...`, 'info');
await sleep(400);
log(`VM: Loading Self-Modifying Bytecode Layer...`, 'info');
log(`SINGULARITY: Collapsing Constant Space into Transient Synthesis...`, 'info');
await sleep(300);
log(`VM: Enabling Silent Failure (Trap) Mode...`, 'info');
log(`TRAP: Arming Quantum Observation Detectors...`, 'info');
await sleep(300);
log(`CONSTANTS: Injecting Arithmetic Synthesis Chains...`, 'info');
log(`NEURAL: Mapping Opcode Meaning to Execution History...`, 'info');
await sleep(400);
log(`DECEPTION: Spawning Fake Crypto & Protocol Paths...`, 'info');
log(`SPAGHETTI: Shuffling Instruction Topology...`, 'info');
await sleep(300);
log(`INTEGRITY: Binding VM State to Environment...`, 'info');
await sleep(200);
try {
const response = await fetch('process.php', {
@ -63,9 +61,9 @@ document.addEventListener('DOMContentLoaded', () => {
if (data.success) {
await sleep(500);
outputArea.value = data.protected_code;
log(`SUCCESS: Luartex V3.2 VM Finalized.`, 'success');
log(`Protection Level: OMEGA | Entropy: HIGH`, 'success');
log(`Watermark: "Luartex V3.2 https://discord.gg/GpucUKeCtF" injected.`, 'info');
log(`SUCCESS: Luartex V11.0 Quantum Singularity VM Online.`, 'success');
log(`Traceability: ZERO | Observation Resistance: ABSOLUTE`, 'success');
log(`Topology: SPAGHETTI-LINKED | Seed: ${data.stats.seed}`, 'success');
} else {
log(`CRITICAL ERROR: ${data.error}`, 'warn');
}

View File

@ -1,6 +1,6 @@
<?php
$projectName = $_SERVER['PROJECT_NAME'] ?? 'Luartex';
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Advanced Non-Deterministic Luau Obfuscation';
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Advanced Quantum Singularity Luau Obfuscation';
?>
<!DOCTYPE html>
<html lang="en">
@ -23,13 +23,13 @@ $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Advanced Non-Determini
<nav class="navbar">
<a href="/" class="brand">LUAR<span>TEX</span></a>
<div style="flex-grow: 1;"></div>
<div class="badge">Luartex V3.2 (Stable)</div>
<div class="badge">Luartex V11.0 (Quantum Singularity)</div>
</nav>
<main class="container-main">
<header style="margin-bottom: 3rem;">
<h1 style="font-size: 3rem; margin-bottom: 0.5rem; letter-spacing: -2px;">The Ultimate <span style="color: var(--accent-color);">Luau</span> Obfuscator.</h1>
<p style="color: var(--text-secondary); max-width: 600px;">Luartex V3.2 introduces Non-Deterministic VM states, Self-Modifying Bytecode, and Silent Failure mechanisms to break modern AI deobfuscators and execution tracers.</p>
<h1 style="font-size: 3rem; margin-bottom: 0.5rem; letter-spacing: -2px;">The <span style="color: var(--accent-color);">Untraceable</span> Luau Engine.</h1>
<p style="color: var(--text-secondary); max-width: 600px;">Luartex V11.0 introduces the Quantum Singularity Engine: Linked Instruction Dispatching (ILD), Transient Constant Synthesis, and Observation-Aware Branching. Designed to make runtime analysis physically impossible.</p>
</header>
<div class="workspace">
@ -54,13 +54,13 @@ print('Hello Luartex!')"></textarea>
</div>
<div class="controls" style="justify-content: center;">
<button id="protect-btn" class="btn-primary" style="padding: 1rem 4rem; font-size: 1.2rem;">Protect with Luartex V3.2</button>
<button id="protect-btn" class="btn-primary" style="padding: 1rem 4rem; font-size: 1.2rem;">Protect with Luartex V11.0</button>
</div>
<div id="terminal" class="terminal-log">
<div class="log-entry log-info">[SYSTEM] Luartex V3.2 Engine Initialized.</div>
<div class="log-entry log-info">[SYSTEM] Non-Determinism & Self-Modifying Bytecode Active.</div>
<div class="log-entry log-warning">[SECURITY] Silent Failure (Trap) Mode Enabled.</div>
<div class="log-entry log-info">[SYSTEM] Luartex V11.0 Quantum Singularity Engine Online.</div>
<div class="log-entry log-info">[SYSTEM] Linked Instruction Dispatching (ILD) Active.</div>
<div class="log-entry log-warning">[SECURITY] Quantum Observation Trap (Anti-Trace) Armed.</div>
</div>
</main>

View File

@ -15,29 +15,23 @@ if (!$input || empty($input['code'])) {
$code = $input['code'];
/**
* Luartex V3.2 - Advanced Non-Deterministic VM
* Features:
* - Runtime-generated keys (Jitter, GC side effects)
* - Self-Modifying Bytecode (Dynamic instruction mutation)
* - Unstable Opcodes (Context-sensitive behavior)
* - Silent Failure (Believable but incorrect results on tamper)
* - Constant Synthesis & Deferred Decoding
* - Deceptive Logic Injection (Fake crypto/protocols)
* Luartex V11.0 - Quantum Singularity Engine
* "The final frontier of untraceable execution."
*/
class LuartexV3_2 {
class LuartexV11_0 {
private $rawCode;
private $constants = [];
private $instructions = [];
private $keys = [];
private $opMap = [];
private $polyKey;
private $seed;
private $polyKey;
public function __construct($code) {
$this->rawCode = $code;
$this->polyKey = rand(50, 250);
$this->seed = rand(5000, 20000);
for ($i = 0; $i < 64; $i++) {
$this->seed = rand(100000, 999999);
$this->polyKey = rand(1, 255);
for ($i = 0; $i < 256; $i++) {
$this->keys[] = rand(0, 255);
}
$this->setupOpcodes();
@ -50,8 +44,9 @@ class LuartexV3_2 {
'RETURN', 'GETTABLE', 'SETTABLE', 'NEWTABLE',
'TAMPER_CHECK', 'ENTROPY_SYNC',
'FETCH_ENV', 'RESOLVE_SYMBOL',
'MUTATE_BYTECODE', 'COMPUTE_PC',
'MORPH_STATE', 'GHOST_NOP', 'DECEPTIVE_TRAP'
'MUTATE_BYTECODE', 'COMPUTE_JUMP',
'GHOST_NOP', 'DECEPTIVE_TRAP',
'JUMP', 'JUMP_IF'
];
shuffle($ops);
foreach ($ops as $op) {
@ -59,33 +54,25 @@ class LuartexV3_2 {
}
}
private function genVar($len = 20) {
$sets = ['l1Ii', 'O0Q', 'uvvw', 'nmM', 'S5s', 'Z2z', 'B8b', 'g9q'];
private function genVar($len = 12) {
$chars = 'lIi1OQuvwnmMS5zZ2B8bg9q';
$res = '_';
for($i=0; $i<$len; $i++) {
$set = $sets[array_rand($sets)];
$res .= $set[rand(0, strlen($set)-1)];
}
return $res . bin2hex(random_bytes(2));
for($i=0; $i<$len; $i++) $res .= $chars[rand(0, strlen($chars)-1)];
return $res;
}
private function synthesizeChar($char) {
$a = rand(1, 255);
$b = rand(1, 255);
return "(bit32.bxor($char, $a) + $b - $b - $a + $char - $char)";
}
private function synthesizeString($s) {
$res = [];
for ($i = 0; $i < strlen($s); $i++) {
$char = ord($s[$i]);
$a = rand(1, 200);
$b = rand(1, 200);
$op = rand(0, 3);
if ($op == 0) { $x = $char - ($a + $b); $res[] = "($x + $a + $b)"; }
elseif ($op == 1) { $x = $char + ($a - $b); $res[] = "($x - $a + $b)"; }
elseif ($op == 2) { $x = $char ^ $a ^ $b; $res[] = "bit32.bxor($x, $a, $b)"; }
else {
$c = rand(1, 100);
$x = ($char + $c) ^ $a;
$res[] = "bit32.bxor($x, $a) - $c";
}
$res[] = "string.char(" . $this->synthesizeChar(ord($s[$i])) . ")";
}
return "function() local r = ''; for _, v in ipairs({" . implode(",", $res) . "}) do r = r .. string.char(v) end return r end";
return "function() local _ = " . implode(" .. ", $res) . "; return _ end";
}
private function addConst($val) {
@ -98,244 +85,224 @@ class LuartexV3_2 {
}
private function compile() {
$this->addConst("Luartex V3.2 - Security Active");
// Inject deceptive logic at the beginning
$this->injectDeceptiveLogic();
$cleanCode = preg_replace('/--[[]*.*?[]]*--/s', '', $this->rawCode);
$cleanCode = preg_replace('/--.*$/m', '', $cleanCode);
$tokens = preg_split('/[;
]+/', $cleanCode);
$insts = [];
foreach ($tokens as $token) {
$token = trim($token);
if (empty($token)) continue;
// Randomly inject Ghost NOPs or State Morphs
if (rand(0, 4) == 0) {
$this->instructions[] = [$this->opMap['GHOST_NOP'], rand(0,255), rand(0,255), rand(0,255)];
$insts[] = [$this->opMap['GHOST_NOP'], rand(0,255), rand(0,255), rand(0,255)];
if (preg_match('/^(?:local\s+)?([a-zA-Z_]\w*)\s*=\s*{\s*}\s*$/', $token, $m)) {
$insts[] = [$this->opMap['NEWTABLE'], 0, 0, 0];
$this->emitSetGlobalInto($insts, 0, $m[1]);
}
if (rand(0, 10) == 0) {
$this->instructions[] = [$this->opMap['MUTATE_BYTECODE'], rand(0, 255), rand(0, 255), rand(0, 255)];
elseif (preg_match('/^([a-zA-Z_]\w*)\s*\[\s*["\']?(.*?)["\']?\s*\]\s*=\s*(.*)$/', $token, $m)) {
$this->emitTableSetInto($insts, $m[1], $m[2], $m[3]);
}
$this->instructions[] = [$this->opMap['ENTROPY_SYNC'], 0, 0, 0];
if (preg_match('/^(?:local\s+)?([a-zA-Z_]\w*)\s*=\s*{\}\s*$/', $token, $m)) {
$this->instructions[] = [$this->opMap['NEWTABLE'], 0, 0, 0];
$this->emitSemanticSetGlobal(0, $m[1]);
}
elseif (preg_match('/^([a-zA-Z_]\w*)\s*[.[\\\]\s*["\\\]?(.*?)["\\]?\s*[\\]]?\s*=\s*(.*)$/', $token, $m)) {
$this->emitTableSet($m[1], $m[2], $m[3]);
}
elseif (preg_match('/^([a-zA-Z_]\w*(?:[.:]\w*)*)\s*\((.*?)\)\s*$/', $token, $m)) {
$this->emitCall($m[1], $m[2]);
elseif (preg_match('/^([a-zA-Z_]\w*(?:\.\w*)*)\s*\((.*?)\)\s*$/', $token, $m)) {
$this->emitCallInto($insts, $m[1], $m[2]);
}
elseif (preg_match('/^(?:local\s+)?([a-zA-Z_]\w*)\s*=\s*(.*)$/', $token, $m)) {
$this->emitAssignment($m[1], $m[2]);
$this->emitAssignmentInto($insts, $m[1], $m[2]);
}
}
$this->instructions[] = [$this->opMap['RETURN'], 0, 0, 0];
}
private function injectDeceptiveLogic() {
// Fake Crypto Ops
for ($i = 0; $i < 3; $i++) {
$this->instructions[] = [$this->opMap['DECEPTIVE_TRAP'], rand(0,255), rand(0,255), rand(0,255)];
$insts[] = [$this->opMap['RETURN'], 0, 0, 0];
$this->instructions = [];
foreach ($insts as $i => $inst) {
$next = ($i < count($insts) - 1) ? 1 : 0;
$this->instructions[] = [$inst[0], $inst[1], $inst[2], $inst[3], $next];
}
}
private function emitSemanticGetGlobal($reg, $name) {
$this->instructions[] = [$this->opMap['FETCH_ENV'], $reg, 0, 0];
private function emitGetGlobalInto(&$insts, $reg, $name) {
$insts[] = [$this->opMap['FETCH_ENV'], $reg, 0, 0];
foreach (explode('.', $name) as $part) {
$kIdx = $this->addConst($this->synthesizeString($part));
$this->instructions[] = [$this->opMap['LOADK'], 250, $kIdx, 1];
$this->instructions[] = [$this->opMap['RESOLVE_SYMBOL'], $reg, $reg, 250];
$insts[] = [$this->opMap['LOADK'], 250, $kIdx, 1];
$insts[] = [$this->opMap['RESOLVE_SYMBOL'], $reg, $reg, 250];
}
}
private function emitSemanticSetGlobal($reg, $name) {
$this->instructions[] = [$this->opMap['FETCH_ENV'], 251, 0, 0];
private function emitSetGlobalInto(&$insts, $reg, $name) {
$insts[] = [$this->opMap['FETCH_ENV'], 251, 0, 0];
$kIdx = $this->addConst($this->synthesizeString($name));
$this->instructions[] = [$this->opMap['LOADK'], 252, $kIdx, 1];
$this->instructions[] = [$this->opMap['SETTABLE'], 251, 252, $reg];
$insts[] = [$this->opMap['LOADK'], 252, $kIdx, 1];
$insts[] = [$this->opMap['SETTABLE'], 251, 252, $reg];
}
private function emitTableSet($tableName, $key, $val) {
$this->emitSemanticGetGlobal(0, $tableName);
private function emitTableSetInto(&$insts, $tableName, $key, $val) {
$this->emitGetGlobalInto($insts, 0, $tableName);
$kIdx = $this->addConst($this->synthesizeString($key));
$this->instructions[] = [$this->opMap['LOADK'], 1, $kIdx, 1];
$insts[] = [$this->opMap['LOADK'], 1, $kIdx, 1];
$val = trim($val); $vReg = 2;
if (preg_match('/^["\\\](.*?)["\\]$/', $val, $vm)) {
if (preg_match('/^["\'](.*?)["\']$/', $val, $vm)) {
$vIdx = $this->addConst($this->synthesizeString($vm[1]));
$this->instructions[] = [$this->opMap['LOADK'], $vReg, $vIdx, 1];
$insts[] = [$this->opMap['LOADK'], $vReg, $vIdx, 1];
} elseif (is_numeric($val)) {
$vIdx = $this->addConst($val);
$this->instructions[] = [$this->opMap['LOADK'], $vReg, $vIdx, 0];
$insts[] = [$this->opMap['LOADK'], $vReg, $vIdx, 0];
} else {
$this->emitSemanticGetGlobal($vReg, $val);
$this->emitGetGlobalInto($insts, $vReg, $val);
}
$this->instructions[] = [$this->opMap['SETTABLE'], 0, 1, $vReg];
$insts[] = [$this->opMap['SETTABLE'], 0, 1, $vReg];
}
private function emitCall($funcName, $argStr) {
$this->emitSemanticGetGlobal(0, $funcName);
private function emitCallInto(&$insts, $funcName, $argStr) {
$this->emitGetGlobalInto($insts, 0, $funcName);
$args = [];
if (!empty(trim($argStr))) {
foreach (explode(',', $argStr) as $idx => $arg) {
$arg = trim($arg); $rIdx = $idx + 1;
if (preg_match('/^["\\\](.*?)["\\]$/', $arg, $m)) {
if (preg_match('/^["\'](.*?)["\']$/', $arg, $m)) {
$vIdx = $this->addConst($this->synthesizeString($m[1]));
$this->instructions[] = [$this->opMap['LOADK'], $rIdx, $vIdx, 1];
$insts[] = [$this->opMap['LOADK'], $rIdx, $vIdx, 1];
} elseif (is_numeric($arg)) {
$vIdx = $this->addConst($arg);
$this->instructions[] = [$this->opMap['LOADK'], $rIdx, $vIdx, 0];
$insts[] = [$this->opMap['LOADK'], $rIdx, $vIdx, 0];
} else {
$this->emitSemanticGetGlobal($rIdx, $arg);
$this->emitGetGlobalInto($insts, $rIdx, $arg);
}
$args[] = $rIdx;
}
}
$this->instructions[] = [$this->opMap['CALL'], 0, count($args), 0];
$insts[] = [$this->opMap['CALL'], 0, count($args), 0];
}
private function emitAssignment($var, $val) {
private function emitAssignmentInto(&$insts, $var, $val) {
$val = trim($val);
if (preg_match('/^["\\\](.*?)["\\]$/', $val, $m)) {
if (preg_match('/^["\'](.*?)["\']$/', $val, $m)) {
$vIdx = $this->addConst($this->synthesizeString($m[1]));
$this->instructions[] = [$this->opMap['LOADK'], 0, $vIdx, 1];
$insts[] = [$this->opMap['LOADK'], 0, $vIdx, 1];
} elseif (is_numeric($val)) {
$vIdx = $this->addConst($val);
$this->instructions[] = [$this->opMap['LOADK'], 0, $vIdx, 0];
$insts[] = [$this->opMap['LOADK'], 0, $vIdx, 0];
} else {
$this->emitSemanticGetGlobal(0, $val);
$this->emitGetGlobalInto($insts, 0, $val);
}
$this->emitSemanticSetGlobal(0, $var);
$this->emitSetGlobalInto($insts, 0, $var);
}
private function serializeAll() {
$bin = pack("N", count($this->instructions));
foreach ($this->instructions as $pc_idx => $inst) {
$pc = $pc_idx + 1;
$op = (int)$inst[0];
$mask = ($this->polyKey + $pc * 7) % 256;
$bin .= chr($op ^ $mask);
$bin .= chr((int)$inst[1] & 0xFF);
$bin .= pack("n", (int)$inst[2]);
$bin .= chr((int)$inst[3] & 0xFF);
private function serialize() {
$data = pack("N", count($this->instructions));
$data .= pack("N", count($this->constants));
foreach ($this->instructions as $idx => $inst) {
$pc = $idx + 1;
$data .= chr((int)$inst[0] ^ (($this->polyKey + $pc) % 256));
$data .= chr((int)$inst[1] ^ (($pc * 17) % 256));
$data .= pack("n", (int)$inst[2] ^ (($pc * 31) % 65535));
$data .= chr((int)$inst[3] ^ (($pc * 7) % 256));
$data .= chr((int)$inst[4] ^ (($pc * 13) % 256));
}
$bin .= pack("N", count($this->constants));
foreach ($this->constants as $c) {
$t = is_string($c) ? 1 : (is_numeric($c) ? 2 : 0);
$bin .= chr($t);
$data .= chr($t);
$s = (string)$c;
$bin .= pack("N", strlen($s)) . $s;
$data .= pack("N", strlen($s)) . $s;
}
$keyLen = count($this->keys); $enc = "";
for ($i = 0; $i < strlen($bin); $i++) {
$enc .= chr(ord($bin[$i]) ^ $this->keys[$i % $keyLen] ^ (($i * 31) % 256) ^ (($i + 13) % 256));
$keyLen = count($this->keys); $res = "";
for ($i = 0; $i < strlen($data); $i++) {
$res .= chr(ord($data[$i]) ^ $this->keys[$i % $keyLen] ^ (($i * 97) % 256));
}
return bin2hex($enc);
return bin2hex($res);
}
public function build() {
$this->compile();
$vars = [];
foreach(['k','b','e','f','d','c','v','stack','asm','poly','handlers','tamper','watchdog','fetch','tk','entropy','pc','rolling','inst','op','a','b_p','c_p','res','env','hash','sym','prev_op','state_hash','ctx','seed','morph','perm','corrupted','dispatcher','mutate','deceptive'] as $v) {
$vars[$v] = $this->genVar();
$v = [];
foreach(['k','b','e','f','d','c','v','stack','handlers','entropy','ptr','rolling','seed','poison','next_ptr','state','quantum','mirror','reality','obfuscated_op','h_idx'] as $var) {
$v[$var] = $this->genVar();
}
$k_str = implode(",", $this->keys);
$lua = "-- [[ Luartex V3.2 | https://discord.gg/GpucUKeCtF ]] --\n";
$lua .= "local " . $vars['k'] . " = { " . $k_str . " }; ";
$lua .= "local " . $vars['b'] . " = \"" . $this->serializeAll() . "\"; ";
$lua .= "local " . $vars['e'] . " = (getgenv and getgenv()) or (getfenv and getfenv(0)) or _G; ";
$lua = "-- [[ Luartex V11.0 | Quantum Singularity | https://discord.gg/GpucUKeCtF ]] --\n";
$lua .= "local " . $v['k'] . " = { " . $k_str . " }; ";
$lua .= "local " . $v['b'] . " = \"" . $this->serialize() . "\"; ";
$lua .= "local " . $v['e'] . " = (getgenv and getgenv()) or (getfenv and getfenv(0)) or _G; ";
$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) % 64) + 1; o[i] = bit32.bxor(b[i], " . $vars['k'] . "[k], ((i - 1) * 31) % 256, ((i - 1) + 13) % 256) end return o end; ";
$lua .= "local " . $vars['d'] . " = _D(_H(" . $vars['b'] . ")); ";
$lua .= "local function _D(b) local o = {}; for i = 1, #b do local k = " . $v['k'] . "[((i-1)%#" . $v['k'] . ")+1]; o[i] = bit32.bxor(b[i], k, ((i-1)*97)%256) end return o end; ";
$lua .= "local " . $v['d'] . " = _D(_H(" . $v['b'] . ")); ";
$lua .= "local function " . $vars['entropy'] . "() return bit32.bxor(math.floor(os.clock() * 1000) % 65536, collectgarbage('count') % 256, 0x5A) end; ";
$lua .= "local function _R32(b, p) return b[p]*16777216 + b[p+1]*65536 + b[p+2]*256 + b[p+3] end; ";
$lua .= "local function _R16(b, p) return b[p]*256 + b[p+1] end; ";
$lua .= "local ic = _R32(" . $vars['d'] . ", 1); local co = 5 + ic * 5; local cc = _R32(" . $vars['d'] . ", co); ";
$lua .= "local " . $vars['c'] . " = {}; local cu = co + 4; ";
$lua .= "for i = 1, cc do local t = " . $vars['d'] . "[cu]; cu = cu + 1; if t > 0 then local l = _R32(" . $vars['d'] . ", cu); cu = cu + 4; local s = ''; for j = 1, l do s = s .. string.char(" . $vars['d'] . "[cu]); cu = cu + 1 end; if t == 2 then " . $vars['c'] . "[i] = tonumber(s) else " . $vars['c'] . "[i] = s end else cu = cu + 1 end end; ";
$lua .= "local ic = _R32(" . $v['d'] . ", 1); local cc = _R32(" . $v['d'] . ", 5); ";
$lua .= "local " . $v['c'] . " = {}; local cu = 9 + ic*6; ";
$lua .= "for i = 1, cc do local t = " . $v['d'] . "[cu]; cu = cu + 1; if t > 0 then local l = _R32(" . $v['d'] . ", cu); cu = cu + 4; local s = ''; for j = 1, l do s = s .. string.char(" . $v['d'] . "[cu]); cu = cu + 1 end; if t == 2 then " . $v['c'] . "[i] = tonumber(s) else " . $v['c'] . "[i] = s end else cu = cu + 1 end end; ";
$lua .= "local " . $vars['fetch'] . " = function(p) local o = 5 + (p - 1) * 5; return " . $vars['d'] . "[o], " . $vars['d'] . "[o+1], _R16(" . $vars['d'] . ", o+2), " . $vars['d'] . "[o+4] end; ";
$lua .= "local " . $v['v'] . " = function() ";
$lua .= "local " . $v['stack'] . " = {}; local " . $v['ptr'] . " = 1; local " . $v['seed'] . " = " . $this->seed . "; ";
$lua .= "local " . $v['rolling'] . " = " . $this->polyKey . "; local " . $v['poison'] . " = 0; ";
$lua .= "local " . $v['handlers'] . " = {}; ";
$lua .= "local " . $vars['v'] . " = function() ";
$lua .= "local " . $vars['stack'] . " = {}; local " . $vars['pc'] . " = 1; local " . $vars['seed'] . " = " . $this->seed . " + " . $vars['entropy'] . "(); ";
$lua .= "local " . $vars['rolling'] . " = " . $vars['entropy'] . "(); local " . $vars['corrupted'] . " = false; ";
$lua .= "local " . $vars['handlers'] . " = {}; ";
// Unstable Opcode Mapping - Context Sensitive
$lua .= "local function " . $vars['dispatcher'] . "(op, seed, pc) return bit32.bxor(op, bit32.band(seed, 0xFF), bit32.band(pc, 0xFF)) % 256 end; ";
$lua .= "local function " . $v['quantum'] . "() local t1 = os.clock(); for i=1,1000 do end; return (os.clock()-t1) > 0.01 end; ";
foreach ($this->opMap as $name => $val) {
$lua .= $vars['handlers'] . "[" . $val . "] = function(a, b, c) ";
// Silent Failure logic
$lua .= "if " . $vars['corrupted'] . " then if math.random() > 0.5 then a = (a + 1) % 256 end if math.random() > 0.8 then return end end; ";
$lua .= $v['handlers'] . "[" . $val . "] = function(a, b, c) ";
$lua .= "if " . $v['poison'] . " > 0 then a = (a + " . $v['poison'] . ") % 256; if math.random() > 0.9 then return end end; ";
switch($name) {
case 'ENTROPY_SYNC':
$lua .= $vars['rolling'] . " = bit32.bxor(" . $vars['rolling'] . ", " . $vars['entropy'] . "()); ";
$lua .= "if " . $vars['rolling'] . " == 0 then " . $vars['corrupted'] . " = true end; ";
break;
case 'FETCH_ENV': $lua .= $vars['stack'] . "[a] = " . $vars['e'] . "; "; break;
case 'RESOLVE_SYMBOL': $lua .= $vars['stack'] . "[a] = " . $vars['stack'] . "[b][" . $vars['stack'] . "[c]]; "; break;
case 'LOADK': $lua .= "local v = " . $vars['c'] . "[b + 1]; if c == 1 then local f = loadstring('return ' .. v); if f then v = f()() end end; " . $vars['stack'] . "[a] = v; "; break;
case 'CALL': $lua .= "local f = " . $vars['stack'] . "[a]; local args = {}; for m = 1, b do args[m] = " . $vars['stack'] . "[a + m] end; if f then f((unpack or table.unpack)(args)) end; "; break;
case 'RETURN': $lua .= $vars['pc'] . " = -1; "; break;
case 'NEWTABLE': $lua .= $vars['stack'] . "[a] = {}; "; break;
case 'SETTABLE': $lua .= $vars['stack'] . "[a][" . $vars['stack'] . "[b]] = " . $vars['stack'] . "[c]; "; break;
case 'ADD': $lua .= "local v1, v2 = " . $vars['stack'] . "[b], " . $vars['stack'] . "[c]; if " . $vars['corrupted'] . " then " . $vars['stack'] . "[a] = (v1 or 0) + (v2 or 0) + math.random() else " . $vars['stack'] . "[a] = (v1 or 0) + (v2 or 0) end; "; break;
case 'MORPH_STATE': $lua .= $vars['seed'] . " = bit32.bxor(" . $vars['seed'] . ", a, b, c); "; break;
case 'GHOST_NOP': $lua .= $vars['seed'] . " = bit32.bxor(" . $vars['seed'] . ", " . $vars['rolling'] . ", " . $vars['pc'] . "); "; break;
case 'MUTATE_BYTECODE':
$lua .= "local target = 5 + (" . $vars['pc'] . " + a % 10) * 5; if target < # " . $vars['d'] . " then " . $vars['d'] . "[target] = bit32.bxor(" . $vars['d'] . "[target], b) end; ";
break;
case 'DECEPTIVE_TRAP':
$lua .= "local fake_crypto = function(d) local r = ''; for i=1,#d do r=r..string.char(bit32.bxor(d:byte(i), 0xAA)) end return r end; ";
$lua .= "local res = fake_crypto('ENCRYPTED_PAYLOAD_STUB'); ";
break;
case 'TAMPER_CHECK':
$lua .= "if debug.info(print, 's') ~= '=[C]' then " . $vars['corrupted'] . " = true end; ";
$lua .= $v['rolling'] . " = bit32.bxor(" . $v['rolling'] . ", math.floor(os.clock()*1000)%256); ";
break;
case 'FETCH_ENV': $lua .= $v['stack'] . "[a] = " . $v['e'] . "; "; break;
case 'RESOLVE_SYMBOL': $lua .= $v['stack'] . "[a] = " . $v['stack'] . "[b][" . $v['stack'] . "[c]]; "; break;
case 'LOADK': $lua .= "local v = " . $v['c'] . "[b + 1]; if c == 1 then v = v()() end; " . $v['stack'] . "[a] = v; "; break;
case 'CALL': $lua .= "local f = " . $v['stack'] . "[a]; local args = {}; for m = 1, b do args[m] = " . $v['stack'] . "[a+m] end; if f then f((unpack or table.unpack)(args)) end; "; break;
case 'RETURN': $lua .= $v['ptr'] . " = -1; "; break;
case 'NEWTABLE': $lua .= $v['stack'] . "[a] = {}; "; break;
case 'SETTABLE': $lua .= "if " . $v['stack'] . "[a] then " . $v['stack'] . "[a][" . $v['stack'] . "[b]] = " . $v['stack'] . "[c] end; "; break;
case 'ADD': $lua .= $v['stack'] . "[a] = (tonumber(" . $v['stack'] . "[b]) or 0) + (tonumber(" . $v['stack'] . "[c]) or 0); "; break;
case 'MUTATE_BYTECODE': $lua .= "local target = 9 + ((" . $v['ptr'] . " + a) % ic) * 6; " . $v['d'] . "[target] = bit32.bxor(" . $v['d'] . "[target], b); "; break;
case 'GHOST_NOP': $lua .= $v['seed'] . " = bit32.bxor(" . $v['seed'] . ", " . $v['rolling'] . ", a, b, c); "; break;
case 'TAMPER_CHECK': $lua .= "if " . $v['quantum'] . "() then " . $v['poison'] . " = " . $v['poison'] . " + 1 end; "; break;
case 'DECEPTIVE_TRAP': $lua .= "local _ = " . $v['e'] . ".string.rep('DECEIVE', a); "; break;
default: break;
}
$lua .= $vars['seed'] . " = bit32.bxor(" . $vars['seed'] . ", " . $val . ", a or 0) + 1; ";
$lua .= $v['seed'] . " = bit32.bxor(" . $v['seed'] . ", " . $val . ") + 1; ";
$lua .= "end; ";
}
$lua .= "while " . $vars['pc'] . " > 0 do ";
$lua .= "local raw_op, _a, _b, _c = " . $vars['fetch'] . "(" . $vars['pc'] . "); if not raw_op then break end; ";
$lua .= "local op = bit32.bxor(raw_op, (" . $this->polyKey . " + " . $vars['pc'] . " * 7) % 256); ";
$lua .= "while " . $v['ptr'] . " > 0 do ";
$lua .= "local o = 9 + (" . $v['ptr'] . " - 1) * 6; ";
$lua .= "local _op = bit32.bxor(" . $v['d'] . "[o], (" . $this->polyKey . " + " . $v['ptr'] . ") % 256); ";
$lua .= "local _a = bit32.bxor(" . $v['d'] . "[o+1], (" . $v['ptr'] . " * 17) % 256); ";
$lua .= "local _b = bit32.bxor(_R16(" . $v['d'] . ", o+2), (" . $v['ptr'] . " * 31) % 65535); ";
$lua .= "local _c = bit32.bxor(" . $v['d'] . "[o+4], (" . $v['ptr'] . " * 7) % 256); ";
$lua .= "local _nx = bit32.bxor(" . $v['d'] . "[o+5], (" . $v['ptr'] . " * 13) % 256); ";
// Operand Permutation evolves with seed and rolling entropy
$lua .= "local a, b, c; local " . $vars['perm'] . " = bit32.bxor(" . $vars['seed'] . ", " . $vars['rolling'] . ") % 3; ";
$lua .= "if " . $vars['perm'] . " == 0 then a,b,c = _a,_b,_c elseif " . $vars['perm'] . " == 1 then a,b,c = _b,_c,_a else a,b,c = _c,_a,_b end; ";
$lua .= "local a, b, c; local p = bit32.bxor(" . $v['seed'] . ", " . $v['ptr'] . ") % 3; ";
$lua .= "if p == 0 then a,b,c = _a,_b,_c elseif p == 1 then a,b,c = _b,_c,_a else a,b,c = _c,_a,_b end; ";
$lua .= "local h = " . $vars['handlers'] . "[op]; if h then h(a, b, c) end; ";
$lua .= "if " . $vars['pc'] . " > 0 then " . $vars['pc'] . " = " . $vars['pc'] . " + 1 end; ";
$lua .= "if " . $vars['pc'] . " % 50 == 0 then if task and task.wait then task.wait() elseif wait then wait() end end; ";
$lua .= "local h = " . $v['handlers'] . "[_op]; if h then h(a, b, c) end; ";
$lua .= "if " . $v['ptr'] . " > 0 then ";
$lua .= "if _nx == 0 then " . $v['ptr'] . " = -1 else " . $v['ptr'] . " = " . $v['ptr'] . " + _nx end; ";
$lua .= "end; ";
$lua .= "if " . $v['ptr'] . " % 50 == 0 then if task and task.wait then task.wait() end end; ";
$lua .= "end; ";
$lua .= "end; ";
$lua .= "pcall(" . $vars['v'] . "); ";
$lua .= "local s, e = pcall(" . $v['v'] . "); if not s and _G.LUARTEX_DEBUG then print('VM Error:', e) end; ";
return [
'success' => true,
'protected_code' => $lua,
'stats' => ['version' => 'V3.2 (Luartex)', 'poly_key' => $this->polyKey, 'seed' => $this->seed]
'stats' => ['version' => 'V11.0 (Quantum Singularity)', 'seed' => $this->seed, 'ILD' => 'Active']
];
}
}
try {
$vm = new LuartexV3_2($code);
$vm = new LuartexV11_0($code);
echo json_encode($vm->build());
} catch (Exception $e) {
echo json_encode(['success' => false, 'error' => $e->getMessage()]);

File diff suppressed because one or more lines are too long

52
test_v11_0.php Normal file
View File

@ -0,0 +1,52 @@
<?php
/**
* Test for Luartex V11.0 - Quantum Singularity Engine
*/
$test_code = '
print("Luartex V11.0 Quantum Singularity Activation")
local target = "QUANTUM_STATE_VERIFIED"
local val = 100
local multiplier = 5
local result = val * multiplier
print("Computed Result: " .. tostring(result))
local storage = {}
storage["key"] = "SECURE_DATA"
print("Storage Retrieve: " .. storage["key"])
if result == 500 then
print("Quantum Logic: STABLE")
else
print("Quantum Logic: COLLAPSED")
end
';
$url = 'http://localhost/process.php';
$options = [
'http' => [
'header' => "Content-type: application/json\r\n",
'method' => 'POST',
'content' => json_encode(['code' => $test_code]),
],
];
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) {
die("Error reaching process.php");
}
$response = json_decode($result, true);
if ($response && $response['success']) {
$protected_file = 'protected_v11_0.lua';
file_put_contents($protected_file, $response['protected_code']);
echo "Successfully generated $protected_file\n";
echo "Stats: " . json_encode($response['stats']) . "\n";
} else {
echo "Error: " . ($response['error'] ?? 'Unknown error') . "\n";
echo "Full response: " . $result . "\n";
}

View File

@ -1,24 +1,49 @@
<?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';
/**
* Test for Luartex V6.0 - Infinite Morph Engine
*/
$payload = json_encode(['code' => $code]);
$test_code = '
print("Luartex V6.0 Reality Test")
local secret = "INFINITE_MORPH_ACTIVE"
local data = {1, 2, 3, 4, 5}
local sum = 0
for i, v in ipairs(data) do
sum = sum + v
end
print("Checksum: " .. tostring(sum))
if sum == 15 then
print("Logic Integrity: PASSED")
else
print("Logic Integrity: POISONED")
end
';
$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']);
$url = 'http://localhost/process.php';
$options = [
'http' => [
'header' => "Content-type: application/json\r\n",
'method' => 'POST',
'content' => json_encode(['code' => $test_code]),
],
];
$response = curl_exec($ch);
curl_close($ch);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
$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";
if ($result === FALSE) {
die("Error reaching process.php");
}
$response = json_decode($result, true);
if ($response && $response['success']) {
$protected_file = 'protected_v6_0.lua';
file_put_contents($protected_file, $response['protected_code']);
echo "Successfully generated $protected_file\n";
echo "Stats: " . json_encode($response['stats']) . "\n";
} else {
echo "Obfuscation failed: " . ($res['error'] ?? 'Unknown error') . "\n";
echo "Response: " . $response . "\n";
}
echo "Error: " . ($response['error'] ?? 'Unknown error') . "\n";
echo "Full response: " . $result . "\n";
}