-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSMail.py
More file actions
94 lines (75 loc) · 2.76 KB
/
Copy pathSMail.py
File metadata and controls
94 lines (75 loc) · 2.76 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
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import sys
import random
konular = [
"message1",
"message2",
"meesage3",
"Input message list"
]
print("-------------------------------------------------------------------------------------")
print()
print("""
) ____) | | / \ (_ _) \ |
( (___ | |\/| | / \ | | | |
\___ \ | | | | / () \ | | | |
____) ) | | | | | __ | _| |_ | |__
( (__| |__| |_| (__) |_( )_/ )_
""")
print("SMail spam bot version 1.0\nAny illegal use belongs to the user.")
print()
say = 1
sy = 1
def start():
global say
smtpserver = input(
"[!] Chooise server Yandex[1] or Google[2]\n[*] Select 1 or 2 for chooise : ")
if smtpserver == "2":
print("[!] Warning, Google not supported 3'rd party software.")
x = input(
"[?] Would you like to continue anyway? [Y/y for yes, N/n for no]: ")
if x == "N" or x == "n":
print("Application exit.\nGoodbye :P")
sys.exit(1)
elif x == "Y" or x == "y":
print(
"---------------------------------------------------------------------------------\n[!] Continued")
else:
print("[!] Please enter Y,N, try again that program.")
start()
account = input("[*] Sender's mail address: ")
password = input("[*] Sender's mail password: ")
to = input("[*] Recipient's e-mail address: ")
number = int(input("[*] How many e-mails will you send?: "))
print("---------------------------------------------------------------------------------")
if smtpserver == "1":
server = smtplib.SMTP_SSL('smtp.yandex.com.tr', 465)
elif smtpserver == "2":
server = smtplib.SMTP('smtp.gmail.com', 587)
server.starttls()
server.ehlo()
# Starting in here.
print("Starting...")
while say <= number:
subject = random.choice(konular)
body = random.choice(konular)
try:
server.login(account, password)
except Exception as err:
print("Please check your mail system supported 3rd software settings. Please review: https://github.com/s4msecurity/SMail/issues/1")
print(err)
exit()
mail = MIMEText(body, 'html', 'utf-8')
mail['from'] = account
mail['subject'] = subject
mail['to'] = ','.join(to)
mail = mail.as_string()
try:
server.sendmail(account, to, mail)
except Exception as err:
print(err)
print("["+str(say)+"]"+"sending... ")
say = say + 1
start()