Revert to version 81b02a1

This commit is contained in:
Flatlogic Bot 2026-01-24 18:55:46 +00:00
parent 3adc4eb567
commit daa0ba3c02
8 changed files with 311 additions and 186 deletions

View File

@ -29,32 +29,25 @@ document.addEventListener('DOMContentLoaded', () => {
protectBtn.style.opacity = '0.5'; protectBtn.style.opacity = '0.5';
terminal.innerHTML = ''; terminal.innerHTML = '';
log(`INITIALIZING LUARTEX EXTREME KERNEL v3.5-DELTA`, 'info'); log(`INITIALIZING LUARTEX V11.0 QUANTUM SINGULARITY ENGINE`, 'info');
await sleep(300); await sleep(300);
log(`TARGET: ROBLOX / LUAU ENVIRONMENT`, 'info'); log(`PROTOCOL: ILD (LINKED INSTRUCTION DISPATCHING)`, 'info');
await sleep(400); await sleep(400);
log(`MAPPING: Randomized Opcode IDs (100-255)...`, 'info'); log(`QUANTUM: Synchronizing State-Hash with Environment Entropy...`, 'info');
await sleep(400); await sleep(400);
log(`ENCRYPTION: 4-Key XOR Rotation on Constants...`, 'info'); log(`MIRROR: Deploying Deceptive Logic Reality Paths...`, 'info');
await sleep(400); await sleep(400);
log(`VIRTUALIZATION: Register-based Dispatcher...`, 'info'); log(`SINGULARITY: Collapsing Constant Space into Transient Synthesis...`, 'info');
await sleep(300); await sleep(300);
log(`VIRTUALIZATION: Dot-Syntax Global Resolver...`, 'info'); log(`TRAP: Arming Quantum Observation Detectors...`, 'info');
await sleep(300); await sleep(300);
log(`SECURITY: Interleaving Anti-Hook Integrity Guards...`, 'info'); log(`NEURAL: Mapping Opcode Meaning to Execution History...`, 'info');
await sleep(400); await sleep(400);
log(`SECURITY: Real-time tick() Timing Verification...`, 'info'); log(`SPAGHETTI: Shuffling Instruction Topology...`, 'info');
await sleep(300); await sleep(300);
log(`SECURITY: debug.info Native Source Checks...`, 'info');
await sleep(200);
log(`SECURITY: Anti-Tamper State Synchronization...`, 'info');
await sleep(200);
log(`STRENGTHENING: Injecting Junk Opcodes...`, 'info');
await sleep(100);
try { try {
const response = await fetch('process.php', { const response = await fetch('process.php', {
@ -68,9 +61,9 @@ document.addEventListener('DOMContentLoaded', () => {
if (data.success) { if (data.success) {
await sleep(500); await sleep(500);
outputArea.value = data.protected_code; outputArea.value = data.protected_code;
log(`SUCCESS: VM Locked. Final Size: ${data.stats.protected_size}b`, 'success'); log(`SUCCESS: Luartex V11.0 Quantum Singularity VM Online.`, 'success');
log(`VM Status: ULTRA-SECURE | Environment: DELTA COMPATIBLE`, 'success'); log(`Traceability: ZERO | Observation Resistance: ABSOLUTE`, 'success');
log(`Watermark: "ts was obfuscated by Luartex V3.2" injected.`, 'info'); log(`Topology: SPAGHETTI-LINKED | Seed: ${data.stats.seed}`, 'success');
} else { } else {
log(`CRITICAL ERROR: ${data.error}`, 'warn'); log(`CRITICAL ERROR: ${data.error}`, 'warn');
} }
@ -86,7 +79,7 @@ document.addEventListener('DOMContentLoaded', () => {
if (!outputArea.value) return; if (!outputArea.value) return;
navigator.clipboard.writeText(outputArea.value); navigator.clipboard.writeText(outputArea.value);
const originalText = copyBtn.textContent; const originalText = copyBtn.textContent;
copyBtn.textContent = 'LOCKED & COPIED'; copyBtn.textContent = 'COPIED';
setTimeout(() => copyBtn.textContent = originalText, 2000); setTimeout(() => copyBtn.textContent = originalText, 2000);
}); });
}); });

View File

@ -1,6 +1,6 @@
<?php <?php
$projectName = $_SERVER['PROJECT_NAME'] ?? 'Luartex'; $projectName = $_SERVER['PROJECT_NAME'] ?? 'Luartex';
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Enterprise Luau Obfuscation & Custom VM Protection'; $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Advanced Quantum Singularity Luau Obfuscation';
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
@ -23,13 +23,13 @@ $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Enterprise Luau Obfusc
<nav class="navbar"> <nav class="navbar">
<a href="/" class="brand">LUAR<span>TEX</span></a> <a href="/" class="brand">LUAR<span>TEX</span></a>
<div style="flex-grow: 1;"></div> <div style="flex-grow: 1;"></div>
<div class="badge">Hyperion V10.0 (DIP)</div> <div class="badge">Luartex V11.0 (Quantum Singularity)</div>
</nav> </nav>
<main class="container-main"> <main class="container-main">
<header style="margin-bottom: 3rem;"> <header style="margin-bottom: 3rem;">
<h1 style="font-size: 3rem; margin-bottom: 0.5rem; letter-spacing: -2px;">Protect your <span style="color: var(--accent-color);">Luau</span> scripts.</h1> <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 utilizes a proprietary custom VM architecture to transform your scripts into secure, encrypted bytecode that is resistant to reverse-engineering. Optimized for Roblox Executors.</p> <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> </header>
<div class="workspace"> <div class="workspace">
@ -54,11 +54,13 @@ print('Hello Luartex!')"></textarea>
</div> </div>
<div class="controls" style="justify-content: center;"> <div class="controls" style="justify-content: center;">
<button id="protect-btn" class="btn-primary" style="padding: 1rem 4rem; font-size: 1.2rem;">Obfuscate with Hyperion V10.0</button> <button id="protect-btn" class="btn-primary" style="padding: 1rem 4rem; font-size: 1.2rem;">Protect with Luartex V11.0</button>
</div> </div>
<div id="terminal" class="terminal-log"> <div id="terminal" class="terminal-log">
<div class="log-entry log-info">[SYSTEM] Hyperion V10.0 Engine Initialized. Dynamic Instruction Polymorphism (DIP) & Seed Evolution Active.</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> </div>
</main> </main>

View File

@ -15,27 +15,23 @@ if (!$input || empty($input['code'])) {
$code = $input['code']; $code = $input['code'];
/** /**
* Hyperion V10.0 - Dynamic Instruction Polymorphism * Luartex V11.0 - Quantum Singularity Engine
* Features: * "The final frontier of untraceable execution."
* - Dynamic Opcode Mapping (Seed-based)
* - Operand Permutation (A, B, C swap roles)
* - Instruction Ghosting & Seed Evolution
* - Semantic Flattening & Environmental Entanglement (inherited)
*/ */
class LuartexHyperionV10_0 { class LuartexV11_0 {
private $rawCode; private $rawCode;
private $constants = []; private $constants = [];
private $instructions = []; private $instructions = [];
private $keys = []; private $keys = [];
private $opMap = []; private $opMap = [];
private $polyKey;
private $seed; private $seed;
private $polyKey;
public function __construct($code) { public function __construct($code) {
$this->rawCode = $code; $this->rawCode = $code;
$this->polyKey = rand(50, 200); $this->seed = rand(100000, 999999);
$this->seed = rand(1000, 9999); $this->polyKey = rand(1, 255);
for ($i = 0; $i < 32; $i++) { for ($i = 0; $i < 256; $i++) {
$this->keys[] = rand(0, 255); $this->keys[] = rand(0, 255);
} }
$this->setupOpcodes(); $this->setupOpcodes();
@ -48,8 +44,9 @@ class LuartexHyperionV10_0 {
'RETURN', 'GETTABLE', 'SETTABLE', 'NEWTABLE', 'RETURN', 'GETTABLE', 'SETTABLE', 'NEWTABLE',
'TAMPER_CHECK', 'ENTROPY_SYNC', 'TAMPER_CHECK', 'ENTROPY_SYNC',
'FETCH_ENV', 'RESOLVE_SYMBOL', 'FETCH_ENV', 'RESOLVE_SYMBOL',
'MUTATE_BYTECODE', 'COMPUTE_PC', 'MUTATE_BYTECODE', 'COMPUTE_JUMP',
'MORPH_STATE', 'GHOST_NOP' 'GHOST_NOP', 'DECEPTIVE_TRAP',
'JUMP', 'JUMP_IF'
]; ];
shuffle($ops); shuffle($ops);
foreach ($ops as $op) { foreach ($ops as $op) {
@ -57,28 +54,25 @@ class LuartexHyperionV10_0 {
} }
} }
private function genVar($len = 24) { private function genVar($len = 12) {
$sets = ['l1Ii', 'O0Q', 'uvvw', 'nmM', 'S5s', 'Z2z', 'B8b', 'g9q']; $chars = 'lIi1OQuvwnmMS5zZ2B8bg9q';
$res = '_'; $res = '_';
for($i=0; $i<$len; $i++) { for($i=0; $i<$len; $i++) $res .= $chars[rand(0, strlen($chars)-1)];
$set = $sets[array_rand($sets)]; return $res;
$res .= $set[rand(0, strlen($set)-1)]; }
}
return $res . bin2hex(random_bytes(2)); 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) { private function synthesizeString($s) {
$res = []; $res = [];
for ($i = 0; $i < strlen($s); $i++) { for ($i = 0; $i < strlen($s); $i++) {
$char = ord($s[$i]); $res[] = "string.char(" . $this->synthesizeChar(ord($s[$i])) . ")";
$a = rand(1, 100);
$b = rand(1, 100);
$op = rand(0, 2);
if ($op == 0) { $x = $char - ($a + $b); $res[] = "($x + $a + $b)"; }
elseif ($op == 1) { $x = $char + ($a - $b); $res[] = "($x - $a + $b)"; }
else { $x = $char ^ $a ^ $b; $res[] = "bit32.bxor($x, $a, $b)"; }
} }
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) { private function addConst($val) {
@ -91,213 +85,225 @@ class LuartexHyperionV10_0 {
} }
private function compile() { private function compile() {
$this->addConst("Hyperion V10.0 - DIP Engine Active");
$cleanCode = preg_replace('/--[[]*.*?[]]*--/s', '', $this->rawCode); $cleanCode = preg_replace('/--[[]*.*?[]]*--/s', '', $this->rawCode);
$cleanCode = preg_replace('/--.*$/m', '', $cleanCode); $cleanCode = preg_replace('/--.*$/m', '', $cleanCode);
$tokens = preg_split('/[;\n]+/', $cleanCode); $tokens = preg_split('/[;
]+/', $cleanCode);
$insts = [];
foreach ($tokens as $token) { foreach ($tokens as $token) {
$token = trim($token); $token = trim($token);
if (empty($token)) continue; if (empty($token)) continue;
// Randomly inject Ghost NOPs to evolve the state $insts[] = [$this->opMap['GHOST_NOP'], rand(0,255), rand(0,255), rand(0,255)];
if (rand(0, 5) == 0) {
$this->instructions[] = [$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]);
} }
elseif (preg_match('/^([a-zA-Z_]\w*)\s*\[\s*["\']?(.*?)["\']?\s*\]\s*=\s*(.*)$/', $token, $m)) {
$this->instructions[] = [$this->opMap['ENTROPY_SYNC'], 0, 0, 0]; $this->emitTableSetInto($insts, $m[1], $m[2], $m[3]);
if (preg_match('/^(?:local\s+)?([a-zA-Z_]\w*)\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)) { elseif (preg_match('/^([a-zA-Z_]\w*(?:\.\w*)*)\s*\((.*?)\)\s*$/', $token, $m)) {
$this->emitTableSet($m[1], $m[2], $m[3]); $this->emitCallInto($insts, $m[1], $m[2]);
}
elseif (preg_match('/^([a-zA-Z_]\w*(?:[.:]\w*)*)\s*\((.*?)\)$/', $token, $m)) {
$this->emitCall($m[1], $m[2]);
} }
elseif (preg_match('/^(?:local\s+)?([a-zA-Z_]\w*)\s*=\s*(.*)$/', $token, $m)) { 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]; $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) { private function emitGetGlobalInto(&$insts, $reg, $name) {
$this->instructions[] = [$this->opMap['FETCH_ENV'], $reg, 0, 0]; $insts[] = [$this->opMap['FETCH_ENV'], $reg, 0, 0];
foreach (explode('.', $name) as $part) { foreach (explode('.', $name) as $part) {
$kIdx = $this->addConst($this->synthesizeString($part)); $kIdx = $this->addConst($this->synthesizeString($part));
$this->instructions[] = [$this->opMap['LOADK'], 250, $kIdx, 1]; $insts[] = [$this->opMap['LOADK'], 250, $kIdx, 1];
$this->instructions[] = [$this->opMap['RESOLVE_SYMBOL'], $reg, $reg, 250]; $insts[] = [$this->opMap['RESOLVE_SYMBOL'], $reg, $reg, 250];
} }
} }
private function emitSemanticSetGlobal($reg, $name) { private function emitSetGlobalInto(&$insts, $reg, $name) {
$this->instructions[] = [$this->opMap['FETCH_ENV'], 251, 0, 0]; $insts[] = [$this->opMap['FETCH_ENV'], 251, 0, 0];
$kIdx = $this->addConst($this->synthesizeString($name)); $kIdx = $this->addConst($this->synthesizeString($name));
$this->instructions[] = [$this->opMap['LOADK'], 252, $kIdx, 1]; $insts[] = [$this->opMap['LOADK'], 252, $kIdx, 1];
$this->instructions[] = [$this->opMap['SETTABLE'], 251, 252, $reg]; $insts[] = [$this->opMap['SETTABLE'], 251, 252, $reg];
} }
private function emitTableSet($tableName, $key, $val) { private function emitTableSetInto(&$insts, $tableName, $key, $val) {
$this->emitSemanticGetGlobal(0, $tableName); $this->emitGetGlobalInto($insts, 0, $tableName);
$kIdx = $this->addConst($this->synthesizeString($key)); $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; $val = trim($val); $vReg = 2;
if (preg_match('/^["\\](.*)["\\]$/', $val, $vm)) { if (preg_match('/^["\'](.*?)["\']$/', $val, $vm)) {
$vIdx = $this->addConst($this->synthesizeString($vm[1])); $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)) { } elseif (is_numeric($val)) {
$vIdx = $this->addConst($val); $vIdx = $this->addConst($val);
$this->instructions[] = [$this->opMap['LOADK'], $vReg, $vIdx, 0]; $insts[] = [$this->opMap['LOADK'], $vReg, $vIdx, 0];
} else { } 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) { private function emitCallInto(&$insts, $funcName, $argStr) {
$this->emitSemanticGetGlobal(0, $funcName); $this->emitGetGlobalInto($insts, 0, $funcName);
$args = []; $args = [];
if (!empty(trim($argStr))) { if (!empty(trim($argStr))) {
foreach (explode(',', $argStr) as $idx => $arg) { foreach (explode(',', $argStr) as $idx => $arg) {
$arg = trim($arg); $rIdx = $idx + 1; $arg = trim($arg); $rIdx = $idx + 1;
if (preg_match('/^["\\](.*)["\\]$/', $arg, $m)) { if (preg_match('/^["\'](.*?)["\']$/', $arg, $m)) {
$vIdx = $this->addConst($this->synthesizeString($m[1])); $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)) { } elseif (is_numeric($arg)) {
$vIdx = $this->addConst($arg); $vIdx = $this->addConst($arg);
$this->instructions[] = [$this->opMap['LOADK'], $rIdx, $vIdx, 0]; $insts[] = [$this->opMap['LOADK'], $rIdx, $vIdx, 0];
} else { } else {
$this->emitSemanticGetGlobal($rIdx, $arg); $this->emitGetGlobalInto($insts, $rIdx, $arg);
} }
$args[] = $rIdx; $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); $val = trim($val);
if (preg_match('/^["\\](.*)["\\]$/', $val, $m)) { if (preg_match('/^["\'](.*?)["\']$/', $val, $m)) {
$vIdx = $this->addConst($this->synthesizeString($m[1])); $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)) { } elseif (is_numeric($val)) {
$vIdx = $this->addConst($val); $vIdx = $this->addConst($val);
$this->instructions[] = [$this->opMap['LOADK'], 0, $vIdx, 0]; $insts[] = [$this->opMap['LOADK'], 0, $vIdx, 0];
} else { } else {
$this->emitSemanticGetGlobal(0, $val); $this->emitGetGlobalInto($insts, 0, $val);
} }
$this->emitSemanticSetGlobal(0, $var); $this->emitSetGlobalInto($insts, 0, $var);
} }
private function serializeAll() { private function serialize() {
$bin = pack("N", count($this->instructions)); $data = pack("N", count($this->instructions));
foreach ($this->instructions as $pc_idx => $inst) { $data .= pack("N", count($this->constants));
$pc = $pc_idx + 1;
$op = (int)$inst[0]; foreach ($this->instructions as $idx => $inst) {
$mask = ($this->polyKey + $pc) % 256; $pc = $idx + 1;
$bin .= chr($op ^ $mask); $data .= chr((int)$inst[0] ^ (($this->polyKey + $pc) % 256));
$bin .= chr((int)$inst[1] & 0xFF); $data .= chr((int)$inst[1] ^ (($pc * 17) % 256));
$bin .= pack("n", (int)$inst[2]); $data .= pack("n", (int)$inst[2] ^ (($pc * 31) % 65535));
$bin .= chr((int)$inst[3] & 0xFF); $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) { foreach ($this->constants as $c) {
$t = is_string($c) ? 1 : (is_numeric($c) ? 2 : 0); $t = is_string($c) ? 1 : (is_numeric($c) ? 2 : 0);
$bin .= chr($t); $data .= chr($t);
$s = (string)$c; $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++) { $keyLen = count($this->keys); $res = "";
$enc .= chr(ord($bin[$i]) ^ $this->keys[$i % $keyLen] ^ (($i * 31) % 256)); 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() { public function build() {
$this->compile(); $this->compile();
$vars = []; $v = [];
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'] as $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) {
$vars[$v] = $this->genVar(); $v[$var] = $this->genVar();
} }
$k_str = implode(",", $this->keys); $k_str = implode(",", $this->keys);
$lua = "-- [[ Hyperion Engine V10.0 - DIP ]] --\n"; $lua = "-- [[ Luartex V11.0 | Quantum Singularity | https://discord.gg/GpucUKeCtF ]] --\n";
$lua .= "local " . $vars['k'] . " = { " . $k_str . " }; "; $lua .= "local " . $v['k'] . " = { " . $k_str . " }; ";
$lua .= "local " . $vars['b'] . " = \"" . $this->serializeAll() . "\"; "; $lua .= "local " . $v['b'] . " = \"" . $this->serialize() . "\"; ";
$lua .= "local " . $vars['e'] . " = (getgenv and getgenv()) or (getfenv and getfenv(0)) or _G; "; $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 _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], " . $vars['k'] . "[k], ((i - 1) * 31) % 256) end return o end; "; $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 " . $vars['d'] . " = _D(_H(" . $vars['b'] . ")); "; $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, 0x1337) 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 _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 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 ic = _R32(" . $v['d'] . ", 1); local cc = _R32(" . $v['d'] . ", 5); ";
$lua .= "local " . $vars['c'] . " = {}; local cu = co + 4; "; $lua .= "local " . $v['c'] . " = {}; local cu = 9 + ic*6; ";
$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 .= "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 function " . $v['quantum'] . "() local t1 = os.clock(); for i=1,1000 do end; return (os.clock()-t1) > 0.01 end; ";
$lua .= "local " . $vars['stack'] . " = {}; local " . $vars['pc'] . " = 1; local " . $vars['seed'] . " = " . $this->seed . "; ";
$lua .= "local " . $vars['rolling'] . " = " . $vars['entropy'] . "(); local " . $vars['handlers'] . " = {}; ";
// Morphing Function
$lua .= "local function " . $vars['morph'] . "(op, seed, pc) return bit32.bxor(op, bit32.band(seed, 0xFF), bit32.band(pc, 0xFF)) % 256 end; ";
// Dynamic Handler Population
foreach ($this->opMap as $name => $val) { foreach ($this->opMap as $name => $val) {
$lua .= $vars['handlers'] . "[" . $val . "] = function(a, b, c) "; $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) { switch($name) {
case 'ENTROPY_SYNC': $lua .= $vars['rolling'] . " = bit32.bxor(" . $vars['rolling'] . ", " . $vars['entropy'] . "()); "; break; case 'ENTROPY_SYNC':
case 'FETCH_ENV': $lua .= $vars['stack'] . "[a] = " . $vars['e'] . "; "; break; $lua .= $v['rolling'] . " = bit32.bxor(" . $v['rolling'] . ", math.floor(os.clock()*1000)%256); ";
case 'RESOLVE_SYMBOL': $lua .= $vars['stack'] . "[a] = " . $vars['stack'] . "[b][" . $vars['stack'] . "[c]]; "; break; 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 'FETCH_ENV': $lua .= $v['stack'] . "[a] = " . $v['e'] . "; "; 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 'RESOLVE_SYMBOL': $lua .= $v['stack'] . "[a] = " . $v['stack'] . "[b][" . $v['stack'] . "[c]]; "; break;
case 'RETURN': $lua .= $vars['pc'] . " = -1; "; break; case 'LOADK': $lua .= "local v = " . $v['c'] . "[b + 1]; if c == 1 then v = v()() end; " . $v['stack'] . "[a] = v; "; break;
case 'NEWTABLE': $lua .= $vars['stack'] . "[a] = {}; "; 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 'SETTABLE': $lua .= $vars['stack'] . "[a][" . $vars['stack'] . "[b]] = " . $vars['stack'] . "[c]; "; break; case 'RETURN': $lua .= $v['ptr'] . " = -1; "; break;
case 'ADD': $lua .= $vars['stack'] . "[a] = " . $vars['stack'] . "[b] + " . $vars['stack'] . "[c]; "; break; case 'NEWTABLE': $lua .= $v['stack'] . "[a] = {}; "; break;
case 'MORPH_STATE': $lua .= $vars['seed'] . " = bit32.bxor(" . $vars['seed'] . ", a, b, c); "; break; case 'SETTABLE': $lua .= "if " . $v['stack'] . "[a] then " . $v['stack'] . "[a][" . $v['stack'] . "[b]] = " . $v['stack'] . "[c] end; "; break;
case 'GHOST_NOP': $lua .= $vars['seed'] . " = bit32.bxor(" . $vars['seed'] . ", " . $vars['rolling'] . "); "; 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; default: break;
} }
// Evolution of seed after every instruction $lua .= $v['seed'] . " = bit32.bxor(" . $v['seed'] . ", " . $val . ") + 1; ";
$lua .= $vars['seed'] . " = bit32.bxor(" . $vars['seed'] . ", " . $val . ", a or 0) + 1; ";
$lua .= "end; "; $lua .= "end; ";
} }
$lua .= "while " . $vars['pc'] . " > 0 do "; $lua .= "while " . $v['ptr'] . " > 0 do ";
$lua .= "local raw_op, _a, _b, _c = " . $vars['fetch'] . "(" . $vars['pc'] . "); if not raw_op then break end; "; $lua .= "local o = 9 + (" . $v['ptr'] . " - 1) * 6; ";
$lua .= "local op = bit32.bxor(raw_op, (" . $this->polyKey . " + " . $vars['pc'] . ") % 256); "; $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 based on seed $lua .= "local a, b, c; local p = bit32.bxor(" . $v['seed'] . ", " . $v['ptr'] . ") % 3; ";
$lua .= "local a, b, c; local " . $vars['perm'] . " = " . $vars['seed'] . " % 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 .= "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 h = " . $vars['handlers'] . "[op]; if h then h(a, b, c) end; "; $lua .= "local h = " . $v['handlers'] . "[_op]; if h then h(a, b, c) end; ";
$lua .= "if " . $vars['pc'] . " > 0 then " . $vars['pc'] . " = " . $vars['pc'] . " + 1 end; "; $lua .= "if " . $v['ptr'] . " > 0 then ";
$lua .= "if " . $vars['pc'] . " % 100 == 0 then if task and task.wait then task.wait() elseif wait then wait() end end; "; $lua .= "if _nx == 0 then " . $v['ptr'] . " = -1 else " . $v['ptr'] . " = " . $v['ptr'] . " + _nx end; ";
$lua .= "end; "; $lua .= "end; ";
$lua .= "pcall(" . $vars['v'] . "); "; $lua .= "if " . $v['ptr'] . " % 50 == 0 then if task and task.wait then task.wait() end end; ";
$lua .= "end; ";
$lua .= "end; ";
$lua .= "local s, e = pcall(" . $v['v'] . "); if not s and _G.LUARTEX_DEBUG then print('VM Error:', e) end; ";
return [ return [
'success' => true, 'success' => true,
'protected_code' => $lua, 'protected_code' => $lua,
'stats' => ['version' => '10.0-DIP', 'poly_key' => $this->polyKey, 'seed' => $this->seed] 'stats' => ['version' => 'V11.0 (Quantum Singularity)', 'seed' => $this->seed, 'ILD' => 'Active']
]; ];
} }
} }
try { try {
$vm = new LuartexHyperionV10_0($code); $vm = new LuartexV11_0($code);
echo json_encode($vm->build()); echo json_encode($vm->build());
} catch (Exception $e) { } catch (Exception $e) {
echo json_encode(['success' => false, 'error' => $e->getMessage()]); echo json_encode(['success' => false, 'error' => $e->getMessage()]);
} }

2
protected_v3_2.lua Normal file

File diff suppressed because one or more lines are too long

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";
}

45
test_v3_2.php Normal file
View File

@ -0,0 +1,45 @@
<?php
/**
* Test script for Luartex V3.2
*/
$test_code = "
local x = 10
local y = 20
local z = x + y
print('The sum of x and y is: ' .. tostring(z))
local myTable = {}
myTable['secret'] = 'LuartexV3.2'
print('Secret retrieved: ' .. myTable['secret'])
";
echo "Testing Luartex V3.2 Protection...\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' => $test_code]));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
$data = json_decode($response, true);
if ($data && $data['success']) {
echo "SUCCESS: Obfuscation completed.\n";
echo "Stats: " . json_encode($data['stats']) . "\n";
$protected_file = 'protected_v3_2.lua';
file_put_contents($protected_file, $data['protected_code']);
echo "Protected code saved to $protected_file\n";
// Check if the watermark is present
if (strpos($data['protected_code'], 'Luartex V3.2 | https://discord.gg/GpucUKeCtF') !== false) {
echo "VERIFIED: Watermark present.\n";
} else {
echo "FAILED: Watermark missing!\n";
}
} else {
echo "FAILED: " . ($data['error'] ?? 'Unknown error') . "\n";
}
curl_close($ch);

View File

@ -1,24 +1,49 @@
<?php <?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'); $url = 'http://localhost/process.php';
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $options = [
curl_setopt($ch, CURLOPT_POST, true); 'http' => [
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); 'header' => "Content-type: application/json\r\n",
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); 'method' => 'POST',
'content' => json_encode(['code' => $test_code]),
],
];
$response = curl_exec($ch); $context = stream_context_create($options);
curl_close($ch); $result = file_get_contents($url, false, $context);
$res = json_decode($response, true); if ($result === FALSE) {
if ($res && $res['success']) { die("Error reaching process.php");
$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"; $response = json_decode($result, true);
echo "Stats: " . json_encode($res['stats']) . "\n";
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 { } else {
echo "Obfuscation failed: " . ($res['error'] ?? 'Unknown error') . "\n"; echo "Error: " . ($response['error'] ?? 'Unknown error') . "\n";
echo "Response: " . $response . "\n"; echo "Full response: " . $result . "\n";
} }