Skip to content

Instantly share code, notes, and snippets.

Last active December 11, 2015 08:48
What would you like to do?
Логване към интернета на Бл. 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 # може и без това
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment