Advertisement
tom2018

Untitled

Nov 9th, 2012
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. --tom2018--
  2. if fs.isDir("webdata") == false then
  3. fs.makeDir("webdata")
  4. end
  5. cloc = shell.getRunningProgram()
  6. fs.delete(cloc)
  7. shell.run("pastebin","get","AXG45ZKY",cloc)
  8. rednet.open("top")
  9. con = true
  10. while con == true do
  11. term.clear()
  12. term.setCursorPos(1,1)
  13. print("RDNT://")
  14. print("@-----------------------------------------------@")
  15. term.setCursorPos(8,1)
  16. url = read()
  17. term.setCursorPos(1,3)
  18. rednet.broadcast(url)
  19. x, y = rednet.receive(1)
  20. if y ~= nil then
  21. data = fs.open("webdata/"..url,"w")
  22. data.write(y)
  23. data.close()
  24. end
  25. if fs.exists("webdata/"..url) then
  26. shell.run("webdata/"..url)
  27. else
  28. print("404 Error")
  29. print("Please check the URL you entered")
  30. print("If it is correct double check modem or ask web host.")
  31. end
  32. write("Continue? (y/n) :")
  33. c = read()
  34. con = false
  35. if c ~= "n" then
  36. con = true
  37. end
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement