Advertisement
Bokos

WIFI Mendelu Login

Sep 26th, 2016
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. import requests
  4. import time
  5.  
  6. username = "name"
  7. password = "pass"
  8.  
  9. while True:
  10.     try:
  11.         r = requests.post("https://tauf-fw.mendelu.cz/login", timeout=0.9, data={'username': username, 'password': password})
  12.         print r.status_code
  13.         time.sleep( 1.0 )
  14.     except requests.exceptions.Timeout:
  15.         print "Timeout"
  16.     except:
  17.         print "Error"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement