Advertisement
ChanServ

whoops i dropped my backdoor down the rabbit hole again

Nov 17th, 2019
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. local function decoder(c)
  2.     return string.char(bit.bxor(tonumber(c, 16), math.random(0, 255)))
  3. end
  4. local function undo(data)
  5.     local seed = string.match(data, "^math.randomseed%((%d+)%);")
  6.     local encoded = string.match(data, 'RunString%(%("(%x+)"%):')
  7.     if not (seed and encoded) then
  8.         print(string.format("-- BEGIN DUMP\n%s\n-- END DUMP", data))
  9.         return data
  10.     end
  11.     math.randomseed(seed)
  12.     return undo(string.gsub(encoded, "%x%x", decoder))
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement