1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-22 06:38:11 +00:00

Merge pull request #3841 from philsmd/6800_verify_fix

verify test fix for -m 6800 = LastPass sniffed
This commit is contained in:
Jens Steube 2023-08-26 22:06:08 +02:00 committed by GitHub
commit 20682e55b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,8 +19,7 @@ sub module_generate_hash
my $word = shift;
my $salt = shift;
my $iter = shift // 100100;
my $iv = random_bytes(16);
my $iv = shift // random_bytes (16);
my $hasher = Crypt::PBKDF2->hasher_from_algorithm ('HMACSHA2', 256);
@ -56,16 +55,21 @@ sub module_verify_hash
{
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 $iter;
return unless defined $salt;
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);
my $new_hash = module_generate_hash ($word, $salt, $iter);
my $new_hash = module_generate_hash ($word, $salt, $iter, $iv);
return ($new_hash, $word);
}