1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-03-28 21:35:48 +00:00

Add main_potfile_remove_parse_post()

This commit is contained in:
jsteube 2016-10-10 11:10:04 +02:00
parent f962a38221
commit 6d2c58d8df
3 changed files with 77 additions and 62 deletions

View File

@ -100,9 +100,10 @@ typedef enum event_identifier
EVENT_CRACKER_FINISHED = 0x00000056,
EVENT_CRACKER_FINAL_STATS = 0x00000057,
EVENT_CRACKER_HASH_CRACKED = 0x00000058,
EVENT_POTFILE_REMOVE_PARSE = 0x00000061,
EVENT_POTFILE_NUM_CRACKED = 0x00000062,
EVENT_POTFILE_ALL_CRACKED = 0x00000063,
EVENT_POTFILE_REMOVE_PARSE_PRE = 0x00000061,
EVENT_POTFILE_REMOVE_PARSE_POST = 0x00000062,
EVENT_POTFILE_NUM_CRACKED = 0x00000063,
EVENT_POTFILE_ALL_CRACKED = 0x00000064,
EVENT_OPENCL_SESSION_PRE = 0x00000071,
EVENT_OPENCL_SESSION_POST = 0x00000072,
EVENT_BITMAP_INIT_PRE = 0x00000081,

View File

@ -511,9 +511,11 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx)
if (user_options->potfile_disable == 0)
{
EVENT (EVENT_POTFILE_REMOVE_PARSE);
EVENT (EVENT_POTFILE_REMOVE_PARSE_PRE);
potfile_remove_parse (hashcat_ctx);
EVENT (EVENT_POTFILE_REMOVE_PARSE_POST);
}
/**

View File

@ -315,7 +315,7 @@ static int main_calculated_words_base (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx,
return 0;
}
static int main_potfile_remove_parse (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const void *buf, MAYBE_UNUSED const size_t len)
static int main_potfile_remove_parse_pre (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const void *buf, MAYBE_UNUSED const size_t len)
{
const user_options_t *user_options = hashcat_ctx->user_options;
@ -326,6 +326,17 @@ static int main_potfile_remove_parse (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, M
return 0;
}
static int main_potfile_remove_parse_post (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const void *buf, MAYBE_UNUSED const size_t len)
{
const user_options_t *user_options = hashcat_ctx->user_options;
if (user_options->quiet == true) return 0;
event_log_info_nn (hashcat_ctx, "Compared hashes with potfile entries...");
return 0;
}
static int main_potfile_num_cracked (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const void *buf, MAYBE_UNUSED const size_t len)
{
const user_options_t *user_options = hashcat_ctx->user_options;
@ -555,7 +566,8 @@ int event (const u32 id, hashcat_ctx_t *hashcat_ctx, const void *buf, const size
case EVENT_CRACKER_FINAL_STATS: rc = main_cracker_final_stats (hashcat_ctx, buf, len); break;
case EVENT_CRACKER_HASH_CRACKED: rc = main_cracker_hash_cracked (hashcat_ctx, buf, len); break;
case EVENT_CALCULATED_WORDS_BASE: rc = main_calculated_words_base (hashcat_ctx, buf, len); break;
case EVENT_POTFILE_REMOVE_PARSE: rc = main_potfile_remove_parse (hashcat_ctx, buf, len); break;
case EVENT_POTFILE_REMOVE_PARSE_PRE: rc = main_potfile_remove_parse_pre (hashcat_ctx, buf, len); break;
case EVENT_POTFILE_REMOVE_PARSE_POST: rc = main_potfile_remove_parse_post (hashcat_ctx, buf, len); break;
case EVENT_POTFILE_NUM_CRACKED: rc = main_potfile_num_cracked (hashcat_ctx, buf, len); break;
case EVENT_POTFILE_ALL_CRACKED: rc = main_potfile_all_cracked (hashcat_ctx, buf, len); break;
case EVENT_OPENCL_SESSION_PRE: rc = main_opencl_session_pre (hashcat_ctx, buf, len); break;