-
-
Save chilyashev/9311a5577f18363e7faa to your computer and use it in GitHub Desktop.
Логване към интернета на Бл. 18.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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