-
Notifications
You must be signed in to change notification settings - Fork 7
/
nikeaccountcreator.py
531 lines (426 loc) · 16.8 KB
/
nikeaccountcreator.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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
from selenium.webdriver.chrome.options import Options
from selenium.webdriver import DesiredCapabilities
from selenium.webdriver.common.proxy import Proxy, ProxyType
from selenium.webdriver.firefox.options import Options as Firefox_Options
from selenium import webdriver
from selenium.common.exceptions import WebDriverException
import os
import string
import random
import time
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from tqdm import tqdm
import threading
from bin.settings import Settings
from bin.proxies_settings import ProxySettings
from bin.verifysms import VerifySMS
from bin.versms import VerSMS
from bin.accounts_settings import AccountsSettings
def random_mail_ld():
return ''.join(random.choice(string.ascii_letters + string.digits) for i in range(8)) + '@gmail.com'
def random_mail_letters():
return ''.join(random.choice(string.ascii_letters) for i in range(4))
def random_password():
return ''.join(random.choice(string.ascii_letters + string.digits + string.ascii_uppercase + string.ascii_uppercase + string.digits) for i in range(12))
def write_file(usrname, psword):
f = open("accounts.txt", "a")
f.write("{}:{}:".format(usrname, psword))
f.close()
proxiess = [proxy.rstrip('\n') for proxy in open(ProxySettings.proxies_location)]
chromedriver_location = Settings.chromedriver_location
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1"')
chrome_options.add_argument("--mute-audio")
chrome_options.add_argument('--dns-prefetch-disable')
chrome_options.add_argument('--lang=en-US')
#chrome_options.add_argument('-headless')
def create_nike(n, location, PROXY=False):
n = n-1
r_mail = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(8)) + '@gmail.com'
r_fn = ''.join(random.choice(string.ascii_letters) for i in range(4))
r_pas = ''.join(random.choice(string.digits + string.ascii_lowercase + string.ascii_uppercase+ string.digits) for i in range(12))
r_ln = ''.join(random.choice(string.ascii_letters) for i in range(4))
if PROXY==True:
chrome_options.add_argument('--proxy-server=http://%s' % proxiess[n])
print("Connected to proxy -> {}".format(proxiess[n]))
else:
print("Using without proxy.")
driver = webdriver.Chrome(chrome_options=chrome_options, executable_path=chromedriver_location)
if PROXY==True:
print("Connected to proxy -> {}".format(proxiess[n]))
print("Starting new session...")
if location=='CN2':
os.system("cls")
username = input("Input username for smscin... ")
os.system("cls")
token = input("Input token for smscin... ")
os.system("cls")
pid = input("Input pid for smscin... ")
driver.get('https://www.nike.com/cn/zh_cn/s/register')
try:
time.sleep(4)
try:
flag = driver.find_element_by_xpath("//div[@class='modal-close-glyph nsg-glyph--x']")
flag.click()
except:
print("Something went wrong:/")
input_num = driver.find_element_by_xpath("//input[@type='tel']")
input_num.click()
input_num.clear()
input.send_keys(VerSMS.getmobile_cn(token, username, pid))
print("Number -> {}".format(VeySMS.getmobile_cn(token, username, pid)))
time.sleep(2)
send_code = driver.find_element_by_xpath("//input[@value='Send Code']")
send_code.click()
time.sleep(15)
code = driver.find_element_by_xpath("//input[@value='number']")
code.click()
code.clear()
code.send_keys(VerSMS.getsms_cn(token, username, pid))
print("Code -> {}".format(VerSMS.getsms_cn(token, username, pid)))
time.sleep(1)
except Exception as e:
print(e)
else:
try:
if location=='US':
driver.get('https://www.nike.com/us/en_us/s/register')
if location=='UK':
driver.get('https://www.nike.com/gb/en_gb/s/register')
except Exception as e:
print(e)
time.sleep(5)
'''if driver.find_element_by_class_name('exp-geodetect-notifier__title nsg-font-family--platform').is_displayed():
flag = driver.find_element_by_class_name('exp-geodetect-notifier__flag')
flag.click()'''
try:
flag = driver.find_element_by_xpath("//div[@class='modal-close-glyph nsg-glyph--x']")
flag.click()
except:
print("Something went wrong:/")
time.sleep(4)
try:
try:
em = driver.find_element_by_name('emailAddress')
em.click()
except:
print("Couldn't click!")
time.sleep(1)
em.clear()
em.send_keys(r_mail)
time.sleep(2)
try:
pas = driver.find_element_by_name('password')
pas.click()
except:
print("Couldn't click!")
time.sleep(1)
pas.clear()
try:
pas.send_keys(r_pas)
except:
print("Couldn't send keys!")
time.sleep(2)
try:
fn = driver.find_element_by_name('firstName')
fn.click()
except:
print("Couldn't click!")
time.sleep(1)
fn.clear()
try:
fn.send_keys(r_fn)
except:
print("Couldn't send keys!")
time.sleep(2)
try:
ln = driver.find_element_by_name('lastName')
ln.click()
except:
print("Couldn't click!")
time.sleep(1)
ln.clear()
try:
ln.send_keys(r_ln)
except:
print("Couldn't send keys!")
time.sleep(2)
try:
date_mm = Select(driver.find_element_by_id('nike-unite-date-id-mm'))
for index in range(len(date_mm.options)):
date_mm = Select(driver.find_element_by_id('nike-unite-date-id-mm'))
date_mm.select_by_index(index)
time.sleep(2)
date_dd = Select(driver.find_element_by_id('nike-unite-date-id-dd'))
for index in range(len(date_dd.options)):
date_dd = Select(driver.find_element_by_id('nike-unite-date-id-dd'))
date_dd.select_by_index(index)
time.sleep(2)
date_yyyy = Select(driver.find_element_by_id('nike-unite-date-id-yyyy'))
for index in range(len(date_yyyy.options)):
date_yyyy = Select(driver.find_element_by_id('nike-unite-date-id-yyyy'))
date_yyyy.select_by_index(index)
time.sleep(2)
except:
date_mm = driver.find_element_by_name('dateOfBirth')
date_mm.clear()
date_mm.send_keys('01.01.2000')
try:
genre = driver.find_element_by_xpath("//span[contains(text(), 'Male')]")
genre.click()
except:
print("Couldn't click!")
time.sleep(2)
try:
login_btn = driver.find_element_by_xpath("//input[@value='CREATE ACCOUNT']")
login_btn.click()
time.sleep(2)
print(" >>> Account created!")
write_file(r_mail, r_pas)
except:
print("Couldn't click!")
time.sleep(1)
driver.quit()
except Exception as e:
print(e)
def verify_smscin(username, token, pid):
f = open('accounts.txt', 'r+')
accs = []
for line in f.readlines():
for value in line.split(':'):
accs.append( value )
f.close()
n=1
i=0
final = [accs[i * n:(i + 1) * n] for i in range((len(accs) + n - 1) // n )]
for j in range(0, len(final)):
accs_mail = final[0:len(final):2]
accs_pass = final[1:len(final):2]
for i in range(0, len(final)//2):
driver = webdriver.Chrome(chrome_options=chrome_options, executable_path=chromedriver_location)
print('Trying to verify...')
time.sleep(10)
driver.get("https://www.nike.com/cn")
time.sleep(6)
try:
flag = driver.find_element_by_xpath("//div[@class='modal-close-glyph nsg-glyph--x']")
flag.click()
except:
print("Something went wrong:/")
time.sleep(7)
try:
log = driver.find_element_by_xpath("//button[@data-type='click_navJoinLogin']")
log.click()
except:
print("Nono")
try:
em = driver.find_element_by_name('emailAddress')
em.click()
except:
print("Couldn't click!")
time.sleep(1)
em.clear()
em.send_keys(accs_mail[i])
time.sleep(2)
try:
pas = driver.find_element_by_name('password')
pas.click()
except:
print("Couldn't click!")
time.sleep(1)
pas.clear()
try:
pas.send_keys(accs_pass[i])
except:
print("Couldn't send keys!")
time.sleep(4)
driver.get('https://www.nike.com/member/settings')
time.sleep(5)
try:
flag = driver.find_element_by_xpath("//div[@class='modal-close-glyph nsg-glyph--x']")
flag.click()
except:
print("Something went wrong:/")
try:
time.sleep(5)
try:
try:
ver = driver.find_element_by_xpath("//button[@class='ncss-btn-secondary-dark bg-white']")
except:
print("Can't find add button!")
try:
ver.click()
except:
print("Can't click!")
except:
print("Can't find button!")
input_num = driver.find_element_by_xpath("//input[@type='tel']")
input_num.click()
input_num.clear()
input.send_keys(VerSMS.getmobile_cn(token, username, pid))
print("Number -> {}".format(VeySMS.getmobile_cn(token, username, pid)))
time.sleep(2)
send_code = driver.find_element_by_xpath("//input[@value='Send Code']")
send_code.click()
time.sleep(15)
code = driver.find_element_by_xpath("//input[@value='number']")
code.click()
code.clear()
code.send_keys(VerSMS.getsms_cn(token, username, pid))
print("Code -> {}".format(VerSMS.getsms_cn(token, username, pid)))
time.sleep(1)
except Exceptions as e:
print(e)
def verify_simsms(token, location):
f = open('accounts.txt', 'r+')
accs = []
for line in f.readlines():
for value in line.split(':'):
accs.append( value )
f.close()
n=1
i=0
final = [accs[i * n:(i + 1) * n] for i in range((len(accs) + n - 1) // n )]
for j in range(0, len(final)):
accs_mail = final[0:len(final):2]
accs_pass = final[1:len(final):2]
for i in range(0, len(final)//2):
driver = webdriver.Chrome(chrome_options=chrome_options, executable_path=chromedriver_location)
print('Trying to verify...')
time.sleep(10)
if location=='US':
driver.get('https://www.nike.com/us/en_us/s/register')
if location=='UK':
driver.get('https://www.nike.com/gb/en_gb/s/register')
time.sleep(6)
try:
flag = driver.find_element_by_xpath("//div[@class='modal-close-glyph nsg-glyph--x']")
flag.click()
except:
print("Something went wrong:/")
time.sleep(7)
try:
log = driver.find_element_by_xpath("//button[@data-type='click_navJoinLogin']")
log.click()
except:
print("Nono")
try:
em = driver.find_element_by_name('emailAddress')
em.click()
except:
print("Couldn't click!")
time.sleep(1)
em.clear()
em.send_keys(accs_mail[i])
time.sleep(2)
try:
pas = driver.find_element_by_name('password')
pas.click()
except:
print("Couldn't click!")
time.sleep(1)
pas.clear()
try:
pas.send_keys(accs_pass[i])
except:
print("Couldn't send keys!")
time.sleep(4)
driver.get('https://www.nike.com/member/settings')
time.sleep(5)
try:
flag = driver.find_element_by_xpath("//div[@class='modal-close-glyph nsg-glyph--x']")
flag.click()
except:
print("Something went wrong:/")
try:
time.sleep(5)
try:
try:
ver = driver.find_element_by_xpath("//button[@class='ncss-btn-secondary-dark bg-white']")
except:
print("Can't find add button!")
try:
ver.click()
except:
print("Can't click!")
except:
print("Can't find button!")
time.sleep(2)
input_num = driver.find_element_by_xpath("//input[@type='tel']")
input_num.click()
input_num.clear()
input.send_keys(VerifySMS.getmobile(token, location))
print("Number -> {}".format(VerifySMS.getmobile(token, location)))
time.sleep(2)
send_code = driver.find_element_by_xpath("//input[@value='Send Code']")
send_code.click()
time.sleep(15)
code = driver.find_element_by_xpath("//input[@value='number']")
code.click()
code.clear()
code.send_keys(VerifySMS.getsms(token, location))
print("Code -> {}".format(VerifySMS.getsms(token, location)))
time.sleep(1)
agree = driver.find_element_by_class_name('checkbox')
agree.click()
time.sleep(2)
g = driver.find_element_by_xpath("//input[@value='number']")
g.click()
print("Account verified!")
except:
print("Can't verify!")
location = input("Choose location [UK, CN2, US]... ")
print("1.) Create accounts\n2.) Verify accounts")
c = int(input("\nChoose -> "))
if c==1:
os.system("cls")
col = int(input("How much accouts you want... "))
os.system("cls")
thread_list = []
for i in range(col):
t = threading.Thread(name='Starting {}'.format(i+2), target=create_nike(i, location, False))
t.start()
time.sleep(1)
print(t.name)
thread_list.append(t)
for thread in thread_list:
thread.join()
else:
os.system("cls")
print("1.) SimSMS\n2.) SMSCin")
sms = int(input("\nChoose -> "))
if sms==1:
os.system("cls")
token = input("Input SimSMS API Token... ")
thread_list = []
for i in range(0, 100):
t = threading.Thread(name='Starting {}'.format(i+2), target=verify_simsms(token, location))
t.start()
time.sleep(1)
print(t.name)
thread_list.append(t)
for thread in thread_list:
thread.join()
else:
os.system("cls")
username = input("Input username for smscin... ")
os.system("cls")
token = input("Input token for smscin... ")
os.system("cls")
pid = input("Input pid for smscin... ")
thread_list = []
for i in range(col):
t = threading.Thread(name='Starting {}'.format(i+2), target=verify_smscin(username, token, pid))
t.start()
time.sleep(1)
print(t.name)
thread_list.append(t)
for thread in thread_list:
thread.join()
'''while col > 0:
create_nike(col)
print(" >>> Created {} accounts :)".format(col-(col-1)))
col -= 1'''
time.sleep(1)