ChanServ

deobfuscate strings

Aug 9th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. local raw = file.Read("ahuddata.txt")
  2. local dat = string.Explode("\n", raw, false)
  3. dat[#dat] = nil
  4. local out = {}
  5. for i=1, #dat do
  6.     out[i] = ""
  7.     for j=1, #dat[i] do
  8.         local byt = string.byte(dat[i][j])
  9.         if byt < 32 or byt > 126 then
  10.             out[i] = out[i].."\\"..byt
  11.         else
  12.             out[i] = out[i]..dat[i][j]
  13.         end
  14.     end
  15. end
  16. local finalout = "{"
  17. for i=1, #out do
  18.     finalout = finalout..string.format('\n\t"%s"%s', out[i], i==#out and "\n}\n" or ",")
  19. end
  20. file.Append("ahuddata_processed.txt", finalout)
  21. print(finalout)
Add Comment
Please, Sign In to add comment