1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-01-22 21:51:07 +00:00

Merge pull request #3348 from philsmd/fix_23400_tests

fix test/verify for -m 23400
This commit is contained in:
Jens Steube 2022-06-30 20:44:22 +02:00 committed by GitHub
commit 8fe64aec57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ sub module_verify_hash
return unless substr ($hash, 0, 12) eq '$bitwarden$2';
my ($type, $iter, $salt_base64, $hash_base64) = split ('\*', $hash);
my ($type, $iter, $iter2, $salt_base64, $hash_base64) = split ('\*', $hash);
return unless defined ($type);
return unless defined ($iter);
@ -66,8 +66,9 @@ sub module_verify_hash
$type = substr ($type, 11);
return unless ($type eq '1');
return unless ($type eq '2');
return unless ($iter =~ m/^[0-9]{1,7}$/);
return unless ($iter2 =~ m/^[0-9]{1,7}$/);
return unless ($salt_base64 =~ m/^[a-zA-Z0-9+\/=]+$/);
return unless ($hash_base64 =~ m/^[a-zA-Z0-9+\/=]+$/);
@ -75,7 +76,7 @@ sub module_verify_hash
my $word_packed = pack_if_HEX_notation ($word);
my $new_hash = module_generate_hash ($word_packed, $salt, $iter);
my $new_hash = module_generate_hash ($word_packed, $salt, $iter, $iter2);
return ($new_hash, $word);
}