Created
November 2, 2009 09:40
-
-
Save Suhail/224050 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
import urllib2 | |
import urllib | |
def check_key(key): | |
form_data = urllib.urlencode([ | |
('nickname', 'asdf'), | |
('first_name', 'asdf'), | |
('last_name', 'asdf'), | |
('email', 'asdf@gmail.com'), | |
('password1', 'asdf'), | |
('password2', 'asdf'), | |
('betakey', key), | |
]) | |
request = urllib2.Request('http://beta.heroesofnewerth.com/create_account.php', form_data) | |
session = urllib2.build_opener(urllib2.HTTPCookieProcessor()) | |
response = session.open(request).read() | |
print 'trying key:', key | |
if 'Beta Key is active' in response: | |
print 'key active', key | |
elif 'Beta Key not found' in response: | |
print 'key not found', key | |
elif 'You must supply a valid' in response: | |
print 'submit a valid key plz', key | |
else: | |
print response | |
if __name__ == '__main__': | |
f = open('keyshon.txt', 'r') | |
for line in f: | |
key = line.strip() | |
check_key(key) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment