简体   繁体   中英

Lua obfuscation issue

I have tried to decompile one of Lua script just for learning purposes, and I got the original code however the code was obfuscated like below:

local L0_0, L1_1, L2_2, L3_3, L4_4, L5_5, L6_6, L7_7, L8_8, L9_9, L10_10, L11_11, L12_12, L13_13, L14_14, L15_15, L16_16, L17_17, L18_18, L19_19, L20_20, L21_21, L22_22, L23_23, L24_24, L25_25, L26_26, L27_27, L28_28, L29_29
L0_0 = require
L1_1 = "comm.NetworkClock"
L0_0 = L0_0(L1_1)
L1_1 = require
L2_2 = "comm_ads.fullscreenAds"
L1_1 = L1_1(L2_2)
L2_2 = require
L15_15 = L14_14.init
L15_15()
L15_15 = L4_4.log
L16_16 = "IN main"
L15_15(L16_16)
function L15_15()
  local L0_30, L1_31
end
print = L15_15

Is there any way to recover these code to reach the original one?

Can you get back to the original source? No, not likely.

Source code is optimized to be read by humans, byte code is optimized to be read by machines. Compiling usually results in a one-way conversion where information required to restore the original source is lost.

Best bet at this point is to simplify it by hand and a bunch of find & replace once you identify what a variable or function actually does.

If you did find (or build) a tool to simplify the decompiled source code to be more human-readable, it still would not really be reproducing the original source code.

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