mirror of
https://github.com/hashcat/hashcat.git
synced 2024-10-31 20:48:57 +00:00
Merge pull request #3841 from philsmd/6800_verify_fix
verify test fix for -m 6800 = LastPass sniffed
This commit is contained in:
commit
20682e55b1
@ -19,8 +19,7 @@ sub module_generate_hash
|
|||||||
my $word = shift;
|
my $word = shift;
|
||||||
my $salt = shift;
|
my $salt = shift;
|
||||||
my $iter = shift // 100100;
|
my $iter = shift // 100100;
|
||||||
|
my $iv = shift // random_bytes (16);
|
||||||
my $iv = random_bytes(16);
|
|
||||||
|
|
||||||
my $hasher = Crypt::PBKDF2->hasher_from_algorithm ('HMACSHA2', 256);
|
my $hasher = Crypt::PBKDF2->hasher_from_algorithm ('HMACSHA2', 256);
|
||||||
|
|
||||||
@ -56,16 +55,21 @@ sub module_verify_hash
|
|||||||
{
|
{
|
||||||
my $line = shift;
|
my $line = shift;
|
||||||
|
|
||||||
my ($hash, $iter, $salt, $word) = split ":", $line;
|
my ($hash, $iter, $salt, $iv, $word) = split ":", $line;
|
||||||
|
|
||||||
return unless defined $hash;
|
return unless defined $hash;
|
||||||
return unless defined $iter;
|
return unless defined $iter;
|
||||||
return unless defined $salt;
|
return unless defined $salt;
|
||||||
return unless defined $word;
|
return unless defined $word;
|
||||||
|
return unless defined $iv;
|
||||||
|
|
||||||
|
return unless ($iv =~ m/^[0-9a-fA-F]{32}$/);
|
||||||
|
|
||||||
|
$iv = pack ("H*", $iv);
|
||||||
|
|
||||||
$word = pack_if_HEX_notation ($word);
|
$word = pack_if_HEX_notation ($word);
|
||||||
|
|
||||||
my $new_hash = module_generate_hash ($word, $salt, $iter);
|
my $new_hash = module_generate_hash ($word, $salt, $iter, $iv);
|
||||||
|
|
||||||
return ($new_hash, $word);
|
return ($new_hash, $word);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user