mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-10 15:51:10 +00:00
Get rid of module_build_plain_postprocess()
This commit is contained in:
parent
9b842e30ab
commit
6a33be5ea5
@ -72,6 +72,6 @@ int module_hash_init_selftest (MAYBE_UNUSED const hashconfig_t *ha
|
|||||||
void module_hook12 (hc_device_param_t *device_param, const void *hook_salts_buf, const u32 salt_pos, const u64 pws_cnt);
|
void module_hook12 (hc_device_param_t *device_param, const void *hook_salts_buf, const u32 salt_pos, const u64 pws_cnt);
|
||||||
void module_hook23 (hc_device_param_t *device_param, const void *hook_salts_buf, const u32 salt_pos, const u64 pws_cnt);
|
void module_hook23 (hc_device_param_t *device_param, const void *hook_salts_buf, const u32 salt_pos, const u64 pws_cnt);
|
||||||
|
|
||||||
int module_build_plain_postprocess (const u32 *src_buf, MAYBE_UNUSED const size_t src_sz, const int src_len, u32 *dst_buf, MAYBE_UNUSED const size_t dst_sz);
|
int module_build_plain_postprocess (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const hashes_t *hashes, const u32 *src_buf, MAYBE_UNUSED const size_t src_sz, const int src_len, u32 *dst_buf, MAYBE_UNUSED const size_t dst_sz);
|
||||||
|
|
||||||
#endif // _MODULES_H
|
#endif // _MODULES_H
|
||||||
|
@ -285,7 +285,7 @@ void check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl
|
|||||||
{
|
{
|
||||||
u32 temp_buf[64] = { 0 };
|
u32 temp_buf[64] = { 0 };
|
||||||
|
|
||||||
const int temp_len = module_ctx->module_build_plain_postprocess (plain_buf, sizeof (plain_buf), plain_len, temp_buf, sizeof (temp_buf));
|
const int temp_len = module_ctx->module_build_plain_postprocess (hashcat_ctx->hashconfig, hashcat_ctx->hashes, plain_buf, sizeof (plain_buf), plain_len, temp_buf, sizeof (temp_buf));
|
||||||
|
|
||||||
if (temp_len < (int) sizeof (plain_buf))
|
if (temp_len < (int) sizeof (plain_buf))
|
||||||
{
|
{
|
||||||
|
@ -73,6 +73,18 @@ typedef struct tc
|
|||||||
static const int ROUNDS_TRUECRYPT_1K = 1000;
|
static const int ROUNDS_TRUECRYPT_1K = 1000;
|
||||||
static const float MIN_SUFFICIENT_ENTROPY_FILE = 7.0f;
|
static const float MIN_SUFFICIENT_ENTROPY_FILE = 7.0f;
|
||||||
|
|
||||||
|
int module_build_plain_postprocess (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const hashes_t *hashes, const u32 *src_buf, MAYBE_UNUSED const size_t src_sz, const int src_len, u32 *dst_buf, MAYBE_UNUSED const size_t dst_sz)
|
||||||
|
{
|
||||||
|
const tc_t *tc = (const tc_t *) hashes->esalts_buf;
|
||||||
|
|
||||||
|
if (src_len < (int) dst_sz)
|
||||||
|
{
|
||||||
|
memcpy (dst_buf, src_buf, src_len);
|
||||||
|
}
|
||||||
|
|
||||||
|
return execute_keyboard_layout_mapping (dst_buf, src_len, tc->keyboard_layout_mapping_buf, tc->keyboard_layout_mapping_cnt);
|
||||||
|
}
|
||||||
|
|
||||||
bool module_potfile_disable (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
|
bool module_potfile_disable (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 potfile_disable = true;
|
const bool potfile_disable = true;
|
||||||
@ -243,7 +255,7 @@ void module_init (module_ctx_t *module_ctx)
|
|||||||
module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT;
|
module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT;
|
||||||
module_ctx->module_benchmark_mask = MODULE_DEFAULT;
|
module_ctx->module_benchmark_mask = MODULE_DEFAULT;
|
||||||
module_ctx->module_benchmark_salt = MODULE_DEFAULT;
|
module_ctx->module_benchmark_salt = MODULE_DEFAULT;
|
||||||
module_ctx->module_build_plain_postprocess = MODULE_DEFAULT;
|
module_ctx->module_build_plain_postprocess = module_build_plain_postprocess;
|
||||||
module_ctx->module_deep_comp_kernel = MODULE_DEFAULT;
|
module_ctx->module_deep_comp_kernel = MODULE_DEFAULT;
|
||||||
module_ctx->module_dgst_pos0 = module_dgst_pos0;
|
module_ctx->module_dgst_pos0 = module_dgst_pos0;
|
||||||
module_ctx->module_dgst_pos1 = module_dgst_pos1;
|
module_ctx->module_dgst_pos1 = module_dgst_pos1;
|
||||||
|
@ -73,6 +73,18 @@ typedef struct tc
|
|||||||
static const int ROUNDS_TRUECRYPT_1K = 1000;
|
static const int ROUNDS_TRUECRYPT_1K = 1000;
|
||||||
static const float MIN_SUFFICIENT_ENTROPY_FILE = 7.0f;
|
static const float MIN_SUFFICIENT_ENTROPY_FILE = 7.0f;
|
||||||
|
|
||||||
|
int module_build_plain_postprocess (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const hashes_t *hashes, const u32 *src_buf, MAYBE_UNUSED const size_t src_sz, const int src_len, u32 *dst_buf, MAYBE_UNUSED const size_t dst_sz)
|
||||||
|
{
|
||||||
|
const tc_t *tc = (const tc_t *) hashes->esalts_buf;
|
||||||
|
|
||||||
|
if (src_len < (int) dst_sz)
|
||||||
|
{
|
||||||
|
memcpy (dst_buf, src_buf, src_len);
|
||||||
|
}
|
||||||
|
|
||||||
|
return execute_keyboard_layout_mapping (dst_buf, src_len, tc->keyboard_layout_mapping_buf, tc->keyboard_layout_mapping_cnt);
|
||||||
|
}
|
||||||
|
|
||||||
bool module_potfile_disable (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
|
bool module_potfile_disable (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 potfile_disable = true;
|
const bool potfile_disable = true;
|
||||||
@ -243,7 +255,7 @@ void module_init (module_ctx_t *module_ctx)
|
|||||||
module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT;
|
module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT;
|
||||||
module_ctx->module_benchmark_mask = MODULE_DEFAULT;
|
module_ctx->module_benchmark_mask = MODULE_DEFAULT;
|
||||||
module_ctx->module_benchmark_salt = MODULE_DEFAULT;
|
module_ctx->module_benchmark_salt = MODULE_DEFAULT;
|
||||||
module_ctx->module_build_plain_postprocess = MODULE_DEFAULT;
|
module_ctx->module_build_plain_postprocess = module_build_plain_postprocess;
|
||||||
module_ctx->module_deep_comp_kernel = MODULE_DEFAULT;
|
module_ctx->module_deep_comp_kernel = MODULE_DEFAULT;
|
||||||
module_ctx->module_dgst_pos0 = module_dgst_pos0;
|
module_ctx->module_dgst_pos0 = module_dgst_pos0;
|
||||||
module_ctx->module_dgst_pos1 = module_dgst_pos1;
|
module_ctx->module_dgst_pos1 = module_dgst_pos1;
|
||||||
|
@ -73,6 +73,18 @@ typedef struct tc
|
|||||||
static const int ROUNDS_TRUECRYPT_1K = 1000;
|
static const int ROUNDS_TRUECRYPT_1K = 1000;
|
||||||
static const float MIN_SUFFICIENT_ENTROPY_FILE = 7.0f;
|
static const float MIN_SUFFICIENT_ENTROPY_FILE = 7.0f;
|
||||||
|
|
||||||
|
int module_build_plain_postprocess (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const hashes_t *hashes, const u32 *src_buf, MAYBE_UNUSED const size_t src_sz, const int src_len, u32 *dst_buf, MAYBE_UNUSED const size_t dst_sz)
|
||||||
|
{
|
||||||
|
const tc_t *tc = (const tc_t *) hashes->esalts_buf;
|
||||||
|
|
||||||
|
if (src_len < (int) dst_sz)
|
||||||
|
{
|
||||||
|
memcpy (dst_buf, src_buf, src_len);
|
||||||
|
}
|
||||||
|
|
||||||
|
return execute_keyboard_layout_mapping (dst_buf, src_len, tc->keyboard_layout_mapping_buf, tc->keyboard_layout_mapping_cnt);
|
||||||
|
}
|
||||||
|
|
||||||
bool module_potfile_disable (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
|
bool module_potfile_disable (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 potfile_disable = true;
|
const bool potfile_disable = true;
|
||||||
@ -243,7 +255,7 @@ void module_init (module_ctx_t *module_ctx)
|
|||||||
module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT;
|
module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT;
|
||||||
module_ctx->module_benchmark_mask = MODULE_DEFAULT;
|
module_ctx->module_benchmark_mask = MODULE_DEFAULT;
|
||||||
module_ctx->module_benchmark_salt = MODULE_DEFAULT;
|
module_ctx->module_benchmark_salt = MODULE_DEFAULT;
|
||||||
module_ctx->module_build_plain_postprocess = MODULE_DEFAULT;
|
module_ctx->module_build_plain_postprocess = module_build_plain_postprocess;
|
||||||
module_ctx->module_deep_comp_kernel = MODULE_DEFAULT;
|
module_ctx->module_deep_comp_kernel = MODULE_DEFAULT;
|
||||||
module_ctx->module_dgst_pos0 = module_dgst_pos0;
|
module_ctx->module_dgst_pos0 = module_dgst_pos0;
|
||||||
module_ctx->module_dgst_pos1 = module_dgst_pos1;
|
module_ctx->module_dgst_pos1 = module_dgst_pos1;
|
||||||
|
@ -48,7 +48,7 @@ u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig,
|
|||||||
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; }
|
||||||
|
|
||||||
int module_build_plain_postprocess (const u32 *src_buf, MAYBE_UNUSED const size_t src_sz, const int src_len, u32 *dst_buf, MAYBE_UNUSED const size_t dst_sz)
|
int module_build_plain_postprocess (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const hashes_t *hashes, const u32 *src_buf, MAYBE_UNUSED const size_t src_sz, const int src_len, u32 *dst_buf, MAYBE_UNUSED const size_t dst_sz)
|
||||||
{
|
{
|
||||||
return base32_encode (int_to_base32, (const u8 *) src_buf, src_len, (u8 *) dst_buf);
|
return base32_encode (int_to_base32, (const u8 *) src_buf, src_len, (u8 *) dst_buf);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user