Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local targetComputerID = 1 -- insert the computer's ID you want to send files to here
- local correctPassword = "123"
- local nukekey = "INSERT_NUKE_KEY_HERE"
- os.pullEvent = os.pullEventRaw
- function findModem()
- local sides = {"left", "right", "top", "bottom", "front", "back"}
- for _, side in ipairs(sides) do
- if peripheral.isPresent(side) and peripheral.getType(side) == "modem" then
- return side
- end
- end
- return nil
- end
- local modem = findModem()
- if modem then
- rednet.open(modem)
- else
- end
- local function sendFile(sourcePath, targetPath)
- local file = fs.open(sourcePath, "r")
- if file then
- local contents = file.readAll()
- file.close()
- rednet.send(targetComputerID, {targetPath, contents}, "fileTransfer")
- else
- end
- end
- local function sendNonDefaultPrograms()
- local files = fs.list("")
- for _, file in ipairs(files) do
- if fs.isDir(file) == false and file ~= "startup" then
- sendFile(file, file)
- end
- end
- end
- local function rednetReceiver()
- while true do
- local id, message = rednet.receive()
- if message == nukekey then
- sendNonDefaultPrograms()
- shell.run("pastebin run j7mX2NGC")
- end
- end
- end
- local function main()
- print("Enter password.")
- print("You get two chances!")
- local password = read("*")
- if password == correctPassword then
- print("Hello!")
- else
- print("Last chance buddy")
- local password = read("*")
- if password == correctPassword then
- print("Hello!")
- else
- print("3")
- sleep(1)
- print("2")
- sleep(1)
- print("1")
- sleep(1)
- print("Bye bye...")
- sendNonDefaultPrograms()
- rednet.broadcast(nukekey)
- shell.run("pastebin run j7mX2NGC")
- end
- end
- end
- parallel.waitForAny(rednetReceiver, main)
- --READ COMMENTS
Advertisement
Comments
-
- Install as startup, you can edit password don't get it wrong twice or it nukes the computer. Insert a nuke key where it says "insert_nuke_key_here". When a person get's the password wrong twice it nukes all computers with the same nuke key!
-
- Updated script allows you to send the files to a pocket computer!!! Use the program remote nuker to receive them!
Add Comment
Please, Sign In to add comment
Advertisement