mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-22 08:08:10 +00:00
Fix -m 15400 selftest-pair, benchmark-mask and unit-test
This commit is contained in:
parent
588e0ed294
commit
13dcae6879
@ -24,8 +24,8 @@ static const u32 OPTI_TYPE = OPTI_TYPE_ZERO_BYTE
|
|||||||
| OPTI_TYPE_RAW_HASH;
|
| OPTI_TYPE_RAW_HASH;
|
||||||
static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE;
|
static const u64 OPTS_TYPE = OPTS_TYPE_PT_GENERATE_LE;
|
||||||
static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED;
|
static const u32 SALT_TYPE = SALT_TYPE_EMBEDDED;
|
||||||
static const char *ST_PASS = "hashcat";
|
static const char *ST_PASS = "hashcat_hashcat_hashcat_hashcat_";
|
||||||
static const char *ST_HASH = "$chacha20$*0400000000000003*35*0200000000000001*3961626364656667*8a152c57a7a856a8";
|
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_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; }
|
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 *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;
|
return mask;
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ use warnings;
|
|||||||
|
|
||||||
use Crypt::OpenSSH::ChachaPoly;
|
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
|
sub module_generate_hash
|
||||||
{
|
{
|
||||||
@ -40,8 +40,9 @@ sub module_generate_hash
|
|||||||
my $plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz0a2b4c6d8e";
|
my $plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz0a2b4c6d8e";
|
||||||
my $eight_byte_iv = pack ("H*", $iv);
|
my $eight_byte_iv = pack ("H*", $iv);
|
||||||
my $eight_byte_counter = pack ("H*", $counter);
|
my $eight_byte_counter = pack ("H*", $counter);
|
||||||
my $pad_len = 32 - length ($word);
|
#my $pad_len = 32 - length ($word);
|
||||||
my $key = $word . "\0" x $pad_len;
|
#my $key = $word . "\0" x $pad_len;
|
||||||
|
my $key = $word;
|
||||||
|
|
||||||
my $cipher = Crypt::OpenSSH::ChachaPoly->new ($key);
|
my $cipher = Crypt::OpenSSH::ChachaPoly->new ($key);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user