PY44N / LuaObfuscatorV2

A program that obfuscates Lua programs so no one can steal your source code
60 stars 9 forks source link

Deserializer changes broke bytecode interpretation #23

Open qux-bbb opened 3 weeks ago

qux-bbb commented 3 weeks ago

test.lua:

hello = 'hello'
print(hello)
len = string.len(hello)
print(len)
the_num = 1 + 2
print(the_num)
float_num = 3.14
print(float_num)

mytable = {}
mytable.foo = "hello world"
mytable.bar = 1 + 2
print(mytable)

function sayhello(name)
    print("hello, "..name)
end

This command can generate Out.lua:

cargo run -- --file test.lua

Then I try to run Out.lua, the error:

$ lua ./Out.lua 
lua: ./Out.lua:1: attempt to perform arithmetic on a nil value
stack traceback:
    ./Out.lua:1: in function <./Out.lua:1>
    (tail call): ?
    ./Out.lua:1: in function '_R'
    ./Out.lua:1: in function '_03'
    ./Out.lua:1: in function <./Out.lua:1>
    (tail call): ?
    ./Out.lua:1: in function 'a'
    ./Out.lua:1: in main chunk
    [C]: ?
PY44N commented 2 weeks ago

It looks like I broke something when I swapped out the deserializer. I'll do my best to fix it this week