Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --tom2018--
- if fs.isDir("webdata") == false then
- fs.makeDir("webdata")
- end
- cloc = shell.getRunningProgram()
- fs.delete(cloc)
- shell.run("pastebin","get","AXG45ZKY",cloc)
- rednet.open("top")
- con = true
- while con == true do
- term.clear()
- term.setCursorPos(1,1)
- print("RDNT://")
- print("@-----------------------------------------------@")
- term.setCursorPos(8,1)
- url = read()
- term.setCursorPos(1,3)
- rednet.broadcast(url)
- x, y = rednet.receive(1)
- if y ~= nil then
- data = fs.open("webdata/"..url,"w")
- data.write(y)
- data.close()
- end
- if fs.exists("webdata/"..url) then
- shell.run("webdata/"..url)
- else
- print("404 Error")
- print("Please check the URL you entered")
- print("If it is correct double check modem or ask web host.")
- end
- write("Continue? (y/n) :")
- c = read()
- con = false
- if c ~= "n" then
- con = true
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement