View difference between Paste ID: dr0xN5L2 and u5JJ0srw
SHOW: | | - or go back to the newest paste.
1
-- ClosedFiber Internet Everywhere
2
-- Cluster per Neihemiah - ITCC2
3
connect = 122
4
rednet.open('top')
5
modem = peripheral.wrap('right')
6
7
print("ClosedFiber Cluster ITC22")
8
print("Avviamento in corso...")
9
shell.run("id")
10
11
modem.setListening(81, true)
12
-- modem listening event
13
function listen() 
14
  print("Listening started")
15
  local event, side, id, channel, message = os.pullEvent("lan_message")
16
  print("HTTP Challeng to "..message..":"..channel)
17
  rednet.send(connect, message)
18
  print("HTTP Challenge for-ww to mod")
19
  local irc, messageReturn, ms = rednet.receive(5)
20
  if messageReturn == nil then
21
    messageReturn = '404'
22
  end
23
  print("Got a response: ".. messageReturn)
24
  modem.sendChannel(80, messageReturn)
25
  listen()
26
end
27
28
listen()
29