'''
Password Breaker

Summary
A program that cracks a password when the parameters of each character have been narrowed down and having a hash to compare to.
'''
import hashlib

def get_hash(string):
    m = hashlib.sha256()
    m.update(str.encode(string))
    return m.hexdigest()

possible_first = 'QWERTASDFGZXCVB'

possible_second = 'yuiophjklnm'

possible_third = '0123456789'

possible_fourth = 'qwertasdfgzxcvb'

possible_fifth = '!@#$%^&*()'

possible_sixth = 'yuiophjklnm'

for firstCharacter in possible_first:
    for secondCharacter in possible_second:
        for thirdCharacter in possible_third:
            for fourthCharacter in possible_fourth:
                for fifthCharacter in possible_fifth:
                    for sixthCharacter in possible_sixth:
                        possible_pass = firstCharacter + secondCharacter + thirdCharacter + fourthCharacter + fifthCharacter + sixthCharacter
                        
                        if get_hash(possible_pass) == '4886ad594177de63fe41fd947ef3f06fb52dcca8b0b7c8ff1759f5dfbe1c2142':
                            print(possible_pass)
                            sys.exit()
else:
    print("Program cannot find match")
 
    
    
    
    
    
    
    




Scroll to Top