-
Notifications
You must be signed in to change notification settings - Fork 5
/
gen.py
271 lines (256 loc) · 14.1 KB
/
gen.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
def create_interia():
print("creating interia.pl account")
print("waiting for browser to load give it a sec")
driver.get("https://konto-pocztowe.interia.pl/#/nowe-konto/darmowe")
print("waiting for website to load give it a sec")
wait.until(EC.visibility_of_element_located((By.CLASS_NAME, 'rodo-popup-agree'))).click()
wait.until(EC.visibility_of_element_located((By.XPATH, '/html/body/div[1]/div/div/div/div/div[2]/div/form/div[1]/div[1]/input'))).send_keys(firstname)
driver.find_element(By.XPATH, '/html/body/div[1]/div/div/div/div/div[2]/div/form/div[1]/div[2]/input').send_keys(lastname)
driver.find_element(By.ID, "birthdayDay").send_keys("04")
driver.find_element(By.CLASS_NAME, 'icon-arrow-right-full').click()
driver.find_element(By.CLASS_NAME, 'account-select__options__item').click()
driver.find_element(By.ID, "birthdayYear").send_keys("2000")
driver.find_element(By.XPATH, "//*[contains(text(), 'Płeć')]").click()
time.sleep(.3)
driver.find_element(By.XPATH, '/html/body/div[1]/div/div/div/div/div[2]/div/form/div[1]/div[4]/ul/li[1]').click()
time.sleep(.3)
driver.find_element(By.XPATH, "//*[contains(text(), 'Nazwa konta')]").click()
time.sleep(.3)
driver.find_element(By.XPATH, "//*[contains(text(), 'Nazwa konta')]").click()
time.sleep(.3)
driver.find_element(By.XPATH, "//*[contains(text(), 'Nazwa konta')]").click()
driver.find_element(By.ID, "password").send_keys(password)
driver.find_element(By.ID, "rePassword").send_keys(password)
driver.find_element(By.CLASS_NAME, 'checkbox-container').click()
time.sleep(.6)
driver.find_element(By.CLASS_NAME, 'btn').click()
time.sleep(.3)
driver.find_element(By.CLASS_NAME, 'btn').click()
time.sleep(.3)
def finish_interia():
wait.until(EC.visibility_of_element_located((By.ID, "email"))).send_keys(email)
wait.until(EC.visibility_of_element_located((By.ID, "password"))).send_keys(password)
print("waiting for user to complete interia.pl captcha")
wait.until(EC.visibility_of_element_located((By.XPATH, "/html/body/div[1]/div[1]/div[1]/form/button")))
get_url = driver.current_url
while True:
if get_url != driver.current_url:
if driver.current_url.find('logowanie') != -1:
wait.until(EC.visibility_of_element_located((By.ID, "password"))).send_keys(password)
get_url = driver.current_url
continue
break
while True:
try:driver.find_element(By.CLASS_NAME, 'rodo-popup-agree').click()
except:pass
try:
driver.find_element(By.XPATH, "/html/body/div[3]/div/div/div/div[2]/button[2]").click()
wait.until(EC.visibility_of_element_located((By.XPATH, "/html/body/div[3]/div/div/div/div[2]/button[2]"))).click()
break
except:pass
try:
driver.find_element(By.XPATH, "/html/body/div[2]/div[3]/div/div[2]/div/div/div[2]/div/div").click()
break
except:pass
def create_proton():
driver.get('https://account.proton.me/signup?plan=free&billing=12&minimumCycle=12¤cy=USD&language=en')
wait.until(EC.visibility_of_element_located((By.ID, "password")))
for character in f"{firstname}.{lastname}":
actions.send_keys(character)
actions.perform()
time.sleep(0.1)
wait.until(EC.visibility_of_element_located((By.ID, "password"))).send_keys(password)
wait.until(EC.visibility_of_element_located((By.ID, "repeat-password"))).send_keys(password)
wait.until(EC.visibility_of_element_located((By.XPATH, "//button[contains(text(),'Create account')]"))).click()
print("waiting for user to complete captcha")
wait.until(EC.visibility_of_element_located((By.XPATH, "//button[contains(text(),'Next')]"))).click()
wait.until(EC.visibility_of_element_located((By.XPATH, "//button[contains(text(),'Maybe later')]"))).click()
wait.until(EC.visibility_of_element_located((By.XPATH, "//button[contains(text(),'Confirm')]"))).click()
wait.until(EC.visibility_of_element_located((By.XPATH, "/html/body/div[1]/div[3]/div/div/main/div[2]/ul/li[1]/button"))).click()
def finish_proton():
wait.until(EC.visibility_of_element_located((By.XPATH, "/html/body/div[4]/dialog/div/div/div[3]/div/div/footer/button"))).click()
wait.until(EC.visibility_of_element_located((By.XPATH, "/html/body/div[4]/dialog/div/div/div[3]/div/div/footer/button[2]"))).click()
wait.until(EC.visibility_of_element_located((By.XPATH, "/html/body/div[4]/dialog/div/div/div[3]/div/div/footer/button[2]"))).click()
def create_outlook():
# Go to signup link
driver.get("https://signup.live.com/signup?lcid=1033&wa=wsignin1.0&rpsnv=13&ct=1665092252&rver=7.0.6737.0&wp=MBI_SSL&wreply=https%3a%2f%2foutlook.live.com%2fowa%2f%3fnlp%3d1%26signup%3d1%26RpsCsrfState%3dc369e093-b25b-695e-6ebf-73b540917382&id=292841&CBCXT=out&lw=1&fl=dob%2cflname%2cwld&cobrandid=90015&lic=1&uaid=66af4c279e5d4d52ad878a24edfcdb77")
print(f"Account creation started | {email}")
# Enter email
wait.until(EC.visibility_of_element_located((By.ID, "MemberName"))).send_keys(f"{firstname}.{lastname}")
# Click Next
wait.until(EC.visibility_of_element_located((By.ID, "iSignupAction"))).click()
# Enter password
wait.until(EC.visibility_of_element_located((By.ID, "PasswordInput"))).send_keys(password)
# Uncheck promotion checkbox
wait.until(EC.visibility_of_element_located((By.ID, "iOptinEmail"))).click()
# Click Next
wait.until(EC.visibility_of_element_located((By.ID, "iSignupAction"))).click()
wait.until(EC.visibility_of_belement_located((By.ID, "FirstName"))).send_keys(firstname)
wait.until(EC.visibility_of_element_located((By.ID, "LastName"))).send_keys(lastname)
wait.until(EC.visibility_of_element_located((By.ID, "iSignupAction"))).click()
wait.until(EC.visibility_of_element_located((By.ID, "BirthDateCountryAccrualInputPane")))
# Select country
Select(driver.find_element(By.ID, "Country")).select_by_value("US")
# Select birthday month
Select(driver.find_element(By.ID, "BirthMonth")).select_by_value("1")
# Select birthday day
Select(driver.find_element(By.ID, "BirthDay")).select_by_value("1")
# Select birthday year
driver.find_element(By.ID, "BirthYear").send_keys("2000")
# Click Next
wait.until(EC.visibility_of_element_located((By.ID, "iSignupAction"))).click()
# Ask the user to manually complete the captcha
wait.until(EC.visibility_of_element_located((By.ID, "enforcementFrame"))).click()
print(f"Captcha completion required | {email}")
input()
print(f"Account created | {email}")
if __name__ == '__main__':
username = 'unknown'
wusername = False
print("attempting to make an epic account fully automatically")
import os
import os.path
import random
import string
import sys
import time
try:
import undetected_chromedriver as uc
except:
os.system('pip.exe install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org undetected-chromedriver')
import undetected_chromedriver as uc
from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
try:
open('C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe')
except:
print("brave browser not found..... installing brave")
os.system('curl https://referrals.brave.com/latest/BraveBrowserSetup.exe --output install_brave.exe')
os.system('install_brave.exe')
os.system('taskkill /f /im brave.exe')
os.remove('install_brave.exe')
options = uc.ChromeOptions()
if input('type "y" for custom username, ENTER key for random : ') == 'y': wusername = True
else: username = f"a{''.join(random.sample(string.ascii_lowercase + string.digits, 15))}"
options.binary_location = "C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"
firstname = f"A{''.join(random.sample(string.ascii_lowercase + string.digits, 14))}"
lastname = f"L{''.join(random.sample(string.ascii_lowercase + string.digits, 14))}"
password = f"A{''.join(random.sample(string.ascii_lowercase + string.digits, 15))}&*"
print("what email service do you want to use?")
print("proton is recommended")
print("1: ProtonMail RECOMMENDED")
print("2: Interia")
print("3: outlook broken dont use")
print("4: custom email")
emailservice = input("type your selection:")
if emailservice == '4': email = f"nothing"
if emailservice == '2': email = f"{firstname}.{lastname}@interia.pl"
if emailservice == '3': email = f"{firstname}.{lastname}@outlook.com"
if emailservice == '1': email = f"{firstname}.{lastname}@proton.me"
print(email)
def switch(x):
windows = driver.window_handles
driver.switch_to.window(windows[x])
try:
print("trying to start chromedriver")
driver = uc.Chrome(options=options, service_log_path=os.devnull)
except Exception as e:
print(e)
print("error")
actions = ActionChains(driver)
wait = WebDriverWait(driver, 100000)
if emailservice == '4': pass
if emailservice == '2': create_interia()
if emailservice == '3': create_outlook()
if emailservice == '1': create_proton()
print(f"creating epic games account with username:{username} password:{password} email:{email}")
driver.execute_script("window.open('');")
driver.switch_to.window(driver.window_handles[1])
driver.get("https://www.epicgames.com/id/register/date-of-birth?redirectUrl=https%3A//www.epicgames.com/id/api/redirect%3FclientId%3D34a02cf8f4414e29b15921876da36f9a%26responseType%3Dcode")
print("determing if us or another country")
while True:
try:
driver.find_element(By.ID, "month").click()
driver.find_element(By.XPATH, "//*[contains(text(), 'Jan')]").click()
wait.until(EC.visibility_of_element_located((By.ID, "day"))).click()
driver.find_element(By.TAG_NAME, "li").click()
driver.find_element(By.ID, "year").send_keys("2000")
wait.until(EC.visibility_of_element_located((By.ID, 'continue'))).click()
wait.until(EC.visibility_of_element_located((By.ID, "name"))).send_keys(firstname)
break
except:pass
try:
driver.find_element(By.ID, "name").send_keys(firstname)
break
except:pass
print("typeing in other info")
wait.until(EC.visibility_of_element_located((By.ID, "lastName"))).send_keys(lastname)
driver.find_element(By.ID, "email").send_keys(email.lower())
driver.find_element(By.ID, "password").send_keys(password)
driver.find_element(By.ID, "tos").click()
print("waiting for continue button")
if wusername == False:
driver.find_element(By.ID, "displayName").send_keys(username)
if email == "nothing":
print("custom email")
else:wait.until(EC.visibility_of_element_located((By.XPATH, "//*[contains(text(), 'Continue')]"))).click()
else:
wait.until(EC.visibility_of_element_located((By.XPATH, "/html/body/div[4]/div/div[1]/h1"))).click()
print("completing interia account")
switch(0)
if emailservice == '4': pass
if emailservice == '2': finish_interia()
if emailservice == '3': create_outlook()
if emailservice == '1': finish_proton()
switch(1)
print("waiting for user to complete epicgames captcha")
wait.until(EC.visibility_of_element_located((By.XPATH, "//*[contains(text(), 'Please verify your email')]")))
print("verifying email address")
switch(0)
print("waiting to recieve verification email")
wait.until(EC.visibility_of_element_located((By.XPATH, "//*[contains(text(), 'Epic Games')]"))).click()
print("getting verification code from email")
time.sleep(5)
switch(1)
print("waiting until authcode visible")
wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, '[style="word-wrap: break-word; white-space: pre-wrap;"]')))
print("getting authcode")
authcode = driver.page_source[245:-33]
print(f"sid is {authcode}")
random = random.randint(1,10000)
driver.get("https://store.epicgames.com/en-US/p/fortnite")
print("adding fortnite to your list of games")
wait.until(EC.visibility_of_element_located((By.XPATH,'/html/body/div[1]/div/div[4]/main/div[2]/div/div/div/div[2]/div[4]/div/aside/div/div/div[6]/div/button'))).click()
wait.until(EC.visibility_of_element_located((By.ID, "agree"))).click()
print("trying to click accept")
while True:
try:
driver.find_element(By.XPATH, '/html/body/div[8]/div/div/div/div[2]/div/div[2]/button').click()
print("clicked")
break
except:pass
try:
driver.find_element(By.XPATH, '/html/body/div[7]/div/div/div/div[2]/div/div[2]/button').click()
print("clicked")
break
except:pass
currenttime = time.strftime("%b-%d-%Y %I:%M")
print(f"{email}:{password} Username:{username} FirstName:{firstname} LastName:{lastname} Time:{currenttime}\n")
with open(f"accounts.txt", "a") as f:
f.write(f"{email}:{password} Username:{username} FirstName:{firstname} LastName:{lastname} Time:{currenttime}\n")
print("Saved Account to saved_accounts.txt")
print("waiting untill place order button exists")
print("waiting untill order confirmed screen appears")
while True:
try:
driver.find_element(By.XPATH, '/html/body/div[7]/div/div/div[2]/div/div/div/div[2]/div[3]/a')
break
except:pass
try:
driver.find_element(By.XPATH, '/html/body/div[8]/div/div/div[2]/div/div/div/div[2]/div[3]/a')
break
except:pass
driver.close()