@@ -917,15 +917,15 @@ def dictionaryAttack(attack_dict):
917917 hash_ = hash_ .lower ()
918918
919919 if hash_regex in (HASH .MD5_BASE64 , HASH .SHA1_BASE64 , HASH .SHA256_BASE64 , HASH .SHA512_BASE64 ):
920- item = [(user , decodeBase64 (hash_ , binary = False ). encode ( "hex" )), {}]
920+ item = [(user , encodeHex ( decodeBase64 (hash_ , binary = True ) )), {}]
921921 elif hash_regex in (HASH .MYSQL , HASH .MYSQL_OLD , HASH .MD5_GENERIC , HASH .SHA1_GENERIC , HASH .SHA224_GENERIC , HASH .SHA256_GENERIC , HASH .SHA384_GENERIC , HASH .SHA512_GENERIC , HASH .APACHE_SHA1 ):
922922 item = [(user , hash_ ), {}]
923923 elif hash_regex in (HASH .SSHA ,):
924- item = [(user , hash_ ), {"salt" : decodeBase64 (hash_ , binary = False )[20 :]}]
924+ item = [(user , hash_ ), {"salt" : decodeBase64 (hash_ , binary = True )[20 :]}]
925925 elif hash_regex in (HASH .SSHA256 ,):
926- item = [(user , hash_ ), {"salt" : decodeBase64 (hash_ , binary = False )[32 :]}]
926+ item = [(user , hash_ ), {"salt" : decodeBase64 (hash_ , binary = True )[32 :]}]
927927 elif hash_regex in (HASH .SSHA512 ,):
928- item = [(user , hash_ ), {"salt" : decodeBase64 (hash_ , binary = False )[64 :]}]
928+ item = [(user , hash_ ), {"salt" : decodeBase64 (hash_ , binary = True )[64 :]}]
929929 elif hash_regex in (HASH .ORACLE_OLD , HASH .POSTGRES ):
930930 item = [(user , hash_ ), {'username' : user }]
931931 elif hash_regex in (HASH .ORACLE ,):
0 commit comments