lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


At 12:10 28/04/2006, you wrote:
Hi,

I'm working on a piece of software in LUA that might be part of a commercial application later on (or might become the application by itself, since LUA is so nice...) and I'm trying to find out if there is a good way to protect LUA code from the outside world? Of course I could compile it using luac, but that wouldn't stop somebody from disassembling it and getting the source code?

Well, as some totally un-thought-through thoughts...

- You could encrypt your script however you want and save it as a binary file. Then, when you want to run it, load the binary file, decrypt it to a long string and pass it to luaL_loadbuffer.

- You could change the order of the 'RESERVED' enum in llex.h (read the comment before that and do what it says). then compile the code. That way I guess an 'off the shelf' decompiler will probably have trouble understanding the compiled code.




Paul                            VPOP3 - Internet Email Server/Gateway
support@pscs.co.uk                      http://www.pscs.co.uk/