doublequestionmark

The Internet-Connected-Door-Lock

Jul 30th, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. key = "PlaceKeyHere"
  2. -----------------------------
  3. term.setCursorPos(1, 1)
  4. term.clear()
  5. os.pullEvent = os.pullEventRaw
  6. me = shell.getRunningProgram()
  7. print("Enter Password")
  8. write(">")
  9. input = read()
  10. req = textutils.urlEncode(key)
  11. req2 = textutils.urlEncode(input)
  12. AoD = http.get("http://208.117.11.70/ICDL/login.php?key="..req.."&pass="..req2)
  13. response = AoD.readLine("1")
  14. if response == "CORRECT" then
  15.  print("The Password Is Correct")
  16.  rs.setOutput("right", true)
  17.  sleep(5)
  18.  rs.setOutput("right", false)
  19.  shell.run(me)
  20. else
  21.  print("The Password Is Incorrect")
  22.  sleep(3)
  23.  shell.run(me)
  24. end
Add Comment
Please, Sign In to add comment