-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcleaned_email.py
executable file
·143 lines (113 loc) · 4.11 KB
/
cleaned_email.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
#!/usr/bin/python3
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
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
import os
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support.select import Select
print('ProtonVPN account creation started')
warnings.filterwarnings("ignore", category=DeprecationWarning)
options = Options()
email_driver = webdriver.Chrome(executable_path='./chromedriver', chrome_options=options)
email_url = 'https://www.guerrillamail.com/'
print("Loading temp-mail server:", email_url)
email_driver.get(email_url)
t = 0
timeout = 60
wait = WebDriverWait(email_driver, 60)
def checkTimeout():
global t, timeout
if t > timeout:
t = 0
print("Connection timed out. Exiting now!")
exit(-1)
t += 1
while True:
try:
email = email_driver.find_element_by_id('inbox-id').text + '@'
domain_name = Select(email_driver.find_element_by_id('gm-host-select')).first_selected_option.text
email += domain_name
print(email)
break
except:
checkTimeout()
time.sleep(1)
verifymail = email
# Change Path to Chrome Driver Path (or move your ChromeDriver into the project folder)
driver = webdriver.Chrome(executable_path='./chromedriver', chrome_options=options)
url = 'http://account.protonvpn.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))
def getUserName():
f = open('lastused.txt')
val = int(f.readline().strip())
f.close()
f = open('lastused.txt', 'w')
val += 1
f.write(str(val))
return 'AbolitionMan'+str(val - 1)
rngusername = getUserName()
rngpassword = 'infinity'
print("Loading protonvpn server:", url)
driver.get(url)
while True:
try:
driver.find_element_by_css_selector("body > div.app-root > main > main > div > div:nth-child(5) > div:nth-child(1) > div.flex-item-fluid-auto.pt1.pb1.flex.flex-column > button").click()
break
except:
checkTimeout()
time.sleep(1)
while True:
try:
driver.find_element_by_id("username").send_keys(rngusername)
driver.find_element_by_id("password").send_keys(rngpassword)
driver.find_element_by_id("passwordConfirmation").send_keys(rngpassword)
driver.find_element_by_id("email").send_keys(verifymail)
driver.find_element_by_css_selector("body > div.app-root > main > main > div > div.pt2.mb2 > div > div:nth-child(1) > form > div:nth-child(3) > div > button").click()
break
except:
checkTimeout()
time.sleep(1)
while True:
try:
driver.find_element_by_css_selector("body > div.app-root > main > main > div > div.pt2.mb2 > div > div.w100 > div:nth-child(2) > div > div > div:nth-child(2) > form > div:nth-child(2) > button").click()
break
except:
checkTimeout()
time.sleep(1)
print("Wait for verification")
while True:
try:
val = email_driver.find_element_by_class_name('email-excerpt').text
if not val[-6:].isnumeric():
raise Exception
print(val[-6:], "verification")
driver.find_element_by_id('code').send_keys(val[-6:])
time.sleep(1)
driver.find_element_by_css_selector('body > div.app-root > main > main > div > div.pt2.mb2 > div > div.w100 > div:nth-child(2) > form > div > div > div:nth-child(4) > button').click()
break
except:
checkTimeout()
time.sleep(1)
print("Account Created \uE405\nYour Details")
f = open('list.csv', 'a')
info = rngusername +', '+ rngpassword + '\n'
f.write(info)
print("Username", rngusername, "Password", rngpassword)
print("Info also added to list.csv")
time.sleep(5)
driver.quit()
email_driver.quit()