Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Account creator
- import urllib
- from urllib2 import urlopen
- from ClientForm import ParseResponse
- import random
- url = 'https://create.runescape.com/index.ws'
- api_url = 'https://create.runescape.com/checkusername.ajax?username='
- a = raw_input('Type a username here. Put nothing for a random one ')
- password = raw_input('Type a password for the account. Must be over 5 characters ')
- findstring = 'has now been created with the password you have chosen. We recommend you make a note of it on a bit of paper and keep it somewhere <strong>really</strong> safe, in case you forget it.</p>'
- used_usernames = ['ox',
- 'lol',
- 'ownage',
- 'killer']
- def make_username(username):
- # Lets check if its blank
- if username == '':
- # Choose a random used username out of the list
- check_name = random.choice(used_usernames)
- z = username_get(check_name).split(',')
- # Split the string into a list of usernames
- # Choose a random one!
- jew = random.choice(z)
- print 'Username chosen: %s'%jew
- return jew
- else:
- # Check if the username is in use allready:
- if username_check(username):
- # Not in use!
- return username
- else:
- print username+' is in use. Finding a match closest to it'
- a = 0
- while 1:
- a = random.randint(a,a+100)
- check_name = username+str(a)
- if username_check(check_name):
- break
- print check_name+' in use - trying another'
- print check_name+' not in use! - using'
- return check_name
- def username_check(username):
- if urllib.urlopen(api_url+username).read() == '17':
- return True
- else:
- return False
- def username_get(username):
- return urllib.urlopen(api_url+username).read().replace('18,','')
- username = make_username(a)
- country = "88"
- response = urlopen(url)
- forms = ParseResponse(response,backwards_compat=False)
- form = forms[0]
- form['username'] = username
- form['password1'] = password
- form['password2'] = password
- form['day'] = [str(random.randint(1,31))]
- form['month'] = [str(random.randint(0,11))]
- form['year'] = str(random.randint(1950,1990))
- form['country'] = ["225"]
- form['agree_privacy'] = ['on']
- form['agree_terms'] = ['on']
- print '---------------------'
- print 'Details:'
- print 'Username: %s'%username
- print 'Password: %s'%password
- print '---------------------'
- print ' '
- print 'Creating account...'
- form.click()
- print 'Account created'
- while 1:
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement