-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainVersion.py
166 lines (157 loc) · 6.15 KB
/
MainVersion.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import smtplib
import time
import os
import getpass
import sys
class bcolors:
GREEN = "\033[92m"
WARNING = "\033[93m"
FAIL = "\033[91m"
ENDC = "\033[0m"
def spam():
os.system('cls' if os.name == 'nt' else 'clear')
print( bcolors.GREEN + """
┌───════════════════════════════════════════════════───┐
│ │
║ ██████ ██▓███ ▄▄▄ ███▄ ▄███▓ ║
║ ▒██ ▒ ▓██░ ██▒ ▒████▄ ▓██▒▀█▀ ██▒ ║
║ ░ ▓██▄ ▓██░ ██▓▒ ▒██ ▀█▄ ▓██ ▓██░ ║
║ ▒ ██▒ ▒██▄█▓▒ ▒ ░██▄▄▄▄██ ▒██ ▒██ ║
║ ▒██████▒▒ ▒██▒ ░ ░ ▓█ ▓██▒ ▒██▒ ░██▒ ║
║ ▒ ▒▓▒ ▒ ░ ▒▓▒░ ░ ░ ▒▒ ▓▒█░ ░ ▒░ ░ ░ ║
║ ░ ░▒ ░ ░ ░▒ ░ ▒ ▒▒ ░ ░ ░ ░ ║
║ ░ ░ ░ ░░ ░ ▒ ░ ░ ║
║ ░ ░ ░ ░ ║
│ » developed by @theUnknowableOne « │
└───════════════════════════════════════════════════───┘
""" + bcolors.ENDC)
os.system('cls' if os.name == 'nt' else 'clear')
try:
file1 = open("./logo.txt", "r")
print(" ")
print(bcolors.FAIL + file1.read() + bcolors.ENDC)
file1.close()
except IOError:
print(" [!] Banner File not found.")
try:
server = input(bcolors.GREEN + " Choose mail server » " + bcolors.ENDC)
user = input(bcolors.GREEN + " Your Email » " + bcolors.ENDC)
pwd = getpass.getpass(bcolors.GREEN + " Password » " + bcolors.ENDC)
to = input(bcolors.GREEN + " To » " + bcolors.ENDC)
subject = input(bcolors.GREEN + " Subject (Optional) » " + bcolors.ENDC)
body = input(bcolors.GREEN + " Message » " + bcolors.ENDC)
nomes = input(bcolors.GREEN + " Number of Emails to send » " + bcolors.ENDC)
no = 0
message = " From » " + user + "\n Subject » " + subject + "\n" + body
except KeyboardInterrupt:
print(bcolors.FAIL + "\n [!] Canceled." + bcolors.ENDC)
sys.exit()
# Gmail
if server == "1" or server == "gmail" or server == "Gmail":
spam()
server = smtplib.SMTP("smtp.gmail.com", 587)
server.ehlo()
server.starttls()
try:
server.login(user, pwd)
except smtplib.SMTPAuthenticationError:
print(bcolors.FAIL + """ [!] Your Username or Password is incorrect, please try again using the correct credentials.
Or you need to enable less secure apps.
On Gmail: https://myaccount.google.com/lesssecureapps """ + bcolors.ENDC)
sys.exit()
while no != nomes:
try:
server.sendmail(user, to, message)
print(bcolors.WARNING + " [+] Successfully sent » " + str(no+1) + " emails" + bcolors.ENDC)
no += 1
time.sleep(.8)
except KeyboardInterrupt:
print(bcolors.FAIL + "\n [!] Canceled." + bcolors.ENDC)
sys.exit()
except:
print(" [!] Failed to Send.")
server.close()
# Yahoo
elif server == "2" or server == "Yahoo" or server == "yahoo":
server = smtplib.SMTP("smtp.mail.yahoo.com", 587)
spam()
server.starttls()
try:
server.login(user, pwd)
except smtplib.SMTPAuthenticationError:
print(bcolors.FAIL + """ [!] Your Username or Password is incorrect, please try again using the correct credentials.
Or you need to enable less secure apps.
On Yahoo: https://login.yahoo.com/account/security?.scrumb=Tiby8TXUvJt#less-secure-apps
""" + bcolors.ENDC)
sys.exit()
while no != nomes:
try:
server.sendmail(user, to, message)
print(bcolors.WARNING + " [!] Successfully sent » " + str(no + 1) + " emails" + bcolors.ENDC)
no += 1
time.sleep(.8)
except KeyboardInterrupt:
print(bcolors.FAIL + "\n [!] Canceled." + bcolors.ENDC)
sys.exit()
except:
print(" [!] Failed to Send.")
server.close()
# Hotmail
elif server == "3" or server == "outlook" or server == "Outlook" or server == "Hotmail" or server == "hotmail":
server = smtplib.SMTP("smtp-mail.outlook.com", 587)
spam()
server.ehlo()
server.starttls()
try:
server.login(user, pwd)
except smtplib.SMTPAuthenticationError:
print(bcolors.FAIL + " Your Username or Password is incorrect, please try again using the correct credentials." + bcolors.ENDC)
sys.exit()
while no != nomes:
try:
server.sendmail(user, to, message)
print(bcolors.WARNING + " Successfully sent » " + str(no + 1) + " emails" + bcolors.ENDC)
no += 1
time.sleep(.8)
except KeyboardInterrupt:
print(bcolors.FAIL + "\n Canceled" + bcolors.ENDC)
sys.exit()
except smtplib.SMTPAuthenticationError:
print("\n [!] The username or password you entered is incorrect.")
sys.exit()
except:
print(" [1] Failed to Send.")
server.close()
# Outlook
elif server == "4" or server == "outlook" or server == "Outlook" or server == "Hotmail" or server == "hotmail":
server = smtplib.SMTP("smtp-mail.outlook.com", 587)
spam()
server.ehlo()
server.starttls()
try:
server.login(user, pwd)
except smtplib.SMTPAuthenticationError:
print(bcolors.FAIL + " Your Username or Password is incorrect, please try again using the correct credentials." + bcolors.ENDC)
sys.exit()
while no != nomes:
try:
server.sendmail(user, to, message)
print(bcolors.WARNING + " Successfully sent » " + str(no + 1) + " emails" + bcolors.ENDC)
no += 1
time.sleep(.8)
except KeyboardInterrupt:
print(bcolors.FAIL + "\n Canceled" + bcolors.ENDC)
sys.exit()
except smtplib.SMTPAuthenticationError:
print("\n [!] The username or password you entered is incorrect.")
sys.exit()
except:
print(" [1] Failed to Send.")
server.close()
else:
os.system("clear")
print(bcolors.ENDC + " [!] Works only with Gmail, Yahoo, Outlook and Hotmail." + bcolors.ENDC)
os.system("xdg-open https://github.com/mkdirlove.git")
sys.exit()