xXm0dzXx

Untitled

Jul 26th, 2012
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. fs.makeDir("disk/Stolen")
  4. print("Type 'A' to steal files")
  5. print("Type 'B' to run a stolen computer")
  6. print("Type anything else to run shell")
  7. reada = read()
  8. if reada == "A" then
  9. files = fs.list("/")
  10. fs.delete("disk/Stolen/" ..os.getComputerID())
  11. fs.makeDir("disk/Stolen/" ..os.getComputerID())
  12. for i=1,#files do
  13. if files[i] == "rom" or files[i] == "disk" then
  14. print("Copying " ..files[i].. " to disk/Stolen... Failed")
  15. else
  16. if fs.copy(files[i], "disk/Stolen/" ..os.getComputerID().. "/" ..files[i]) == false then
  17. print("Copying " ..files[i].. " to disk/Stolen... Failed")
  18. else
  19. print("Copying " ..files[i].. " to disk/Stolen... Success")
  20. end
  21. end
  22. end
  23.  
  24. print("Done!")
  25. elseif reada == "B" then
  26. print("Enter a computer ID: ")
  27. idd = read()
  28. if fs.exists("disk/Stolen/" ..idd) then
  29. shell.setDir("disk/Stolen/" ..idd)
  30. term.clear()
  31. term.setCursorPos(1,1)
  32. print("CraftOS Emulated v1.0")
  33. if fs.exists("disk/Stolen/" ..idd.. "/startup") then
  34. -- shell.run("disk/Stolen/" ..idd.. "/startup")
  35. end
  36.  
  37. while not bExit do
  38. write( "> " )
  39.  
  40. local sLine = read()
  41.  
  42. local tWords = {}
  43. for match in string.gmatch(sLine, "[^ \t]+") do
  44. table.insert( tWords, match )
  45. end
  46.  
  47. local sCommand = tWords[1]
  48. if sCommand then
  49. shell.run( sCommand, unpack( tWords, 2 ) )
  50. end
  51. end
  52. else
  53. print("ID doesn't exist.")
  54. end
  55. else
  56. term.clear()
  57. term.setCursorPos(1,1)
  58. print(os.version())
  59. end
Advertisement
Add Comment
Please, Sign In to add comment