1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-29 03:18:30 +00:00

Merge pull request #2497 from philsmd/tests_fix_13600_verify

tests: fixed -m 13600 = WinZip verification
This commit is contained in:
Jens Steube 2020-07-21 11:18:32 +02:00 committed by GitHub
commit c518240b67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -31,6 +31,7 @@
- Backend: Changed the maximum number of compute devices from 64 to 128 - Backend: Changed the maximum number of compute devices from 64 to 128
- Tests: Improved tests for hash-mode 11300 (Bitcoin/Litecoin wallet.dat) - Tests: Improved tests for hash-mode 11300 (Bitcoin/Litecoin wallet.dat)
- Tests: Improved tests for hash-mode 13600 (WinZip)
- Tests: Improved tests for hash-mode 16800 (WPA-PMKID-PBKDF2) - Tests: Improved tests for hash-mode 16800 (WPA-PMKID-PBKDF2)
* changes v5.1.0 -> v6.0.0 * changes v5.1.0 -> v6.0.0

View File

@ -94,7 +94,7 @@ sub module_generate_hash
my $auth = hmac_hex ($data, $key_bin, \&sha1, 64); my $auth = hmac_hex ($data, $key_bin, \&sha1, 64);
my $hash = sprintf ('$zip2$*%u*%u*%u*%s*%s*%x*%s*%s*$/zip2$', $type, $mode, $magic, $salt, $verify_bytes, $compress_length, $data, substr ($auth, 0, 20)); my $hash = sprintf ('$zip2$*%u*%u*%u*%s*%s*%s*%s*%s*$/zip2$', $type, $mode, $magic, $salt, $verify_bytes, $compress_length, unpack ("H*", $data), substr ($auth, 0, 20));
return $hash; return $hash;
} }
@ -136,6 +136,8 @@ sub module_verify_hash
return unless defined $salt; return unless defined $salt;
return unless defined $word; return unless defined $word;
$param6 = pack ("H*", $param6);
$word = pack_if_HEX_notation ($word); $word = pack_if_HEX_notation ($word);
my $new_hash = module_generate_hash ($word, $salt, $param, $param2, $param3, $param4, $param5, $param6); my $new_hash = module_generate_hash ($word, $salt, $param, $param2, $param3, $param4, $param5, $param6);