ferib / LuaDecompiler-Web

Website with REST API for my LuaDecompiler
6 stars 2 forks source link

Please add support for LUA 5.0-5.4 #2

Open Bluscream opened 2 years ago

ferib commented 2 years ago

Hello, I think this can be easily done here https://github.com/ferib/LuaDecompiler-Web/blob/master/API/APIHelper.cs#L25

You can check the Lua version number next to the magic header (\x1BLUA I believe) to identify the Lua bytecode version. Knowing the version you can change the target decompiler. (pick something from https://github.com/viruscamp/luadec maybe?)

However, the project is kinda old and I want to merge this with one of my next projects, luaobfuscator.com (currently broken), which has extra features such as code highlighting, obfuscation and deobfuscation.

Bluscream commented 2 years ago

Sadly the only decompiler for 5.4 that i found to be atleast kinda working is unluac and is written in java, painful to use and produces horrible, non-working code

ferib commented 2 years ago

That seems unfortunate, however, if you'd like to get your hands dirty you have lots of options to choose from.

You can support Lua decompilation 5.4 on either luadec if you like C, unluac if you like Java, or my hacky LuaToolkit project in case you prefer C#. The choice is yours ;)

Note that I will only support luadec or my hacky C# project.