2

I have a lua file, which, when opened in Notepad++ shows a mixture of English (uncorrupted), understandable text, as well as a mixture of "NULS" "ETX's" and other strange symbols, before I delve into attempting to decompile this, I want to work out if it is even possible?

Any help appreciated, thanks.

S.Stevens
  • 378
  • 1
  • 5
  • 18

1 Answers1

6

First bytes of the compiled Lua file tell the version where the script was compiled in.

Try LuaDec. (5.1 - 5.3) https://github.com/viruscamp/luadec

Alternative project: Chunkspy. (It's only for 5.1 and 5.0.2.) http://chunkspy.luaforge.net/

For 5.1 and 5.0: https://sourceforge.net/projects/unluac

Spar
  • 1,582
  • 9
  • 16
  • Thank you, how do I find out the first byte of the Lua File? – S.Stevens Nov 21 '20 at 14:27
  • 1
    @S.Stevens You can first try using your file in LuaDec first, if it says incorrect version, you will look at the bytes. To look at the bytes you need any program to see bytes or hex, like HexDump. – Spar Nov 21 '20 at 14:32
  • I just had a quick look, the start of the file begins with "LuaQ", is this still possible? I don't have linux or git or any way of installing luadec... – S.Stevens Nov 21 '20 at 15:57
  • In the end I used "unluac", for anyone else who has this problem (also make sure you run cmd as admin)https://sourceforge.net/projects/unluac/ – S.Stevens Nov 21 '20 at 23:19
  • 1
    @S.Stevens Added your link as well – Spar Nov 22 '20 at 00:44