You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modify the crack function to handle both external API and local hash
def crack(hashvalue, hashtype):
result = False
for api in globals()[hashtype.lower()]: # Use globals() to dynamically select the hash functions
r = api(hashvalue, hashtype)
if r:
return r
return False
Existing code...
if directory:
try:
grepper(directory)
except KeyboardInterrupt:
pass
elif file:
try:
miner(file)
except KeyboardInterrupt:
pass
with open('cracked-%s' % file.split('/')[-1], 'w+') as f:
for hashvalue, cracked in result.items():
f.write(hashvalue + ':' + cracked + '\n')
print('%s Results saved in cracked-%s' % (info, file.split('/')[-1]))
CODE ERREUR : 002
The text was updated successfully, but these errors were encountered: