Advertisement
Guest User

thingy

a guest
Sep 12th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3.  
  4. Tx, Ty = term.getSize()
  5.  
  6. term.setCursorPos(Tx/2-9, Ty/2-1)
  7. term.write("UserName: ")
  8. term.setCursorPos(Tx/2-9, Ty/2)
  9. term.write("Password: ")
  10. term.setCursorPos(Tx/2+1, Ty/2-1)
  11. uName = read()
  12. term.setCursorPos(Tx/2+1, Ty/2)
  13. pWord = read("*")
  14.  
  15. --local submission = "username=admin&password=none" --base incase of error
  16.  
  17. local submission = "username="..uName.."&password="..pWord
  18.  
  19. term.setCursorPos(Tx/2-6, Ty/2+2)
  20. term.write("waiting...")
  21.  
  22. local response = http.post("url", submission)
  23.  
  24. term.clear()
  25. term.setCursorPos(1,1)
  26. xX = response.readAll()
  27. response.close()
  28.  
  29. sS = string.len(xX)
  30.  
  31. term.setCursorPos(Tx/2-sS/2, Ty/2)
  32. print(xX)
  33. sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement