lua-users home
lua-l archive

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


George Warner wrote:
Oh I believe you 100%. But unless you expect me to post all the other 160+
routines from this core library to the list (don't worry, won't happen) for
you to reverse engineer I was kinda hoping for a more automated solution.

If the routines aren't that big and you're the one that wrote them in the first place then I think you would go pretty quickly. Decompiling Lua opcodes is non-trivial, this is not a stack-based machine like Java's, or Smalltalk's, decompiling Lua code is more like decompiling C code.

Thanks for the translation thou. It was kinda interesting getting the magic
behind the smoke and mirrors explained. Wish now I had chosen a more complex
example. He he.

The VM isn't really complex, you see. :-) After you figure how upvalues and call/return work it should be a breeze, specially with your memory of the routines to guide you. If you're not the original author then partner with him on this. :-) And of course you have luac to check if you're doing it right (and understand the compilation will help you do the reverse process).

While surfing I did run across a windoze app called LuaDC.exe. I tried
running it on W98 and it launched a command-line window (which closed before
I could read anything) so I then tried it with DOS where it told me it
required windows. Anyone know of a Linux type app that will do this?


I did a google search for LuaDC and found version 0.9.20. Don't bother to find sources, it isn't for Lua 5. :-) Even if you found the source, porting it to Lua 5 would need a full rewrite; the Lua VM changed a lot in Lua 5 (it was stack-based before).

--
Fabio Mascarenhas