27 lines
517 B
Python
27 lines
517 B
Python
# Python!
|
|
import hashlib
|
|
|
|
string = b'ffykfhsq'
|
|
|
|
password = 'xxxxxxxx'
|
|
print(password)
|
|
|
|
i = 0
|
|
while True:
|
|
hash_input = string + str(i).encode()
|
|
hash_output = hashlib.md5(hash_input).hexdigest()
|
|
index = -1
|
|
|
|
try:
|
|
index = int(hash_output[5])
|
|
except ValueError:
|
|
pass
|
|
|
|
if hash_output[:5] == '00000' and 0 <= index <= 7 and password[index] == 'x':
|
|
password = password[:index] + hash_output[6] + password[index + 1:]
|
|
print(password)
|
|
if 'x' not in password:
|
|
break
|
|
i += 1
|
|
|
|
print('Full password:', password) |