1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-01-08 23:01:14 +00:00

Changed the test cases to expect the HEX

This commit is contained in:
Michael Kruger 2021-07-16 15:38:42 +02:00
parent 32b4a2cfd5
commit a6ae33b1cd
2 changed files with 4 additions and 5 deletions

View File

@ -8,7 +8,6 @@
use strict;
use warnings;
use Authen::Passphrase::NTHash;
use Digest::HMAC qw (hmac hmac_hex);
use Digest::MD5 qw (md5);
use Encode qw (encode);
@ -129,8 +128,8 @@ sub module_generate_hash
my $ntresp;
# my $nthash = pack_if_HEX_notation ($word);
my $nthash = pack ("H*", $word);
my $nthash = pack_if_HEX_notation ($word);
# my $nthash = pack ("H*", $word);
my $nthashpadded = $nthash . "\x00" x 5;
$ntresp .= Crypt::ECB::encrypt (setup_des_key (substr ($nthashpadded, 0, 7)), "DES", $challenge, "none");

View File

@ -29,8 +29,8 @@ sub module_generate_hash
my $b_srv_ch = pack ('H*', $srv_ch);
my $b_cli_ch = pack ('H*', $cli_ch);
# my $nthash = pack_if_HEX_notation ($word);
my $nthash = pack ("H*", $word);
my $nthash = pack_if_HEX_notation ($word);
# my $nthash = pack ("H*", $word);
my $identity = encode ('UTF-16LE', uc ($user) . $domain);
my $digest = hmac_hex ($b_srv_ch . $b_cli_ch, hmac ($identity, $nthash, \&md5, 64), \&md5, 64);