Advertisement
guitarplayer616

Jabba

Jun 22nd, 2015
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. local tArgs = { ... }
  2. local h
  3. local file = tArgs[1]
  4. local data
  5.  
  6. if fs.exists(shell.resolve(file)) then
  7.     h = fs.open(file,'rb')
  8. else
  9.     error()
  10. end
  11.  
  12. local l = fs.open("tmp",'w')
  13. local str = ""
  14.  
  15. while true do
  16.   data = h.read()
  17.   if data then
  18.     data = data + 5
  19.     str = str..string.char(data)
  20.   else
  21.     break
  22.   end
  23. end
  24.  
  25. l.write(str)
  26. l.close()
  27.  
  28. shell.run("tmp")
  29. local l = fs.open("tmp",'w')
  30. l.write(" ")
  31. l.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement