Use real dlopen() to load the module

This commit is contained in:
jsteube
2018-12-19 13:43:45 +01:00
parent fa0b8e643d
commit 7e1e1d34f8
9 changed files with 316 additions and 240 deletions
+3 -4
View File
@@ -12,6 +12,9 @@
#include <errno.h>
#include <limits.h>
#include <inttypes.h>
#include <dlfcn.h>
static const u32 MODULE_VERSION_MINIMUM = 520;
/**
* zero hashes shutcut
@@ -122,8 +125,6 @@ typedef struct tc
} tc_t;
void seven_zip_hook_func (hc_device_param_t *device_param, void *hook_salts_buf, const u32 salt_pos, const u64 pws_cnt);
typedef struct wpa_eapol
{
u32 pke[32];
@@ -341,11 +342,9 @@ typedef struct luks
*/
const char *stroptitype (const u32 opti_type);
const char *strparser (const u32 parser_status);
int ascii_digest (hashcat_ctx_t *hashcat_ctx, char *out_buf, const int out_size, const u32 salt_pos, const u32 digest_pos);
int input_tokenizer (const u8 *input_buf, const int input_len, token_t *token);
bool initialize_keyboard_layout_mapping (hashcat_ctx_t *hashcat_ctx, const char *filename, keyboard_layout_mapping_t *keyboard_layout_mapping, int *keyboard_layout_mapping_cnt);
int hashconfig_init (hashcat_ctx_t *hashcat_ctx);
+1 -1
View File
@@ -44,6 +44,6 @@ int module_hash_encode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
void hook12_func (hc_device_param_t *device_param, void *hook_salts_buf, const u32 salt_pos, const u64 pws_cnt);
void hook23_func (hc_device_param_t *device_param, void *hook_salts_buf, const u32 salt_pos, const u64 pws_cnt);
void module_register (module_ctx_t *module_ctx);
void module_init (module_ctx_t *module_ctx);
#endif // _MODULES_H
+4
View File
@@ -85,4 +85,8 @@ int select_write_timeout (int sockfd, const int sec);
int select_read_timeout_console (const int sec);
const char *strparser (const u32 parser_status);
int input_tokenizer (const u8 *input_buf, const int input_len, token_t *token);
#endif // _SHARED_H
+5
View File
@@ -2232,6 +2232,11 @@ typedef struct event_ctx
typedef struct module_ctx
{
void *module_handle;
u32 module_version_current;
void (*module_init) (struct module_ctx *);
u32 (*module_attack_exec) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
void *(*module_benchmark_esalt) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
void *(*module_benchmark_hook_salt) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);