Last active
February 24, 2017 07:47
-
-
Save bitnetwork/6041f41c729ceb9854970cbeba93c677 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib | |
hashes = ["86a1ea3adf8fbb53eb7a9b6b6b01c020", "099b3b060154898840f0ebdfb46ec78f", "912ec803b2ce49e4a541068d495ab570", "1a1dc91c907325c69271ddf0c944bc72", "81dc9bdb52d04dc20036dbd8313ed055", "3d3e47f4b9143d4d788b5bda77ba41f9", "902fbdd2b1df0c4f70b4a5d23525e932", "4a7d1ed414474e4033ac29ccb8653d9b", "912ec803b2ce49e4a541068d495ab570", "6d87a19f011653459575ceb722db3b69", "9996535e07258a7bbfd8b132435c5962", "17d33d006957f5528a413429c3049b35"] | |
index = [0] | |
charset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
# Increments the character by one | |
def incrementChar(): | |
index[0] += 1 | |
for pos in range(len(index)): | |
if index[pos] + 0 >= len(charset): | |
if len(index) <= pos + 1: | |
index.append(0) | |
index[pos] = 0 | |
else: | |
index[pos + 1] += 1 | |
index[pos] = 0 | |
# Decodes index into attempt | |
def decodeAttempt(): | |
attempt = "" | |
for pos in index: | |
attempt = charset[pos] + attempt; | |
return attempt | |
while len(index) < 4: | |
attempt = decodeAttempt() | |
attemptHash = hashlib.md5(attempt.encode("utf-8")).hexdigest() | |
for hash in range(len(hashes)): | |
if hashes[hash] == attemptHash: | |
print(hashes[hash] + " " + attempt) | |
incrementChar() | |
# def solve_password(word): | |
# global attempted_password | |
# for character in word: | |
# for entry in list_of_chars: | |
# if character == entry: | |
# attempted_password += character | |
# continue | |
# return attempted_password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment