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")
- Mary: '4fc07c8146ff8d20695edb3d980fab332183eb02af267d5d68de188d'
- Sahil: '02578d6a87eb6007f862ef2fa154022594aa876d5c6aa3a0a61b2b67'
- David: '5dd08b23e498e17e60a14d475e1278f02b0a5d66d62018a650e8ed60'
- Natalia: 'aa621a8486dc2000fa8e6502cc5dee7c719dda2659c13201e864c021'
- Nick: '489854666b057109a51aa1ad9f7c5dae26f10d4f36f9849ddf98a7eb'
- Hudi: '9b1cdbab8c8410d63ca8700b12d03b9f0bf93d33b793653cc0983ef3'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement