Created
January 28, 2009 18:02
-
-
Save joshrendek/54105 to your computer and use it in GitHub Desktop.
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/python | |
import urllib2, urllib, socket | |
username = 'USERNAME' | |
password = 'PASSWORD' | |
ip = socket.gethostbyname(socket.gethostname()) | |
gateway = ip.split('.') | |
gateway[3]='1' | |
gatewayip = gateway[0:4] | |
gate_ip = ".".join(gatewayip) | |
gatesip = "http://",gate_ip,"/login.pl" | |
g = "".join(gatesip) | |
login = urllib.urlencode({'customlogin': 1, '_FORM_SUBMIT': 1, 'which_form': 'reg', 'destination': '', 'error': '', 'source': '128.186.232.83','SUBMIT': 'Log In', 'bs_name': username, 'bs_password': password}); | |
e = urllib2.urlopen(g, login) | |
print "Tried...",g | |
#print f.read(); | |
print "Logged in!" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment