Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Welcome to the TerraInc Network Stress-Testing Utility.")
- print("")
- print("Note: This product is paid software, you are free to make copies for your own use, as well as modify your own copies, but distribution is not allowed without express, written permission by the copyright holder.")
- print("")
- print("Supplemental Note: This product is only licensed for use against your own systems.")
- print("Press any key and/or press enter to continue.")
- read()
- term.clear()
- term.setCursorPos(1,1)
- function calc()
- msg = math.random(1000000000)
- end
- function target()
- term.clear()
- term.setCursorPos(1,1)
- print("Target Channel/ID:")
- local channel = read()
- local channel2 = tonumber(channel)
- tonumber(channel)
- sleep(1)
- term.clear()
- term.setCursorPos(1,1)
- print("Reply Channel:")
- local reply = read()
- local reply2 = tonumber(reply)
- tonumber(reply)
- end
- function payload()
- term.clear()
- term.setCursorPos(1,1)
- print("Random payload or defined payload?")
- print("Press 1 for random payload")
- print("Press 2 for defined payload.")
- local menu2 = read()
- if (menu2 == ("1"))
- then
- local opt = (true)
- calc()
- else
- local opt = (false)
- print("Enter payload:")
- local msg = read()
- end
- end
- function fire()
- modem.open(channel)
- if (opt == false)
- then
- while true do
- modem.transmit(channel, reply, msg)
- coroutine.yield()
- end
- else
- while true do
- modem.transmit(channel, reply, msg)
- calc()
- coroutine.yield()
- end
- end
- end
- function setup()
- while true do
- print("Setup:")
- print("Press 1 to set Channel/ID.")
- print("Press 2 to set payload.")
- print("Press 3 to open fire.")
- menu = read()
- end
- if (menu == "1") then
- target()
- elseif (menu == "2") then
- payload()
- elseif (menu == "3") then
- fire()
- end
- end
- setup()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement