mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-01 12:28:24 +00:00
Prepare hash_category
This commit is contained in:
parent
bbcc8fea29
commit
4c133c4567
@ -296,6 +296,7 @@ u32 default_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *ha
|
|||||||
u32 default_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
u32 default_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||||
u64 default_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
u64 default_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||||
u32 default_forced_outfile_format (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
u32 default_forced_outfile_format (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||||
|
u32 default_hash_category (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 *default_hash_name (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 *default_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||||
u32 default_hash_mode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
u32 default_hash_mode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||||
u32 default_hash_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);
|
u32 default_hash_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);
|
||||||
|
@ -17,6 +17,7 @@ u32 module_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *ha
|
|||||||
u32 module_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
u32 module_dgst_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||||
u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||||
u32 module_forced_outfile_format (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
u32 module_forced_outfile_format (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||||
|
u32 module_hash_category (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_hash_name (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_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||||
u32 module_hash_mode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
u32 module_hash_mode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||||
u32 module_hash_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);
|
u32 module_hash_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);
|
||||||
|
@ -943,6 +943,7 @@ struct hashconfig
|
|||||||
const char *st_hash;
|
const char *st_hash;
|
||||||
const char *st_pass;
|
const char *st_pass;
|
||||||
|
|
||||||
|
u32 hash_category;
|
||||||
const char *hash_name;
|
const char *hash_name;
|
||||||
|
|
||||||
const char *benchmark_mask;
|
const char *benchmark_mask;
|
||||||
@ -2264,6 +2265,7 @@ typedef struct module_ctx
|
|||||||
u32 (*module_dgst_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
u32 (*module_dgst_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||||
u64 (*module_esalt_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
u64 (*module_esalt_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||||
u32 (*module_forced_outfile_format) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
u32 (*module_forced_outfile_format) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||||
|
u32 (*module_hash_category) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||||
const char *(*module_hash_name) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
const char *(*module_hash_name) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||||
u32 (*module_hash_mode) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
u32 (*module_hash_mode) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||||
u32 (*module_hash_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
u32 (*module_hash_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||||
@ -2464,3 +2466,11 @@ typedef enum hash_type
|
|||||||
HASH_TYPE_ODF11 = 73,
|
HASH_TYPE_ODF11 = 73,
|
||||||
|
|
||||||
} hash_type_t;
|
} hash_type_t;
|
||||||
|
|
||||||
|
typedef enum hash_category
|
||||||
|
{
|
||||||
|
HASH_CATEGORY_UNDEFINED = 0,
|
||||||
|
HASH_CATEGORY_RAW_HASH = 1,
|
||||||
|
|
||||||
|
|
||||||
|
} hash_category_t;
|
||||||
|
@ -18,6 +18,7 @@ static const u32 DGST_POS1 = 3;
|
|||||||
static const u32 DGST_POS2 = 2;
|
static const u32 DGST_POS2 = 2;
|
||||||
static const u32 DGST_POS3 = 1;
|
static const u32 DGST_POS3 = 1;
|
||||||
static const u32 DGST_SIZE = DGST_SIZE_4_4;
|
static const u32 DGST_SIZE = DGST_SIZE_4_4;
|
||||||
|
static const u32 HASH_CATEGORY = HASH_CATEGORY_RAW_HASH;
|
||||||
static const char *HASH_NAME = "NTLM";
|
static const char *HASH_NAME = "NTLM";
|
||||||
static const u32 HASH_TYPE = HASH_TYPE_MD4;
|
static const u32 HASH_TYPE = HASH_TYPE_MD4;
|
||||||
static const u64 KERN_TYPE = 1000;
|
static const u64 KERN_TYPE = 1000;
|
||||||
@ -42,6 +43,7 @@ u32 module_dgst_pos1 (MAYBE_UNUSED const hashconfig_t *hashconfig,
|
|||||||
u32 module_dgst_pos2 (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_POS2; }
|
u32 module_dgst_pos2 (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_POS2; }
|
||||||
u32 module_dgst_pos3 (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_POS3; }
|
u32 module_dgst_pos3 (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_POS3; }
|
||||||
u32 module_dgst_size (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_SIZE; }
|
u32 module_dgst_size (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_SIZE; }
|
||||||
|
u32 module_hash_category (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 HASH_CATEGORY; }
|
||||||
const char *module_hash_name (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 HASH_NAME; }
|
const char *module_hash_name (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 HASH_NAME; }
|
||||||
u32 module_hash_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 HASH_TYPE; }
|
u32 module_hash_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 HASH_TYPE; }
|
||||||
u64 module_kern_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 KERN_TYPE; }
|
u64 module_kern_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 KERN_TYPE; }
|
||||||
@ -135,6 +137,7 @@ void module_init (module_ctx_t *module_ctx)
|
|||||||
module_ctx->module_hash_encode_status = MODULE_DEFAULT;
|
module_ctx->module_hash_encode_status = MODULE_DEFAULT;
|
||||||
module_ctx->module_hash_encode = module_hash_encode;
|
module_ctx->module_hash_encode = module_hash_encode;
|
||||||
module_ctx->module_hash_mode = MODULE_DEFAULT;
|
module_ctx->module_hash_mode = MODULE_DEFAULT;
|
||||||
|
module_ctx->module_hash_category = module_hash_category;
|
||||||
module_ctx->module_hash_name = module_hash_name;
|
module_ctx->module_hash_name = module_hash_name;
|
||||||
module_ctx->module_hash_type = module_hash_type;
|
module_ctx->module_hash_type = module_hash_type;
|
||||||
module_ctx->module_hlfmt_disable = MODULE_DEFAULT;
|
module_ctx->module_hlfmt_disable = MODULE_DEFAULT;
|
||||||
|
@ -674,6 +674,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
|
|||||||
hashconfig->dictstat_disable = default_dictstat_disable (hashconfig, user_options, user_options_extra);
|
hashconfig->dictstat_disable = default_dictstat_disable (hashconfig, user_options, user_options_extra);
|
||||||
hashconfig->esalt_size = default_esalt_size (hashconfig, user_options, user_options_extra);
|
hashconfig->esalt_size = default_esalt_size (hashconfig, user_options, user_options_extra);
|
||||||
hashconfig->forced_outfile_format = default_forced_outfile_format (hashconfig, user_options, user_options_extra);
|
hashconfig->forced_outfile_format = default_forced_outfile_format (hashconfig, user_options, user_options_extra);
|
||||||
|
hashconfig->hash_category = default_hash_category (hashconfig, user_options, user_options_extra);
|
||||||
hashconfig->hash_mode = default_hash_mode (hashconfig, user_options, user_options_extra);
|
hashconfig->hash_mode = default_hash_mode (hashconfig, user_options, user_options_extra);
|
||||||
hashconfig->hash_name = default_hash_name (hashconfig, user_options, user_options_extra);
|
hashconfig->hash_name = default_hash_name (hashconfig, user_options, user_options_extra);
|
||||||
hashconfig->hash_type = default_hash_type (hashconfig, user_options, user_options_extra);
|
hashconfig->hash_type = default_hash_type (hashconfig, user_options, user_options_extra);
|
||||||
@ -726,6 +727,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
|
|||||||
if (module_ctx->module_dictstat_disable != MODULE_DEFAULT) hashconfig->dictstat_disable = module_ctx->module_dictstat_disable (hashconfig, user_options, user_options_extra);
|
if (module_ctx->module_dictstat_disable != MODULE_DEFAULT) hashconfig->dictstat_disable = module_ctx->module_dictstat_disable (hashconfig, user_options, user_options_extra);
|
||||||
if (module_ctx->module_esalt_size != MODULE_DEFAULT) hashconfig->esalt_size = module_ctx->module_esalt_size (hashconfig, user_options, user_options_extra);
|
if (module_ctx->module_esalt_size != MODULE_DEFAULT) hashconfig->esalt_size = module_ctx->module_esalt_size (hashconfig, user_options, user_options_extra);
|
||||||
if (module_ctx->module_forced_outfile_format != MODULE_DEFAULT) hashconfig->forced_outfile_format = module_ctx->module_forced_outfile_format (hashconfig, user_options, user_options_extra);
|
if (module_ctx->module_forced_outfile_format != MODULE_DEFAULT) hashconfig->forced_outfile_format = module_ctx->module_forced_outfile_format (hashconfig, user_options, user_options_extra);
|
||||||
|
if (module_ctx->module_hash_category != MODULE_DEFAULT) hashconfig->hash_category = module_ctx->module_hash_category (hashconfig, user_options, user_options_extra);
|
||||||
if (module_ctx->module_hash_mode != MODULE_DEFAULT) hashconfig->hash_mode = module_ctx->module_hash_mode (hashconfig, user_options, user_options_extra);
|
if (module_ctx->module_hash_mode != MODULE_DEFAULT) hashconfig->hash_mode = module_ctx->module_hash_mode (hashconfig, user_options, user_options_extra);
|
||||||
if (module_ctx->module_hash_name != MODULE_DEFAULT) hashconfig->hash_name = module_ctx->module_hash_name (hashconfig, user_options, user_options_extra);
|
if (module_ctx->module_hash_name != MODULE_DEFAULT) hashconfig->hash_name = module_ctx->module_hash_name (hashconfig, user_options, user_options_extra);
|
||||||
if (module_ctx->module_hash_type != MODULE_DEFAULT) hashconfig->hash_type = module_ctx->module_hash_type (hashconfig, user_options, user_options_extra);
|
if (module_ctx->module_hash_type != MODULE_DEFAULT) hashconfig->hash_type = module_ctx->module_hash_type (hashconfig, user_options, user_options_extra);
|
||||||
@ -1108,6 +1110,13 @@ const char *default_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYB
|
|||||||
return hash_name;
|
return hash_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 default_hash_category (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 u32 hash_category = HASH_CATEGORY_UNDEFINED;
|
||||||
|
|
||||||
|
return hash_category;
|
||||||
|
}
|
||||||
|
|
||||||
u32 default_pw_min (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
|
u32 default_pw_min (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 bool optimized_kernel = (hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL);
|
const bool optimized_kernel = (hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL);
|
||||||
|
Loading…
Reference in New Issue
Block a user