Guest User

Untitled

a guest
Aug 27th, 2013
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. function namecheck()
  2. filelist = fs.list("/")
  3. names = {"cp", "dir", "ls", "mv", "rm", "computer", "http", "secret", "turtle", "bit", "colors", "colours", "gps", "help", "io", "parallel", "rednet", "term", "textutils", "vector", "os", "math", "fs", "coroutine", "parallel", "peripheral", "rs", "redstone", "shell", "string", "table", "term", "adventure", "hello", "worm", "pastebin", "alongtimeago", "dance", "excavate", "go", "tunnel", "turn"}
  4. for b = 1, #filelist do
  5. for i = 1, #names do
  6. if filelist[b] == names[i] then
  7. viruses = viruses+1
  8. files = files+1
  9. print("Virus "General.Malware" found in /" .. filelist[b])
  10. log("Virus "General.Malware" found in /" .. filelist[b])
  11. filemove("/" .. filelist[b], "/disk/bad" .. filelist[b])
  12. else
  13. end
  14. end
  15. end
  16. end
  17.  
  18. function syscheck()
  19. filelist = fs.list("/")
  20. system = fs.list("/rom/programs")
  21. for b = 1, #filelist do
  22. for i = 1, #system do
  23. if filelist[b] == system[i] then
  24. viruses = viruses+1
  25. files = files+1
  26. print("Virus "General.Malware" found in /" .. filelist[b])
  27. log("Virus "General.Malware" found in /" .. filelist[b])
  28. filemove("/" .. filelist[b], "/disk/bad" .. filelist[b])
  29. else
  30. end
  31. end
  32. end
  33. end
Add Comment
Please, Sign In to add comment