Skip to content

Instantly share code, notes, and snippets.

@Suhail
Created November 2, 2009 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Suhail/224050 to your computer and use it in GitHub Desktop.
Save Suhail/224050 to your computer and use it in GitHub Desktop.
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