Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function split(inputstr, sep)
- if sep == nil then
- sep = "%s"
- end
- local t={}
- for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
- table.insert(t, str)
- end
- return t
- end
- local modem = peripheral.wrap("top")
- -- Aspetto la richiesta
- while true do
- modem.setListening(80, true)
- local event, lato, sender, canale, msg = os.pullEvent("lan_message")
- print("Richiesta da: 144.91.97."..sender.."\nContenuto: "..msg)
- if msg == "craftabo.net" then
- modem.sendChannel(80, "sus")
- elseif string.find(msg, "sus.tets/sendForm") ~= nil then
- r = split(msg, "$")
- -- r[2] == contenuto del form
- end
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement