-
Notifications
You must be signed in to change notification settings - Fork 6
/
main.py
186 lines (164 loc) · 10.5 KB
/
main.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
from sys import stdout
from requests import post
from os import system, _exit, path
from random import choice, randint
from colors import green, red, reset
from time import time, sleep, strftime, gmtime
from threading import Thread, Lock, active_count
from string import ascii_letters, ascii_lowercase, digits
system('cls && title [Spotify Account Creator] - Main Menu')
headers = {'User-agent': 'S4A/2.0.15 (com.spotify.s4a; build:201500080; iOS 13.4.0) Alamofire/4.9.0', 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8', 'Accept': 'application/json, text/plain;q=0.2, */*;q=0.1', 'App-Platform': 'IOS', 'Spotify-App': 'S4A', 'Accept-Language': 'en-TZ;q=1.0', 'Accept-Encoding': 'gzip;q=1.0, compress;q=0.5', 'Spotify-App-Version': '2.0.15'}
domains = ['gmail.com', 'yahoo.com', 'hotmail.com', 'hotmail.co.uk', 'hotmail.fr', 'outlook.com', 'icloud.com', 'mail.com', 'live.com', 'yahoo.it', 'yahoo.ca', 'yahoo.in', 'live.se', 'orange.fr', 'msn.com', 'mail.ru', 'mac.com']
lock = Lock()
class Main:
def __init__(self):
self.variables = {
'proxies': [],
'proxy_num': 0,
'created': 0,
'retries': 0,
'cpm': 0,
'unlimited': False
}
logo = '''
███████╗██████╗ ██████╗ ████████╗██╗███████╗██╗ ██╗ ██████╗ ███████╗███╗ ██╗███████╗██████╗ █████╗ ████████╗ ██████╗ ██████╗
██╔════╝██╔══██╗██╔═══██╗╚══██╔══╝██║██╔════╝╚██╗ ██╔╝ ██╔════╝ ██╔════╝████╗ ██║██╔════╝██╔══██╗██╔══██╗╚══██╔══╝██╔═══██╗██╔══██╗
███████╗██████╔╝██║ ██║ ██║ ██║█████╗ ╚████╔╝ ██║ ███╗█████╗ ██╔██╗ ██║█████╗ ██████╔╝███████║ ██║ ██║ ██║██████╔╝
╚════██║██╔═══╝ ██║ ██║ ██║ ██║██╔══╝ ╚██╔╝ ██║ ██║██╔══╝ ██║╚██╗██║██╔══╝ ██╔══██╗██╔══██║ ██║ ██║ ██║██╔══██╗
███████║██║ ╚██████╔╝ ██║ ██║██║ ██║ ╚██████╔╝███████╗██║ ╚████║███████╗██║ ██║██║ ██║ ██║ ╚██████╔╝██║ ██║
╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝
'''
print('%s%s' % (green(), logo))
print('\n\n %s[%s1%s] HTTP\n [%s2%s] SOCKS4\n [%s3%s] SOCKS5\n\n%s> %sSelect a Proxy Type%s: ' % (green(), reset(), green(), reset(), green(), reset(), green(), reset(), green(), reset()), end = '')
self.proxy_type = str(input())
if self.proxy_type.upper() in ['1', 'HTTP']:
self.proxy_type = 'http'
elif self.proxy_type.upper() in ['2', 'SOCKS4']:
self.proxy_type = 'socks4'
elif self.proxy_type.upper() in ['3', 'SOCKS5']:
self.proxy_type = 'socks5'
else:
print('\n%s> %sInvalid input%s.' % (reset(), red(), reset()))
system('title [Spotify Account Creator] - Exiting . . .')
sleep(3)
_exit(0)
print('%s> %sAmount to create (empty for unlimited)%s: ' % (reset(), green(), reset()), end = '')
self.amount = str(input())
print()
if self.amount == '':
self.variables['unlimited'] = True
self.amount = 0
elif self.amount != '' and not self.amount.isdigit():
print('%s> %sInvalid input%s.' % (reset(), red(), reset()))
system('title [Spotify Account Creator] - Exiting . . .')
sleep(3)
_exit(0)
def setup(self):
if path.exists('Proxies.txt'):
with open('Proxies.txt', 'r', encoding = 'UTF-8') as f:
for line in f.read().splitlines():
if line != '':
self.variables['proxies'].append(line)
if len(self.variables['proxies']) == 0:
self.error_import(False)
else:
self.error_import(True)
def error_import(self, create):
if create:
open('Proxies.txt', 'a').close()
print('%s> %sPaste your proxies inside Proxies.txt%s!' % (reset(), red(), reset()))
system('title [Spotify Account Creator] - Exiting . . .')
sleep(3)
_exit(0)
def write(self, arg):
lock.acquire()
stdout.flush()
stdout.write('%s\n' % (arg.encode('ascii', 'replace').decode())) # Get less printing bugs on Windows
lock.release()
def cpm_counter(self):
if self.variables['unlimited']:
while True:
old = self.variables['created']
sleep(4)
new = self.variables['created']
self.variables['cpm'] = ((new - old) * 15)
else:
while self.variables['created'] != int(self.amount):
old = self.variables['created']
sleep(4)
new = self.variables['created']
self.variables['cpm'] = ((new - old) * 15)
def update_title(self):
if self.variables['unlimited']:
while True:
elapsed = strftime('%H:%M:%S', gmtime(time() - self.start))
system('title [Spotify Account Creator] - Created: %s ^| Retries: %s ^| CPM: %s ^| Time Elapsed: %s ^| Threads: %s' % (self.variables['created'], self.variables['retries'], self.variables['cpm'], elapsed, (active_count() - 2)))
sleep(0.4)
else:
while self.variables['created'] != int(self.amount):
elapsed = strftime('%H:%M:%S', gmtime(time() - self.start))
system('title [Spotify Account Creator] - Created: %s/%s ^| Retries: %s ^| CPM: %s ^| Time Elapsed: %s ^| Threads: %s' % (self.variables['created'], self.amount, self.variables['retries'], self.variables['cpm'], elapsed, (active_count() - 2)))
sleep(0.4)
elapsed = strftime('%H:%M:%S', gmtime(time() - self.start))
system('title [Spotify Account Creator] - Created: %s/%s ^| Retries: %s ^| CPM: %s ^| Time Elapsed: %s ^| Threads: %s' % (self.variables['created'], self.amount, self.variables['retries'], self.variables['cpm'], elapsed, (active_count() - 2)))
def retry(self):
self.variables['retries'] += 1
self.creator(choice(self.variables['proxies']))
def creator(self, proxy):
email = '%s@%s' % (''.join(choice(ascii_lowercase + digits) for _ in range(randint(7, 10))), choice(domains))
password = ''.join(choice(ascii_letters + digits) for _ in range(randint(8, 14)))
birth_year = randint(1970, 2005)
birth_month = randint(1, 12)
birth_day = randint(1, 28)
gender = choice(['male', 'female'])
data = 'creation_point=lite_7e7cf598605d47caba394c628e2735a2&password_repeat=%s&platform=Android-ARM&iagree=true&password=%s&gender=%s&key=a2d4b979dc624757b4fb47de483f3505&birth_day=%s&birth_month=%s&email=%s&birth_year=%s' % (password, password, gender, birth_day, birth_month, email, birth_year)
try:
create = post('https://spclient.wg.spotify.com/signup/public/v1/account', data = data, headers = headers, proxies = {'https': '%s://%s' % (self.proxy_type, proxy)}, timeout = 5)
if create.json()['status'] == 1:
username = create.json()['username']
if username != '':
self.write('%s[%sCREATED%s] %s:%s | Username: %s | Gender: %s | Date of Birth: %s/%s-%s' % (green(), reset(), green(), email, password, username, gender.replace(gender[0], gender[0].upper()), birth_day, birth_month, birth_year))
with open('Created [RAW].txt', 'a', encoding = 'UTF-8') as f: f.write('%s:%s\n' % (email, password))
with open('Created [CAPTURE].txt', 'a', encoding = 'UTF-8') as f: f.write('%s:%s | Username: %s | Gender: %s | Date of Birth: %s/%s-%s\n' % (email, password, username, gender.replace(gender[0], gender[0].upper()), birth_day, birth_month, birth_year))
self.variables['created'] += 1
else:
self.retry()
else:
self.retry()
except:
self.retry()
def multi_threading(self):
self.start = time()
Thread(target = self.cpm_counter).start()
Thread(target = self.update_title).start()
if self.variables['unlimited']:
while True:
try:
Thread(target = self.creator, args = (self.variables['proxies'][self.variables['proxy_num']],)).start()
except:
continue
self.variables['proxy_num'] += 1
if self.variables['proxy_num'] >= len(self.variables['proxies']):
self.variables['proxy_num'] = 0
else:
num = 0
while num < int(self.amount):
try:
Thread(target = self.creator, args = (self.variables['proxies'][self.variables['proxy_num']],)).start()
except:
continue
num += 1
self.variables['proxy_num'] += 1
if self.variables['proxy_num'] >= len(self.variables['proxies']):
self.variables['proxy_num'] = 0
while self.variables['created'] != int(self.amount):
continue
print('\n%s> %sFinished%s.' % (reset(), green(), reset()))
system('pause >NUL')
print('> Exiting . . .')
sleep(3)
_exit(0)
if __name__ == '__main__':
main = Main()
main.setup()
main.multi_threading()