· 11 years ago · Aug 18, 2015, 12:00 PM
1from random import randint
2import string
3import requests
4import urllib2
5import random
6from BeautifulSoup import BeautifulSoup
7
8#Regions : EUNE, EUW, NA, LAN, LAS, BR
9
10#Username : 4-24 length, only letters and numbers
11#Password : 6-16 length, at least 1 number and one letter, no ", / ."
12#Password2 : = Password
13#E-mail : Username@gmail.com
14#Date of Birth : randomint(1-30), randomint(1-12), randomint(1980-1996)
15#Terms of use : 1 checkbox (has to be checked)
16#Captcha : img, then a Label to input a captcha text
17#Play for free button : just imitate a click on that
18
19#Files to work on : names.txt, created_accounts.txt
20#Possible separators : ":" and "|"
21
22#Variables used : username, password, email
23
24created = []
25def saveAcc(username, password):
26 username = username
27 password = password
28 fid = open('created_accounts.txt', 'w')
29 fid.write("n%s%s%st" +time) % (username, sep, password)
30 fid.close()
31 created.append(username)
32def createAcc(region, password, number, sep):
33 #So for now we have those variables: region(Region), password(if given), number(Number of accs to create), sep(A separator between username and password)
34 region = region
35 password = password
36 number = number
37 sep = sep
38 #Setting a url to register using the region given from input
39 url = "https://signup." +region+".leagueoflegends.com/pl/signup/index?realm_key=" +region
40 #creating a random username
41 fid = open('names.txt', 'r')
42 names = fid.readlines()
43 names2 = random.choice(names)
44 username = names2[:len(names2)-1] + str(randint(100,1000))
45 #Creating a e-mail equal to random username + @gmail.com
46 email = username+"@gmail.com"
47 #Checking if password is valid
48 if len(password) <= 6:
49 #checking if password should be random
50 if password == "":
51 #creating a random password
52 def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
53 return ''.join(random.choice(chars) for _ in range(size))
54 password = id_generator()
55 elif password != "":
56 print "Invalid password!"
57 #Creating a list which : [0] is a day, [1] is a month and [2] is a year
58 dob = []
59 dob.append(randint(10,30))
60 dob.append(randint(1,12))
61 dob.append(randint(1980, 1996))
62 #Creating new variables : dd for Day, mm for Month and yyyy for Year
63 dd = dob[0]
64 mm = dob[1]
65 yyyy = dob[2]
66 #Username, e-mail and password are strings! Dates of birth are integers!!!
67 #debug()
68 print "nURL: %s" % url
69 print "Region: %s" % region
70 print "Username: %s" % username
71 print "Password: %s" % password
72 print "E-mail: %s" % email
73 print "Date of Birth: %s %s %s" % (str(dob[0]), str(dob[1]), str(dob[2]))
74 print "Number of accounts: %s" % number
75 print "Separator: %s" % sep
76 #Here comes the hardest part, the WEB part:
77
78
79
80 #Saving a created account to created_accounts.txt
81 #saveAcc(username, password) --- commented just to not use it for now
82def main():
83 print "Regions : EUNE, EUW, NA, LAN, LAS, BR"
84 print "Password may only contain letters and numbers!!!!!!!"
85 print 'Possible separators : ":" and "|"n'
86 region = raw_input("Region: ").lower()
87 password = raw_input("Password for your accounts (if u want random pass, then skip it with ENTER)")
88 number = int(raw_input("Number of accounts to create: "))
89 sep = raw_input("Separator?: ")
90 createAcc(region, password, number, sep)
91 #To delete, when we finish a code (when no debug is needed):
92 #debug()
93 #for i in range(number):
94 #createAcc()
95 #print "We've created " +len(created)+ "accounts successfully"
96main()