Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import hashlib
- #our list of bad passwords
- bad=["password", "passw0rd","password1", "mypassword","qwerty", "welcome",
- "abcdefg", "admin", "login", "starwars", "batman", "superman",
- "00000", "11111", "22222", "33333", "44444", "55555", "66666",
- "77777", "88888", "99999", "1234567890", "12345", "123456", "2468",
- "1234", "princess", "cheese", "pizza", "porsche", "guitar", "piano",
- "cats", "dogs", "birds", "monkeys", "baseball", "soccer", "football",
- "basketball", "tennis", "fishing"]
- #returns the sha224 hash of the input
- def getHash(text):
- return hashlib.sha224(text.encode()).hexdigest()
- #make our dictionary of passwords
- def makeDictionary():
- dictionary = {}
- for password in bad:
- dictionary[getHash(password)] = password
- return dictionary
- #main
- while(True):
- passwords = makeDictionary()
- word = input("Enter a hashed password to crack: ")
- if word in passwords.keys():
- print("The password is: "+ passwords[word])
- else:
- print("Couldn't crack password")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement