Skip to content

Instantly share code, notes, and snippets.

@chilyashev
Last active December 11, 2015 08:48
Show Gist options
  • Save chilyashev/9311a5577f18363e7faa to your computer and use it in GitHub Desktop.
Save chilyashev/9311a5577f18363e7faa to your computer and use it in GitHub Desktop.
Логване към интернета на Бл. 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