Логване към интернета на Бл. 18.
#!/usr/bin/env python | |
from httplib2 import Http | |
from urllib import urlencode | |
from time import sleep | |
et = 5 # етаж | |
url = 'http://10.1.%s.1/login' % (100+et) | |
while 1>0: | |
print 'Sending stuff to %s' % (url) | |
http = Http() | |
data = dict(username="Axxxxxx", password="xxxxxxxxxx") | |
resp, content = http.request(url, "POST", urlencode(data)) | |
print resp # може и без това | |
sleep(0.5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment