efrederickson / XFuscator

Most advanced Lua obfuscator 3V4R
159 stars 57 forks source link

Love2D #2

Open tsteinholz opened 8 years ago

tsteinholz commented 8 years ago

Is there a way to do this in Love2D? Whenever I try to obfuscate a source file, I get an error from Love, something like "attempt to call a nil value". What is the source of the error or why doesn't it work in love? In my example I obfuscated a single lib file (that i wrote) which should just return a module. So the other files shouldn't be affected by how the file executes logic so long as it does.

Full stacktrace:

Error: lib/screens/screen.lua:1: attempt to call a nil value
stack traceback:
    lib/screens/screen.lua:1: in main chunk
    [C]: in function 'require'
    main.lua:17: in main chunk
    [C]: in function 'require'
    [string "boot.lua"]:428: in function <[string "boot.lua"]:274>
    [C]: in function 'xpcall'

Love runs embedded lua5.1 and I ran this script in 5.3 so that would explain that error I guess.

I'm having issues trying to run the script in 5.1 though.

output of the xfuscator is now

lua5.1 XFuscator.lua ../../game/lib/screens/screen.lua
-------------------------------------------------------------------------------
------------------ XFUSCATOR - THE BEST LUA OBFUSCATOR 3V4R ------------------
------------------------ Copyright (C) 2012-2013 LoDC ------------------------
---------- Version 2.0 b1 : https://github.com/mlnlover11/XFuscator ----------
-------------------------------------------------------------------------------

Inital parsing ...
Extracting constants ...
Precompiling ...
-- Failed: ./LAT_src/Lua51/Disassembler.lua:48: Could not load integer
-- Time taken:  0
quanmanss11 commented 1 year ago

https://raphytator.itch.io/lua-obfuscator (lua obfuscator for love2d)