Guest User

startup

a guest
Oct 30th, 2021
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.87 KB | None | 0 0
  1. -- Repeater 5GBPS / 7GBPS
  2. -- Gateway 80 (WEB door)
  3. input = "left"
  4. output = "right"
  5.  
  6. modem = peripheral.wrap(input)
  7.  
  8. modemout = peripheral.wrap(output)
  9.  
  10. modem.setListening(80, true)
  11. modemout.setListening(80, true)
  12.  
  13. while true do
  14.  
  15. event, side, id, chn, msg = os.pullEvent("lan_message")
  16.  
  17. if msg == "sussy baka" then
  18.   print("Error 404")
  19. else
  20. if side == "left" then
  21.   modemout.sendChannel(80, msg)
  22.   print("Send request "..msg.." to "..side)
  23. else
  24.   modem.sendChannel(80, msg)
  25.   print("Send request "..msg.." to "..side)
  26. end
  27. end
  28.  
  29. event, sid, ids, ch, ms = os.pullEvent("lan_message")
  30.  
  31. if ms == "sussy baka" then
  32.   print("Error 404")
  33. else
  34. if sid == "left" then
  35.   modemout.sendChannel(80, ms)
  36.   print("Received response from 144.91.97."..ids)
  37. else
  38.   modem.sendChannel(80, ms)
  39.   print("Received response from 144.91.97."..ids)
  40. end
  41. end
  42.  
  43. sleep(0.1)
  44. end
  45.  
  46.  
Advertisement
Add Comment
Please, Sign In to add comment