Guest User

rednetspy

a guest
Aug 28th, 2020
158
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. args = {...}
  4.  
  5. if args[1] then
  6.     modem = peripheral.wrap(args[1])
  7. else
  8.     modem = peripheral.find("modem")
  9. end
  10.  
  11. local dupe = {}
  12. print("----- Rednet Spy by Lucasx150 -----")
  13. modem.open(rednet.CHANNEL_REPEAT)
  14. print("Opened on Channel:", rednet.CHANNEL_REPEAT)
  15. term.setCursorPos(1,5)
  16.  
  17. while true do
  18.     local _, _, _, replyChannel, message = os.pullEvent("modem_message")
  19.     if not dupe[message.nMessageID] then
  20.         print(replyChannel, "-->", message.nRecipient, ":", textutils.serialise(message.message))
  21.         dupe[message.nMessageID] = true
  22.     end
  23. end
  24.  
RAW Paste Data