forked from hendrikbgr/YandexMail-Account-Creator
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathnewpassword.py
135 lines (104 loc) · 4.77 KB
/
newpassword.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
# 🚀 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
import os
clear = lambda: os.system('clear')
clear()
collector = create_collector('my-collector', 'https')
print ('\033[31m' + """\
____ __ __ ___ _ __
/ __ \_________ / /_____ ____ / |/ /___ _(_) /
/ /_/ / ___/ __ \/ __/ __ \/ __ \/ /|_/ / __ `/ / /
/ ____/ / / /_/ / /_/ /_/ / / / / / / / /_/ / / /
/_/ /_/ \____/\__/\____/_/ /_/_/ /_/\__,_/_/_/
___ __
/ | ______________ __ ______ / /_
/ /| |/ ___/ ___/ __ \/ / / / __ \/ __/
/ ___ / /__/ /__/ /_/ / /_/ / / / / /_
/_/ |_\___/\___/\____/\__,_/_/ /_/\__/
______ __
/ ____/_______ ____ _/ /_____ _____
/ / / ___/ _ \/ __ `/ __/ __ \/ ___/
/ /___/ / / __/ /_/ / /_/ /_/ / /
\____/_/ \___/\__,_/\__/\____/_/
""" + '\033[0m')
print ('\033[31m' + "Auto Password Changer Script" + '\033[0m')
restart = 2
while (restart > 1):
emailaddress = input('\033[31m' + "Enter Email Address: " + '\033[0m')
password = input('\033[31m' + "Enter Password: " + '\033[0m')
newpassword = input('\033[31m' + "Enter New Password: " + '\033[0m')
proxy_status = "false"
while (proxy_status == "false"):
# Retrieve only 'us' proxies
proxygrab = collector.get_proxy({'code': ('us', 'uk')})
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://example.org", 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"
else:
from selenium.webdriver.chrome.options import Options
warnings.filterwarnings("ignore", category=DeprecationWarning)
options = Options()
options.add_argument('--proxy-server={}'.format(proxy))
# Change Path to Chrome Driver Path (or move your ChromeDriver into the project folder)
driver = webdriver.Chrome(executable_path='/Users/hendrik/Development/ProtonMail-Account-Creator/driver/chromedriver', chrome_options=options)
url = 'http://mail.protonmail.com/login'
driver.get(url)
time.sleep(4)
driver.find_element_by_id('username').send_keys(emailaddress)
time.sleep(1)
driver.find_element_by_id('password').send_keys(password)
time.sleep(1)
driver.find_element_by_id('login_btn').click()
time.sleep(3)
driver.find_element_by_id('tour-settings').click()
time.sleep(3)
driver.find_elements_by_css_selector('html.protonmail.gr__mail_protonmail_com.ua-gecko.ua-gecko-70.ua-gecko-70-0.ua-firefox.ua-firefox-70.ua-firefox-70-0.ua-desktop.ua-desktop-macintosh.ua-mac_os_x.ua-mac_os_x-10.ua-mac_os_x-10-14.js body#secured-account.appConfigBody-is-firefox.appConfigBody-is-mac.secure.appConfigBody-is-free div#body div#pm_main div#pm_settings div.settings div.row.pm_grid section.pm_form.col-1-2 p button.pm_button').click()
complete = "false"
while (complete == "false"):
complete_q = input('\033[31m' + "Are you done? y/n: " + '\033[0m')
if complete_q == "y":
driver.close()
print ('\033[31m' + "Ok! The script is exiting now." + '\033[0m')
time.sleep(1)
clear()
exit()
else:
print ('\033[31m' + 'Ok. Take your time.' + '\033[0m')
time.sleep(1)
complete = "false"
else:
print("something")