This commit is contained in:
Flatlogic Bot 2026-01-31 18:59:41 +00:00
parent d2c45727f6
commit 8aff31c36e
3 changed files with 1 additions and 57 deletions

View File

@ -97,7 +97,7 @@ local function {v['DEC']}(data)
end;
return table.concat(res);
end;
local {v['INST']}={v['DEC']}(''{inst_b64}');
local {v['INST']}={v['DEC']}('{inst_b64}');
local {v['CONSTS']}={v['JSON']}:JSONDecode([=[{json.dumps(consts)}]=]);
local {v['EXEC']}=function()
local {v['REGS']}={{}};

View File

@ -1,56 +0,0 @@
from core.obfuscator import obfuscate
import re
test_cases = [
"""
local a = 10
print(a)
""",
"""
game:GetService("Players").LocalPlayer:Kick("Test")
""",
"""
return 123
""",
"""
x = 5
x = x + 1
print(x)
""",
"""
local t = {a = 1}
t.a = 2
print(t.a)
"""
]
def check_syntax(lua_code):
# Basic check for balanced quotes and parens in the generated code
# Also check for the specific patterns we fixed
if "''" in lua_code and "(''" not in lua_code: # Check for the fixed inst_b64 part
# Note: ('' is fine for DEC function call if it was meant to be that, but we changed it to (')
pass
# Check for "task and task.spawn or spawn(" without surrounding parens
# Our fix: (task and task.spawn or spawn)(...
if "task and task.spawn or spawn(" in lua_code:
if "(task and task.spawn or spawn)(" not in lua_code:
return False, "Missing parentheses around SPW"
# Check for empty string (failed obfuscation)
if not lua_code.strip():
return False, "Empty output"
# Check for error comments
if "-- Obfuscation Error" in lua_code:
return False, "Obfuscation Error detected"
return True, "OK"
for i, code in enumerate(test_cases):
obfuscated = obfuscate(code)
success, msg = check_syntax(obfuscated)
print(f"Test {i}: {success} - {msg}")
if not success:
print(f"Code: {code}")
print(f"Obfuscated snippet: {obfuscated[:200]}...")