1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 08:08:10 +00:00

allow up to 64 bytes of salt in module 01460

This commit is contained in:
arrtchiu 2019-06-28 10:30:59 +08:00 committed by GitHub
parent 2e32eaf2bb
commit 2a1356a4f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,7 @@ static const u32 DGST_POS1 = 7;
static const u32 DGST_POS2 = 2; static const u32 DGST_POS2 = 2;
static const u32 DGST_POS3 = 6; static const u32 DGST_POS3 = 6;
static const u32 DGST_SIZE = DGST_SIZE_4_8; static const u32 DGST_SIZE = DGST_SIZE_4_8;
static const u32 DGST_BLK_SIZE = 64;
static const u32 HASH_CATEGORY = HASH_CATEGORY_RAW_HASH_AUTHENTICATED; static const u32 HASH_CATEGORY = HASH_CATEGORY_RAW_HASH_AUTHENTICATED;
static const char *HASH_NAME = "HMAC-SHA256 (key = $salt)"; static const char *HASH_NAME = "HMAC-SHA256 (key = $salt)";
static const u64 KERN_TYPE = 1460; static const u64 KERN_TYPE = 1460;
@ -40,6 +41,7 @@ u64 module_kern_type (MAYBE_UNUSED const hashconfig_t *hashconfig,
u32 module_opti_type (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 OPTI_TYPE; } u32 module_opti_type (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 OPTI_TYPE; }
u64 module_opts_type (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 OPTS_TYPE; } u64 module_opts_type (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 OPTS_TYPE; }
u32 module_salt_type (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 SALT_TYPE; } u32 module_salt_type (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 SALT_TYPE; }
u32 module_salt_max (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_BLK_SIZE; }
const char *module_st_hash (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 ST_HASH; } const char *module_st_hash (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 ST_HASH; }
const char *module_st_pass (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 ST_PASS; } const char *module_st_pass (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 ST_PASS; }
@ -214,7 +216,7 @@ void module_init (module_ctx_t *module_ctx)
module_ctx->module_pwdump_column = MODULE_DEFAULT; module_ctx->module_pwdump_column = MODULE_DEFAULT;
module_ctx->module_pw_max = MODULE_DEFAULT; module_ctx->module_pw_max = MODULE_DEFAULT;
module_ctx->module_pw_min = MODULE_DEFAULT; module_ctx->module_pw_min = MODULE_DEFAULT;
module_ctx->module_salt_max = MODULE_DEFAULT; module_ctx->module_salt_max = module_salt_max;
module_ctx->module_salt_min = MODULE_DEFAULT; module_ctx->module_salt_min = MODULE_DEFAULT;
module_ctx->module_salt_type = module_salt_type; module_ctx->module_salt_type = module_salt_type;
module_ctx->module_separator = MODULE_DEFAULT; module_ctx->module_separator = MODULE_DEFAULT;