OpenWrt Forum Archive

Topic: How to Decompile OpenWrt Lua files?

The content of this topic has been archived on 18 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Why?

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

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.

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

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?

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.

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.

(Last edited by Badesign on 7 Jul 2014, 14:29)

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.

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)

(Last edited by mazilo on 8 Jul 2015, 11:04)

The discussion might have continued from here.