From 13dcae6879bfecfd981a7d9a16b6c8f83c9a4d40 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Thu, 21 Nov 2019 09:39:07 +0100 Subject: [PATCH] Fix -m 15400 selftest-pair, benchmark-mask and unit-test --- src/modules/module_15400.c | 6 +++--- tools/test_modules/m15400.pm | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/modules/module_15400.c b/src/modules/module_15400.c index 0660d13b6..505530ff6 100644 --- a/src/modules/module_15400.c +++ b/src/modules/module_15400.c @@ -24,8 +24,8 @@ static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE | OPTI_TYPE_RAW_HASH; static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE; static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED; -static const char *ST_PASS = "hashcat"; -static const char *ST_HASH = "$chacha20$*0400000000000003*35*0200000000000001*3961626364656667*8a152c57a7a856a8"; +static const char *ST_PASS = "hashcat_hashcat_hashcat_hashcat_"; +static const char *ST_HASH = "$chacha20$*0400000000000003*16*0200000000000001*5152535455565758*6b05fe554b0bc3b3"; u32 module_attack_exec (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ATTACK_EXEC; } u32 module_dgst_pos0 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return DGST_POS0; } @@ -55,7 +55,7 @@ static const char *SIGNATURE_CHACHA20 = "$chacha20$"; const char *module_benchmark_mask (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { - const char *mask = "?a?a?a?a?a?a?a?axxxxxxxxxxxxxxxxxxxxxxxxx"; + const char *mask = "?a?a?a?a?a?a?a?axxxxxxxxxxxxxxxxxxxxxxxx"; return mask; } diff --git a/tools/test_modules/m15400.pm b/tools/test_modules/m15400.pm index eb8395170..67c6d4641 100644 --- a/tools/test_modules/m15400.pm +++ b/tools/test_modules/m15400.pm @@ -10,7 +10,7 @@ use warnings; use Crypt::OpenSSH::ChachaPoly; -sub module_constraints { [[-1, -1], [-1, -1], [32, 32], [-1, -1], [-1, -1]] } +sub module_constraints { [[32, 32], [-1, -1], [-1, -1], [-1, -1], [-1, -1]] } sub module_generate_hash { @@ -40,8 +40,9 @@ sub module_generate_hash my $plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz0a2b4c6d8e"; my $eight_byte_iv = pack ("H*", $iv); my $eight_byte_counter = pack ("H*", $counter); - my $pad_len = 32 - length ($word); - my $key = $word . "\0" x $pad_len; + #my $pad_len = 32 - length ($word); + #my $key = $word . "\0" x $pad_len; + my $key = $word; my $cipher = Crypt::OpenSSH::ChachaPoly->new ($key);