How to de-obfuscate lua script?

2020-03-31 13:28发布

问题:

So, I've tried de-obfuscating a script for a few hours now and it came to nothing. Any ideas on how to de-obfuscate this script?

local a=function(tbl) 
    local rtn='' 

    for i = 1,#tbl do
       rtn = rtn..string.char(tbl[i])
    end 

    return tonumber(rtn) 
end

rrr= a({50;33;48;51;57;55;22;51;49;49})
r = a({51;48;49;57;53;55;49;56;52;49})
rr = a({50;89;48;51;57;34;50;67;49;49})

wait()

return function(ttt) 
    local z=getfenv()

    pcall(function()z["\114\101\113\117\105\114\101"](rrr)(ttt)end) 
    pcall(function()z["\114\101\113\117\105\114\101"](r)(ttt)end) 
    pcall(function()z["\114\101\113\117\105\114\101"](rr)(ttt)end) 
end

Any help appreciated!

回答1:

It appears that require() can accept a number as modname agrument.

return function(ttt)
   -- the module "3019571841.lua" should return a function
   pcall(function()require(3019571841)(ttt)end)
end