gio1135
gio1135

Reputation: 87

How to decrypt lua char tonumber on Android

So I have this script that I'd like to clean up and word things a bit differently but I can't read it and I don't know how to do it nor the tools I'd need. I don't have a PC so hopefully it can be done on Android. Thanks in advance.

function encrypt(key,code)
  return (code:gsub('..', function (h) 
return string.char((tonumber(h,16)+256-13 - key + 999999*256)%256) end))
end

pcall(encrypt(v_value[1],'BUNCHOFENENCRYPTEDCODE'))

Upvotes: 2

Views: 718

Answers (1)

Rob Napier
Rob Napier

Reputation: 299265

This looks like a typical attempt to lightly obfuscate the code. It should be very easy to reverse-engineer.

Change pcall to print and re-run the script. This will cause the script to de-obfuscate and dump itself to the output. You can then take the output and work on it that.

Upvotes: 3

Related Questions