Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- Tx, Ty = term.getSize()
- term.setCursorPos(Tx/2-9, Ty/2-1)
- term.write("UserName: ")
- term.setCursorPos(Tx/2-9, Ty/2)
- term.write("Password: ")
- term.setCursorPos(Tx/2+1, Ty/2-1)
- uName = read()
- term.setCursorPos(Tx/2+1, Ty/2)
- pWord = read("*")
- --local submission = "username=admin&password=none" --base incase of error
- local submission = "username="..uName.."&password="..pWord
- term.setCursorPos(Tx/2-6, Ty/2+2)
- term.write("waiting...")
- local response = http.post("url", submission)
- term.clear()
- term.setCursorPos(1,1)
- xX = response.readAll()
- response.close()
- sS = string.len(xX)
- term.setCursorPos(Tx/2-sS/2, Ty/2)
- print(xX)
- sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement