Andy73

Extractor

Apr 11th, 2014
544
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.83 KB | None | 0 0
  1. --[[
  2. Pure Lua extractor made by Andy73 a.k.a. viluon
  3.  
  4. Copyright 2014
  5. version 0.2 BETA (1st public release)
  6.  
  7. usage: extractor <compressed file> <decompressed output>
  8. ]]
  9. local args={...}
  10. local file=fs.open(args[1],"r")
  11. local r=string.gsub
  12.  
  13. local t=file.readAll()
  14. file:close()
  15. --t is a string, will be later saved
  16. --FIRST ROUND SYMBOL @ (12x)
  17. t=r(t,"@ě","true")
  18. t=r(t,"@š","false")
  19. t=r(t,"@č","setTextScale")
  20. t=r(t,"@ř","setBackgroundColor")
  21. t=r(t,"@ž","os.loadAPI")
  22. t=r(t,"@ý","color")
  23. t=r(t,"@á","setTextColor")
  24. t=r(t,"@í","text")
  25. t=r(t,"@é","Text")
  26. t=r(t,"@ú","write")
  27. t=r(t,"@ů","elseif")
  28. t=r(t,"@ˇ","local")
  29. t=r(t,"@´","function")
  30. --SECOND ROUND SYMBOL # (12x)
  31. t=r(t,"#ě","then")
  32. t=r(t,"#š","end")
  33. t=r(t,"#č","else")
  34. t=r(t,"#ř","tostring%(")
  35. t=r(t,"#ž","tonumber%(")
  36. t=r(t,"#ý","string")
  37. t=r(t,"#á","math")
  38. t=r(t,"#í","=os.pullEventRaw%(")
  39. t=r(t,"#é","=os.pullEvent%(")
  40. t=r(t,"#ú","= os.pullEventRaw%(")
  41. t=r(t,"#ů","= os.pullEvent%(")
  42. t=r(t,"#ˇ","window")
  43. t=r(t,"#´","process")
  44. --THIRD ROUND SYMBOL ! (12x)
  45. t=r(t,"!ě","and")
  46. t=r(t,"!š","not")
  47. t=r(t,"!č","print")
  48. t=r(t,"!ř"," == ")
  49. t=r(t,"!ž"," ~= ")
  50. t=r(t,"!ý","= fs.exists%(")
  51. t=r(t,"!á","=pcall%(")
  52. t=r(t,"!í","= pcall%(")
  53. t=r(t,"!é","pcall%(")
  54. t=r(t,"!ú","=fs.open%(")
  55. t=r(t,"!ů","= fs.open%(")
  56. t=r(t,"!ˇ","fs.exists%(")
  57. t=r(t,"!´","print%(")
  58. --FOURTH ROUND SYMBOL / (12x)
  59. t=r(t,"/š","=fs.isDir%(")
  60. t=r(t,"/č","= fs.isDir%(")
  61. t=r(t,"/ř","fs.isDir%(")
  62. t=r(t,"/ž","=fs.isReadOnly%(")
  63. t=r(t,"/ý","= fs.isReadOnly%(")
  64. t=r(t,"/á","fs.isReadOnly%(")
  65. t=r(t,"/í","=fs.getDrive%(")
  66. t=r(t,"/é","= fs.getDrive%(")
  67. t=r(t,"/ú","fs.getDrive%(")
  68. t=r(t,"/ů","=fs.getSize%(")
  69. t=r(t,"/ˇ","= fs.getSize%(")
  70. t=r(t,"/´","fs.getSize%(")
  71.  
  72. local target=fs.open(args[2],"w")
  73. target.write(t)
  74. target:close()
  75.  
  76. print("done!")
Advertisement
Add Comment
Please, Sign In to add comment