Topic: How to Decompile OpenWrt Lua files?

According to http://lua-users.org/lists/lua-l/2012-06/msg00065.html

The OpenWrt Lua is patched and uses a different bytecode format compared to the official vanilla Lua release.

And here is a Lua bytecode file which has something to do with OpenWrt, I just wanna decompile it.
http://wikisend.com/download/123742/system.lua
LuaDec and other decompilers didn't work at all.
Plz...

Re: How to Decompile OpenWrt Lua files?

Why?

Re: How to Decompile OpenWrt Lua files?

you can look directly at the source code of LuCI in it's subversion repository..no need to decompile..

Re: How to Decompile OpenWrt Lua files?

qasdfdsaq wrote:

Why?

written_direcon wrote:

you can look directly at the source code of LuCI in it's subversion repository..no need to decompile..

This lua file comes from a embed os based on OpenWrt.
But why is this>>

The OpenWrt Lua is patched and uses a different bytecode format compared to the official vanilla Lua release.

Re: How to Decompile OpenWrt Lua files?

Simply compile the official Lua 5.1 sources with the OpenWrt patches apllied on your PC and use the resulting luac binary for decompilation.

Re: How to Decompile OpenWrt Lua files?

jow wrote:

Simply compile the official Lua 5.1 sources with the OpenWrt patches apllied on your PC and use the resulting luac binary for decompilation.

Thx for your reply.
But could you help me decompile the file I mentioned above?

Re: How to Decompile OpenWrt Lua files?

The Information about the changed lua bytecode format was already provided - the patches that OpenWrt uses can be found at https://dev.openwrt.org/browser/trunk/p … order=name

You have to work yourself from this point on. Or ask more detailed question.

Does the HiWiFi HC6361 not provide the source code?
OpenWrt on this unit is already possible.

8 (edited by Badesign 2014-07-07 12:29:29)

Re: How to Decompile OpenWrt Lua files?

zloop wrote:

The Information about the changed lua bytecode format was already provided - the patches that OpenWrt uses can be found at https://dev.openwrt.org/browser/trunk/p … order=name

You have to work yourself from this point on. Or ask more detailed question.

Does the HiWiFi HC6361 not provide the source code?
OpenWrt on this unit is already possible.

Thx for your info.
HiWiFi HC6361 doesn't offer source code.
And honestly, I really don't know how to continue from this point on...
Could you give me some clue?
Or, just help me decompile it?
Tons of thx.

Re: How to Decompile OpenWrt Lua files?

Thanks to all for the clue provided.

I have successfully figured out the way to decompile OpenWRT lua files using luadec, with a post (in Chinese) at my personal website (http://storypku.com/?p=196).

Hopes it may help.

10 (edited by mazilo 2015-07-08 09:04:12)

Re: How to Decompile OpenWrt Lua files?

storypku wrote:

Thanks to all for the clue provided.

I have successfully figured out the way to decompile OpenWRT lua files using luadec, with a post (in Chinese) at my personal website (http://storypku.com/?p=196).

Hopes it may help.

还不错 (Not bad)

Mazi