Add more global default value functions
This commit is contained in:
+15
-7
@@ -1718,16 +1718,24 @@ u32 hashconfig_forced_kernel_threads (hashcat_ctx_t *hashcat_ctx);
|
||||
u32 hashconfig_get_kernel_threads (hashcat_ctx_t *hashcat_ctx, const hc_device_param_t *device_param);
|
||||
u32 hashconfig_get_kernel_loops (hashcat_ctx_t *hashcat_ctx);
|
||||
int hashconfig_general_defaults (hashcat_ctx_t *hashcat_ctx);
|
||||
int hashconfig_pw_min (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);
|
||||
int hashconfig_pw_max (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);
|
||||
int hashconfig_salt_min (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);
|
||||
int hashconfig_salt_max (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);
|
||||
int hashconfig_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);
|
||||
int hashconfig_pw_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);
|
||||
int hashconfig_salt_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);
|
||||
int hashconfig_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);
|
||||
void hashconfig_benchmark_defaults (hashcat_ctx_t *hashcat_ctx, salt_t *salt, void *esalt, void *hook_salt);
|
||||
const char *hashconfig_benchmark_mask (hashcat_ctx_t *hashcat_ctx);
|
||||
const char *hashconfig_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);
|
||||
u32 hashconfig_tmp_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 hashconfig_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 hashconfig_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);
|
||||
u64 hashconfig_hook_salt_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 hashconfig_hook_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 hashconfig_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);
|
||||
u64 hashconfig_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);
|
||||
u32 hashconfig_benchmark_salt_len (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||
|
||||
void decoder_apply_optimizer (const hashconfig_t *hashconfig, void *data);
|
||||
void decoder_apply_options (const hashconfig_t *hashconfig, void *data);
|
||||
void encoder_apply_optimizer (const hashconfig_t *hashconfig, void *data);
|
||||
void decoder_apply_options (const hashconfig_t *hashconfig, void *data);
|
||||
void encoder_apply_options (const hashconfig_t *hashconfig, void *data);
|
||||
void encoder_apply_options (const hashconfig_t *hashconfig, void *data);
|
||||
|
||||
#endif // _INTERFACE_H
|
||||
|
||||
+26
-25
@@ -2,33 +2,34 @@
|
||||
#ifndef _MODULES_H
|
||||
#define _MODULES_H
|
||||
|
||||
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);
|
||||
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);
|
||||
u32 module_dgst_pos1 (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_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);
|
||||
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);
|
||||
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);
|
||||
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_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);
|
||||
u64 module_hook_salt_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_hook_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_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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
u64 module_tmp_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_salt_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 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);
|
||||
u32 module_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 module_pw_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);
|
||||
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);
|
||||
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);
|
||||
u32 module_benchmark_salt_len (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_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);
|
||||
u32 module_dgst_pos1 (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_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);
|
||||
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);
|
||||
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);
|
||||
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_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);
|
||||
u64 module_hook_salt_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_hook_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_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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
u64 module_tmp_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_salt_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 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);
|
||||
u32 module_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 module_pw_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);
|
||||
|
||||
int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, const char *line_buf, MAYBE_UNUSED const int line_len);
|
||||
int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, char *line_buf, MAYBE_UNUSED const int line_size);
|
||||
int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, const char *line_buf, MAYBE_UNUSED const int line_len);
|
||||
int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const void *digest_buf, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt_buf, char *line_buf, MAYBE_UNUSED const int line_size);
|
||||
|
||||
void module_register (module_ctx_t *module_ctx);
|
||||
|
||||
|
||||
#endif // _MODULES_H
|
||||
|
||||
+29
-24
@@ -929,6 +929,9 @@ struct hashconfig
|
||||
const char *st_pass;
|
||||
|
||||
const char *hash_name;
|
||||
|
||||
const char *benchmark_mask;
|
||||
u32 benchmark_salt_len;
|
||||
};
|
||||
|
||||
typedef struct hashconfig hashconfig_t;
|
||||
@@ -2200,31 +2203,33 @@ typedef struct event_ctx
|
||||
|
||||
typedef struct module_ctx
|
||||
{
|
||||
u32 (*module_attack_exec) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_dgst_pos0) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_dgst_pos1) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_dgst_pos2) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_dgst_pos3) (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 *);
|
||||
const char *(*module_hash_name) (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 *);
|
||||
u64 (*module_hook_salt_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u64 (*module_hook_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u64 (*module_kern_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_opti_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u64 (*module_opts_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_pw_min) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_pw_max) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_salt_min) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_salt_max) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_salt_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
const char *(*module_st_hash) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
const char *(*module_st_pass) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u64 (*module_tmp_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_attack_exec) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
const char *(*module_benchmark_mask) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_benchmark_salt_len) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_dgst_pos0) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_dgst_pos1) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_dgst_pos2) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_dgst_pos3) (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 *);
|
||||
const char *(*module_hash_name) (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 *);
|
||||
u64 (*module_hook_salt_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u64 (*module_hook_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u64 (*module_kern_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_opti_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u64 (*module_opts_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_pw_min) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_pw_max) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_salt_min) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_salt_max) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_salt_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
const char *(*module_st_hash) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
const char *(*module_st_pass) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u64 (*module_tmp_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
|
||||
int (*module_hash_decode) (const hashconfig_t *, void *, salt_t *, void *, const char *, const int);
|
||||
int (*module_hash_encode) (const hashconfig_t *, const void *, const salt_t *, const void *, char *, int);
|
||||
int (*module_hash_decode) (const hashconfig_t *, void *, salt_t *, void *, const char *, const int);
|
||||
int (*module_hash_encode) (const hashconfig_t *, const void *, const salt_t *, const void *, char *, int);
|
||||
|
||||
} module_ctx_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user