简体   繁体   中英

Decompile Luac files - dealing with encryption

I've read from other questions on this site that luac files can be decompiled if you know the lua version. I've also read that the lua version is stored in the 5th byte of the luac file (the header). However here's the first few bytes of a luac file I have:

1b 4c 4a 01 02 d1 01 00

To my eye the 5th byte is 02. Which suggests I'm dealing with a lua 0.2 file - I don't believe there is such a version!

The above issue has made me thing the file is possibly encrypted - I know nothing of lua encryption... literally nothing. Is it reasonably possible to decrypt and decompile the lua file in question? How might I start this process?

If it would be encrypted there would be some kind of key in the Lua interpreter; otherwise it would not be possible to execute the byte code. And if there is such a key it would have to be in each interpreter; ie it would be well known.

Generally if anything happened to the file it is more logical to be compressed, but even then you would normally have a readable header.

Of course, since this starts with a magic consisting of the characters ESC LJ Egor has already indicated the file format. Usually the Posix file utility (also present in cygwin or the new Linux layer for Windows) would help you out here.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM