mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-26 01:50:10 +00:00
fix test/verify for -m 28600
This commit is contained in:
parent
e0fae5c7ab
commit
18c2d5cea2
@ -35,7 +35,7 @@ sub module_generate_hash
|
|||||||
my $pbkdf2_dgst = $pbkdf->PBKDF2 ($salt, $word);
|
my $pbkdf2_dgst = $pbkdf->PBKDF2 ($salt, $word);
|
||||||
|
|
||||||
my $server_key = hmac ($HMAC_SALT, $pbkdf2_dgst, \&sha256);
|
my $server_key = hmac ($HMAC_SALT, $pbkdf2_dgst, \&sha256);
|
||||||
my $stored_key = hmac ($HMAC_SALT_2, $pbkdf2_dgst, \&sha256);
|
my $stored_key = sha256 (hmac ($HMAC_SALT_2, $pbkdf2_dgst, \&sha256));
|
||||||
|
|
||||||
my $hash = sprintf ('SCRAM-SHA-256$%i:%s$%s:%s', $iter, encode_base64 ($salt, ""), encode_base64 ($stored_key, ""), encode_base64 ($server_key, ""));
|
my $hash = sprintf ('SCRAM-SHA-256$%i:%s$%s:%s', $iter, encode_base64 ($salt, ""), encode_base64 ($stored_key, ""), encode_base64 ($server_key, ""));
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ sub module_verify_hash
|
|||||||
{
|
{
|
||||||
my $line = shift;
|
my $line = shift;
|
||||||
|
|
||||||
my $idx = index ($line, '$');
|
my $idx = rindex ($line, ':');
|
||||||
|
|
||||||
return unless $idx >= 0;
|
return unless $idx >= 0;
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ sub module_verify_hash
|
|||||||
|
|
||||||
return unless substr ($hash, 0, 13) eq 'SCRAM-SHA-256';
|
return unless substr ($hash, 0, 13) eq 'SCRAM-SHA-256';
|
||||||
|
|
||||||
my (undef, $iter, $salt) = split ('\*|\$', $hash);
|
my (undef, $iter, $salt) = split (':|\$', $hash);
|
||||||
|
|
||||||
return unless defined ($iter);
|
return unless defined ($iter);
|
||||||
return unless defined ($salt);
|
return unless defined ($salt);
|
||||||
|
Loading…
Reference in New Issue
Block a user