mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-27 02:18:21 +00:00
Merge pull request #1171 from philsmd/master
tests: -m 13300 = AxCrypt in memory SHA1 output length fix
This commit is contained in:
commit
9562751d9b
@ -2305,7 +2305,7 @@ sub verify
|
|||||||
my $signature = shift @data;
|
my $signature = shift @data;
|
||||||
my $digest = shift @data;
|
my $digest = shift @data;
|
||||||
|
|
||||||
my $param = length ($digest);
|
$param = length ($digest);
|
||||||
|
|
||||||
next unless ($signature eq 'axcrypt_sha1');
|
next unless ($signature eq 'axcrypt_sha1');
|
||||||
next unless (($param == 32) || ($param == 40));
|
next unless (($param == 32) || ($param == 40));
|
||||||
@ -7477,9 +7477,16 @@ END_CODE
|
|||||||
}
|
}
|
||||||
elsif ($mode == 13300)
|
elsif ($mode == 13300)
|
||||||
{
|
{
|
||||||
|
my $length = 32;
|
||||||
|
|
||||||
|
if ($additional_param)
|
||||||
|
{
|
||||||
|
$length = $additional_param;
|
||||||
|
}
|
||||||
|
|
||||||
$hash_buf = sha1_hex ($word_buf);
|
$hash_buf = sha1_hex ($word_buf);
|
||||||
|
|
||||||
$tmp_hash = sprintf ('$axcrypt_sha1$%s', substr ($hash_buf, 0, 32));
|
$tmp_hash = sprintf ('$axcrypt_sha1$%s', substr ($hash_buf, 0, $length));
|
||||||
}
|
}
|
||||||
elsif ($mode == 13400)
|
elsif ($mode == 13400)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user