-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMailG.py
More file actions
179 lines (159 loc) · 7.6 KB
/
MailG.py
File metadata and controls
179 lines (159 loc) · 7.6 KB
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
from selenium.webdriver.common.by import By
from selenium.webdriver import Firefox
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
import time
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec
import string
from random import *
import json
from nickname_generator import generate
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
from threading import Thread
from selenium.common.exceptions import TimeoutException
from datetime import datetime
def passgen(x):
characters = string.ascii_letters + string.digits
password = "".join(choice(characters) for x in range(randint(14, 16)))
return password
def sav(Email, Passwd):
f = open("data_done100percent.txt", "a")
data = str(Email + ' ' + Passwd + '' + '\n')
f.write(data)
f.close()
def retoggleAllTheAddons(driver):
driver.get("about:addons")
driver.find_element_by_id("category-extension").click()
driver.execute_script("""
let hb = document.getElementById("html-view-browser");
let al = hb.contentWindow.window.document.getElementsByTagName("addon-list")[0];
let cards = al.getElementsByTagName("addon-card");
for(let card of cards){
card.addon.disable();
card.addon.enable();
}
""")
def DriverDie(driver):
try:
driver.close()
except:
pass
def checkCaptchaControl(driver):
wait = WebDriverWait(driver, 0.2)
GoNext = 0
while GoNext == 0:
try:
# numReqWhileCaptcha
wait.until(ec.element_to_be_clickable((By.XPATH, '/html/body/div[1]/div[3]/div[3]/div/div/div/form/div[3]/p')))
DriverDie(driver)
except TimeoutException:
pass
try:
wait.until(ec.element_to_be_clickable((By.CSS_SELECTOR, '.c2182')))
return 1
except TimeoutException:
pass
def numberReq(driver):
wait = WebDriverWait(driver, 0.2)
GoNext = 0
while GoNext == 0:
try:
#numReq
wait.until(ec.element_to_be_clickable((By.CSS_SELECTOR, 'small.c0128:nth-child(1)')))
DriverDie(driver)
except TimeoutException:
pass
try:
#nastroit
wait.until(ec.element_to_be_clickable((By.CSS_SELECTOR, '.c2182')))
GoNext = checkCaptchaControl(driver)
except TimeoutException:
pass
try:
#ok captcha
wait.until(ec.element_to_be_clickable((By.CSS_SELECTOR, '.c011382')))
GoNext = checkCaptchaControl(driver)
except TimeoutException:
pass
try:
#numReqWhileCaptcha
wait.until(ec.element_to_be_clickable((By.XPATH, '/html/body/div[1]/div[3]/div[3]/div/div/div/form/div[3]/p')))
DriverDie(driver)
except TimeoutException:
pass
def degenerate_ru():
accname =(generate() + generate() + str(randint(100, 9000)))
Email =(accname + "@mail.ru")
Passwd= passgen(randint(1, 23243400))
return accname, Email, Passwd
def degenerate_ua():
accname =(generate() + generate() + str(randint(100, 9000)))
Email =(accname + "@mail.ua")
Passwd= passgen(randint(1, 23243400))
return accname, Email, Passwd
def main(accname, Email, Passwd):
f = open("data.txt", "a")
data = str(Email + ' ' + Passwd + '' + '\n')
f.write(data)
f.close()
print(Email)
print(Passwd)
options = Options()
options.headless = True
binary = FirefoxBinary("C:\\Program Files\\Mozilla Firefox\\firefox.exe")
#profile = FirefoxProfile("C:\\Users\\PussyDestroyer\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\7dvs7u3f.default")
profile = FirefoxProfile("C:\\Users\\qweqweqwe\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\bmiwtt76.default")
driver = webdriver.Firefox(firefox_profile=profile, firefox_binary=binary)
wait = WebDriverWait(driver, 1800)
# retoggleAllTheAddons(driver)
driver.delete_all_cookies()
driver.get('https://account.mail.ru/signup?from=navi&lang=ru_RU')
wait.until(ec.element_to_be_clickable((By.CSS_SELECTOR, '#fname'))).send_keys('qwe')
wait.until(ec.element_to_be_clickable((By.CSS_SELECTOR, '#lname'))).send_keys('qwe')
wait.until(ec.element_to_be_clickable((By.XPATH, '/html/body/div[1]/div[3]/div[3]/div/div/div/form/div[5]/div[2]/div/div[1]/div/div/div/div/div[1]/span'))).click()
wait.until(ec.element_to_be_clickable((By.XPATH, '//div/div/div[2]/div/div/div/div/div/div/div'))).click()
wait.until(ec.element_to_be_clickable((By.XPATH, '/html/body/div[1]/div[3]/div[3]/div/div/div/form/div[5]/div[2]/div/div[3]/div/div/div/div[1]'))).click()
wait.until(ec.element_to_be_clickable((By.XPATH, '//div/div/div/div/div[2]/span'))).click()
wait.until(ec.element_to_be_clickable((By.XPATH, '/html/body/div[1]/div[3]/div[3]/div/div/div/form/div[5]/div[2]/div/div[5]/div/div/div/div'))).click()
wait.until(ec.element_to_be_clickable((By.XPATH, '//div/div/div/div/div[2]/span'))).click()
driver.find_element_by_xpath("//*[contains(text(), 'Мужской')]").click()
wait.until(ec.element_to_be_clickable((By.CSS_SELECTOR, '#aaa__input'))).send_keys(accname)
wait.until(ec.element_to_be_clickable((By.CSS_SELECTOR, '#password'))).send_keys('Lol123456qwe')
wait.until(ec.element_to_be_clickable((By.CSS_SELECTOR, '#repeatPassword'))).send_keys('Lol123456qwe')
#wait.until(ec.element_to_be_clickable((By.CSS_SELECTOR, '#phone-number__phone-input'))).send_keys('9789601886') #1
#wait.until(ec.element_to_be_clickable((By.CSS_SELECTOR, '#phone-number__phone-input'))).send_keys('9787393986') #2
time.sleep(0.5)
wait.until(ec.element_to_be_clickable((By.XPATH, '/html/body/div[1]/div[3]/div[3]/div/div/div/form/button'))).click()
numberReq(driver)
wait.until(ec.element_to_be_clickable((By.CSS_SELECTOR, '#PH_logoutLink')))
driver.get('https://id.mail.ru/security')
wait.until(ec.element_to_be_clickable((By.CSS_SELECTOR, '.innerText-0-2-85'))).click()
wait.until(ec.element_to_be_clickable((By.XPATH, '/html/body/div[2]/div[2]/div/div/div[2]/form/div[5]/div[2]/div/div/input'))).send_keys('Lol123456qwe')
wait.until(ec.element_to_be_clickable((By.XPATH, '/html/body/div[2]/div[2]/div/div/div[2]/form/div[8]/div[2]/div[1]/div/div/div/input'))).send_keys(Passwd)
wait.until(ec.element_to_be_clickable(
(By.XPATH, '/html/body/div[2]/div[2]/div/div/div[2]/form/div[12]/div[2]/div/div/input'))).send_keys(
Passwd)
wait.until(ec.element_to_be_clickable(
(By.XPATH, '/html/body/div[2]/div[2]/div/div/div[2]/form/button[1]/span'))).click()
sav(Email, Passwd)
wait.until(ec.element_to_be_clickable((By.XPATH, '/html/body/div[2]/div[2]/div/div/div[2]/div/button/span'))).click()
#wait.until(ec.element_to_be_clickable((By.CSS_SELECTOR, 'button.base-0-2-77:nth-child(1) > div:nth-child(1) > svg:nth-child(1)'))).click()
#wait.until(ec.element_to_be_clickable((By.XPATH, '/html/body/div[2]/div[2]/div/div/div[2]/form/div[4]/button[1]/span'))).click()
#wait.until(ec.element_to_be_clickable((By.XPATH, '/html/body/div[2]/div[2]/div/div/div[2]/div/button/span'))).click()
DriverDie(driver)
if __name__ == '__main__':
f = open("data_done100percent.txt", "a")
data = str(datetime.now()) + '\n'
f.write(data)
f.close()
threads = []
for n in range(10):
time.sleep(0.1)
t = Thread(target=main, args=degenerate_ua())
time.sleep(0.1)
t.start()
threads.append(t)
for t in threads:
t.join()