def singleCrack(hash): if hashType(hash) in oneWay.algos: for db in oneWay.dbs: try: if oneWay.dbs[db](hash, hashType(hash)): output = (oneWay.dbs[db](hash, hashType(hash)), hashType(hash), db) return "\nhash: {0} \t plain: {1} type: {2} database: {3}".format( colored(hash, 'white'), colored(output[0], 'green'), colored(output[1], 'white'), colored(output[2], 'white') ) break else: return colored("{0} \t Not Found".format(hash), 'red') except: pass else: msg = colored("\n{0}: \t Not Detected.\n".format(hash), 'red') msg += colored('[+] Supported hashes [md5, sha1, sha224, sha256, mysql3, mysql4]', 'red') return msg
def singleCrack(hash): if hashType(hash) in oneWay.algos: for db in oneWay.dbs: try: if oneWay.dbs[db](hash, hashType(hash)): output = (oneWay.dbs[db](hash, hashType(hash)), hashType(hash), db) return "\nhash: {0} \t plain: {1} type: {2} database: {3}".format( colored(hash, 'white'), colored(output[0], 'green'), colored(output[1], 'white'), colored(output[2], 'white')) break else: return colored("{0} \t Not Found".format(hash), 'red') except: pass else: msg = colored("\n{0}: \t Not Detected.\n".format(hash), 'red') msg += colored( '[+] Supported hashes [md5, sha1, sha224, sha256, mysql3, mysql4]', 'red') return msg
'71537dbb0f2d3e415e7a91ff6243e0d2', 'a BS', 'd65a197664e1233729d709333bda1cdb', 'd65a197664e1233729d709333bda1cd2', 'dGVzdA==', '21232f297a57a5a743894a0e4a801fc3', 'd033e22ae348aeb5660fc2140aec35850c4da997', '9af2921d3fd57fe886c9022d1fcc055d53a79e4032fa6137e397583884e1a5de', '7c32fe8cc855fb7ddcc7a73346262ad10f46543643e7ae9490c8dae6' ] cracked = {} notCracked = {} notDetected = [] x = 1 for hash in hashes: print '{0:2d}- Checking: {1}'.format(x, hash) x += 1 if hashType(hash) in twoWay.algos: db = 'iCrackHash' cracked[hash] = (twoWay.algos[hashType(hash)](hash), hashType(hash), db) elif hashType(hash) in oneWay.algos: for db in oneWay.dbs: try: if oneWay.dbs[db](hash, hashType(hash)): cracked[hash] = (oneWay.dbs[db](hash, hashType(hash)), hashType(hash), db) break # break the inner loop else: notCracked[hash] = ('Unknown', hashType(hash), 'Unknown') except: pass