forked from hendrikbgr/YandexMail-Account-Creator
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathemails.py
278 lines (226 loc) · 9.93 KB
/
emails.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
# 🚀 This Project is in it's early stages of Development.
# 📌 Working on new features and main menu.
# ⚠️ Any Questions or Suggestions please Mail to: [email protected]
# 🖥 Version: 1.0.0
from selenium import webdriver
from colorama import Fore, Back, Style
import warnings
import time
import random
import string
import urllib.request
import requests
import csv
import sys
from proxyscrape import create_collector
from selenium.webdriver.chrome.options import Options
import os
clear = lambda: os.system('clear')
clear()
i = 0
collector = create_collector('my-collector', 'https')
print ('\033[31m' + """\
____ __ __ ___ _ __
/ __ \_________ / /_____ ____ / |/ /___ _(_) /
/ /_/ / ___/ __ \/ __/ __ \/ __ \/ /|_/ / __ `/ / /
/ ____/ / / /_/ / /_/ /_/ / / / / / / / /_/ / / /
/_/ /_/ \____/\__/\____/_/ /_/_/ /_/\__,_/_/_/
___ __
/ | ______________ __ ______ / /_
/ /| |/ ___/ ___/ __ \/ / / / __ \/ __/
/ ___ / /__/ /__/ /_/ / /_/ / / / / /_
/_/ |_\___/\___/\____/\__,_/_/ /_/\__/
______ __
/ ____/_______ ____ _/ /_____ _____
/ / / ___/ _ \/ __ `/ __/ __ \/ ___/
/ /___/ / / __/ /_/ / /_/ /_/ / /
\____/_/ \___/\__,_/\__/\____/_/
""" + '\033[0m')
print ('\033[31m' + "Auto Account Creator Script" + '\033[0m')
print('\033[31m' + "Pick a proxy option:" + '\033[0m')
print('\033[31m' + "(1) - Crawl Free Proxies" + '\033[0m')
print('\033[31m' + "(2) - Load from file (recommended)" + '\033[0m')
print('\033[31m' + "(3) - No Proxy (experimental)" + '\033[0m')
proxy_option = input('\033[31m' + "Enter you option number: " + '\033[0m')
sys.stdout.write("\033[F")
sys.stdout.write("\033[K")
sys.stdout.write("\033[F")
sys.stdout.write("\033[K")
sys.stdout.write("\033[F")
sys.stdout.write("\033[K")
sys.stdout.write("\033[F")
sys.stdout.write("\033[K")
restart2 = 2
while (restart2 > 1):
# Pick an email for Verification. Replace '[email protected]' with an email adress. (You can use 10min mail for this)
verifymail = input('\033[31m' + "Enter Email Adress for Verification: " + '\033[0m')
# Pick an email for Notification. Replace '[email protected]' with an email adress. (You can use 10min mail for this)
notifymail = input('\033[31m' + "(Optional - Enter 'x' do dismiss) Enter Email Adress for Recovery: " + '\033[0m')
if proxy_option == "2":
sys.stdout.write("\033[F")
sys.stdout.write("\033[K")
sys.stdout.write("\033[F")
sys.stdout.write("\033[K")
sys.stdout.write("\033[F")
sys.stdout.write("\033[K")
proxy_status = "false"
while (proxy_status == "false"):
# Retrieve only 'us' proxies
proxygrab = collector.get_proxy({'code': ('us')})
proxy = ("{}:{}".format(proxygrab.host, proxygrab.port))
print ('\033[31m' + "Proxy:", proxy + '\033[0m')
try:
proxy_host = proxygrab.host
proxy_port = proxygrab.port
proxy_auth = ":"
proxies = {'http':'http://{}@{}:{}/'.format(proxy_auth, proxy_host, proxy_port)}
requests.get("http://protonmail.com/", proxies=proxies, timeout=1.5)
except OSError:
print ('\033[31m' + "Proxy Connection error!" + '\033[0m')
time.sleep(1)
sys.stdout.write("\033[F")
sys.stdout.write("\033[K")
sys.stdout.write("\033[F")
sys.stdout.write("\033[K")
proxy_status = "false"
else:
print ('\033[31m' + "Proxy is working..." + '\033[0m')
time.sleep(1)
sys.stdout.write("\033[F")
sys.stdout.write("\033[K")
sys.stdout.write("\033[F")
sys.stdout.write("\033[K")
proxy_status = "true"
options = Options()
options.add_argument('--proxy-server={}'.format(proxy))
else:
pass
if proxy_option == "2":
print('\033[31m' + "Getting Proxies from file..." + '\033[0m')
with open('./proxy.txt', 'r') as data:
proxy_lines = [line.strip() for line in data]
proxy_from_file = "false"
while (proxy_from_file == "false"):
i += 1
print('\033[31m' + proxy_lines[i] + '\033[0m')
try:
proxies_file = {'http':'http://:@{}/'.format(proxy_lines[i])}
requests.get("http://protonmail.com/", proxies=proxies_file, timeout=1.5)
except OSError:
print ('\033[31m' + "Proxy Connection error!" + '\033[0m')
proxy_from_file = "false"
sys.stdout.write("\033[F")
sys.stdout.write("\033[K")
sys.stdout.write("\033[F")
sys.stdout.write("\033[K")
else:
print ('\033[31m' + "Proxy is working..." + '\033[0m')
i += 1
options = Options()
options.add_argument('--proxy-server={}'.format(proxy_lines[i]))
proxy_from_file = "true"
proxy_option
else:
pass
if proxy_option == "3":
options = Options()
print('\033[31m' + "This is experimental! Script might not work in this mode" + '\033[0m')
else:
pass
warnings.filterwarnings("ignore", category=DeprecationWarning)
# Change Path to Chrome Driver Path (or move your ChromeDriver into the project folder)
driver = webdriver.Chrome(executable_path='./driver/chromedriver', chrome_options=options)
url = 'http://protonmail.com/signup'
def randomStringDigits(stringLength=13):
# Generate a random string of letters and digits
lettersAndDigits = string.ascii_letters + string.digits
return ''.join(random.choice(lettersAndDigits) for i in range(stringLength))
rngusername = randomStringDigits(13)
rngpassword = randomStringDigits(15)
driver.get(url)
time.sleep(4)
driver.find_element_by_class_name('panel-heading').click()
time.sleep(1)
driver.find_element_by_id('freePlan').click()
time.sleep(4)
driver.switch_to_frame(0)
time.sleep(3)
driver.find_element_by_id('username').send_keys(rngusername)
time.sleep(1)
driver.switch_to.default_content()
time.sleep(1)
driver.find_element_by_id('password').send_keys(rngpassword)
time.sleep(1)
driver.find_element_by_id('passwordc').send_keys(rngpassword)
time.sleep(1)
driver.switch_to_frame(1)
time.sleep(1)
if notifymail == "x":
notifymail = "[email protected]"
else:
pass
driver.find_element_by_id('notificationEmail').send_keys(notifymail)
time.sleep(1)
driver.find_element_by_name('submitBtn').click()
time.sleep(6)
print('\033[31m' + "What type of verification do you want to use?" + '\033[0m')
print('\033[31m' + "(1) Email verification" + '\033[0m')
print('\033[31m' + "(2) Captcha verification" + '\033[0m')
verifymethod = input('\033[31m' + "Enter Email Adress for Verification: " + '\033[0m')
if verifymethod == "1":
driver.find_element_by_id('id-signup-radio-email').click()
time.sleep(1)
driver.find_element_by_id('emailVerification').send_keys(verifymail)
time.sleep(1)
driver.find_element_by_class_name('codeVerificator-btn-send').click()
time.sleep(3)
elif verifymethod == "2":
print('\033[31m' + "Please complete the captcha in your browser. " + '\033[0m')
captchadone = input('\033[31m' + "Hit enter when captcha is complete" + '\033[0m')
time.sleep(1)
driver.find_element_by_xpath('/html/body/div[2]/div/div/div/form/div/div/p[3]/button').click()
print ('\033[31m' + "Your New Email Adress is: ", rngusername,"@protonmail.com", sep='' + '\033[0m')
print ('\033[31m' + "Your New Email Password is: " + '\033[0m' , rngpassword)
complete = "false"
while (complete == "false"):
complete_q = input('\033[31m' + "Did you complete the Verification process? y/n: " + '\033[0m')
if complete_q == "y":
driver.close()
csvData = [[rngusername + '@protonmail.com', rngpassword]]
with open('list.csv', 'a') as csvFile:
writer = csv.writer(csvFile)
writer.writerows(csvData)
csvFile.close()
print ('\033[31m' + 'Great! We added you account details to the table.' + '\033[0m')
complete = "true"
else:
print ('\033[31m' + 'Please try verifing and try again' + '\033[0m')
time.sleep(1)
complete = "false"
else:
restart_s = input('\033[31m' + "Do you want to restart the Script and create more Accounts? y/n: " + '\033[0m')
if restart_s == "y":
i += 1
clear()
print ('\033[31m' + """\
____ __ __ ___ _ __
/ __ \_________ / /_____ ____ / |/ /___ _(_) /
/ /_/ / ___/ __ \/ __/ __ \/ __ \/ /|_/ / __ `/ / /
/ ____/ / / /_/ / /_/ /_/ / / / / / / / /_/ / / /
/_/ /_/ \____/\__/\____/_/ /_/_/ /_/\__,_/_/_/
___ __
/ | ______________ __ ______ / /_
/ /| |/ ___/ ___/ __ \/ / / / __ \/ __/
/ ___ / /__/ /__/ /_/ / /_/ / / / / /_
/_/ |_\___/\___/\____/\__,_/_/ /_/\__/
______ __
/ ____/_______ ____ _/ /_____ _____
/ / / ___/ _ \/ __ `/ __/ __ \/ ___/
/ /___/ / / __/ /_/ / /_/ /_/ / /
\____/_/ \___/\__,_/\__/\____/_/
""" + '\033[0m')
restart2 == 3
else:
print ('\033[31m' + "Ok! The script is exiting now." + '\033[0m')
time.sleep(1)
exit()