Replace parse_func() with module_hash_decode()
This commit is contained in:
+4
-4
@@ -1696,10 +1696,10 @@ 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 hashcat_ctx_t *hashcat_ctx, const bool optimized_kernel);
|
||||
int hashconfig_pw_max (const hashcat_ctx_t *hashcat_ctx, const bool optimized_kernel);
|
||||
int hashconfig_salt_min (const hashcat_ctx_t *hashcat_ctx, const bool optimized_kernel);
|
||||
int hashconfig_salt_max (const hashcat_ctx_t *hashcat_ctx, const bool optimized_kernel);
|
||||
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);
|
||||
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);
|
||||
|
||||
|
||||
+25
-48
@@ -1,48 +1,25 @@
|
||||
|
||||
#ifndef _MODULES_H
|
||||
#define _MODULES_H
|
||||
|
||||
typedef struct hashcat_module
|
||||
{
|
||||
const char *(*module_hash_name) ();
|
||||
u32 (*module_salt_type) ();
|
||||
u32 (*module_attack_exec) ();
|
||||
u64 (*module_opts_type) ();
|
||||
u32 (*module_dgst_size) ();
|
||||
u32 (*module_opti_type) ();
|
||||
u32 (*module_dgst_pos0) ();
|
||||
u32 (*module_dgst_pos1) ();
|
||||
u32 (*module_dgst_pos2) ();
|
||||
u32 (*module_dgst_pos3) ();
|
||||
const char *(*module_st_hash) ();
|
||||
const char *(*module_st_pass) ();
|
||||
u32 (*module_pw_min) (const hashcat_ctx_t *);
|
||||
u32 (*module_pw_max) (const hashcat_ctx_t *);
|
||||
u32 (*module_salt_min) (const hashcat_ctx_t *);
|
||||
u32 (*module_salt_max) (const hashcat_ctx_t *);
|
||||
int (*module_hash_decode) (const hashcat_ctx_t *, const u8 *, const int, hash_t *);
|
||||
int (*module_hash_encode) (const hashcat_ctx_t *, const void *, const salt_t *, const void *, u8 *, const size_t);
|
||||
|
||||
} hashcat_module_t;
|
||||
|
||||
const char *module_hash_name ();
|
||||
u32 module_salt_type ();
|
||||
u32 module_attack_exec ();
|
||||
u64 module_opts_type ();
|
||||
u32 module_dgst_size ();
|
||||
u32 module_opti_type ();
|
||||
u32 module_dgst_pos0 ();
|
||||
u32 module_dgst_pos1 ();
|
||||
u32 module_dgst_pos2 ();
|
||||
u32 module_dgst_pos3 ();
|
||||
const char *module_st_hash ();
|
||||
const char *module_st_pass ();
|
||||
u32 module_pw_min (MAYBE_UNUSED const hashcat_ctx_t *hashcat_ctx);
|
||||
u32 module_pw_max (MAYBE_UNUSED const hashcat_ctx_t *hashcat_ctx);
|
||||
u32 module_salt_min (MAYBE_UNUSED const hashcat_ctx_t *hashcat_ctx);
|
||||
u32 module_salt_max (MAYBE_UNUSED const hashcat_ctx_t *hashcat_ctx);
|
||||
int module_hash_decode (MAYBE_UNUSED const hashcat_ctx_t *hashcat_ctx, const u8 *input_buf, const int input_len, hash_t *hash_buf);
|
||||
int module_hash_encode (MAYBE_UNUSED const hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const void *digest, MAYBE_UNUSED const salt_t *salt, MAYBE_UNUSED const void *esalt, u8 *output_buf, const size_t output_size);
|
||||
void module_register (hashcat_module_t *hashcat_module);
|
||||
|
||||
#endif // _MODULES_H
|
||||
|
||||
#ifndef _MODULES_H
|
||||
#define _MODULES_H
|
||||
|
||||
const char *module_hash_name ();
|
||||
u32 module_salt_type ();
|
||||
u32 module_attack_exec ();
|
||||
u64 module_opts_type ();
|
||||
u32 module_dgst_size ();
|
||||
u32 module_opti_type ();
|
||||
u32 module_dgst_pos0 ();
|
||||
u32 module_dgst_pos1 ();
|
||||
u32 module_dgst_pos2 ();
|
||||
u32 module_dgst_pos3 ();
|
||||
const char *module_st_hash ();
|
||||
const char *module_st_pass ();
|
||||
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_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);
|
||||
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, const int *line_len);
|
||||
void 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, int *line_len);
|
||||
void module_register (module_ctx_t *module_ctx);
|
||||
|
||||
#endif // _MODULES_H
|
||||
|
||||
@@ -2194,6 +2194,29 @@ typedef struct event_ctx
|
||||
|
||||
} event_ctx_t;
|
||||
|
||||
typedef struct module_ctx
|
||||
{
|
||||
const char *(*module_hash_name) ();
|
||||
u32 (*module_salt_type) ();
|
||||
u32 (*module_attack_exec) ();
|
||||
u64 (*module_opts_type) ();
|
||||
u32 (*module_dgst_size) ();
|
||||
u32 (*module_opti_type) ();
|
||||
u32 (*module_dgst_pos0) ();
|
||||
u32 (*module_dgst_pos1) ();
|
||||
u32 (*module_dgst_pos2) ();
|
||||
u32 (*module_dgst_pos3) ();
|
||||
const char *(*module_st_hash) ();
|
||||
const char *(*module_st_pass) ();
|
||||
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 *);
|
||||
int (*module_hash_decode) (const hashconfig_t *, void *, salt_t *, void *, const char *, const int *);
|
||||
void (*module_hash_encode) (const hashconfig_t *, const void *, const salt_t *, const void *, char *, int *);
|
||||
|
||||
} module_ctx_t;
|
||||
|
||||
typedef struct hashcat_ctx
|
||||
{
|
||||
bitmap_ctx_t *bitmap_ctx;
|
||||
@@ -2211,6 +2234,7 @@ typedef struct hashcat_ctx
|
||||
logfile_ctx_t *logfile_ctx;
|
||||
loopback_ctx_t *loopback_ctx;
|
||||
mask_ctx_t *mask_ctx;
|
||||
module_ctx_t *module_ctx;
|
||||
opencl_ctx_t *opencl_ctx;
|
||||
outcheck_ctx_t *outcheck_ctx;
|
||||
outfile_ctx_t *outfile_ctx;
|
||||
|
||||
Reference in New Issue
Block a user