From a6ae33b1cd68d4543efad71c456d59bae4b93b90 Mon Sep 17 00:00:00 2001 From: Michael Kruger Date: Fri, 16 Jul 2021 15:38:42 +0200 Subject: [PATCH] Changed the test cases to expect the HEX --- tools/test_modules/m27000.pm | 5 ++--- tools/test_modules/m27100.pm | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/test_modules/m27000.pm b/tools/test_modules/m27000.pm index 42f40985c..e77e471ea 100644 --- a/tools/test_modules/m27000.pm +++ b/tools/test_modules/m27000.pm @@ -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"); diff --git a/tools/test_modules/m27100.pm b/tools/test_modules/m27100.pm index 14e4a9234..851cadc49 100644 --- a/tools/test_modules/m27100.pm +++ b/tools/test_modules/m27100.pm @@ -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);