Get rid of more log_info() in hashcat()

pull/544/head
jsteube 8 years ago
parent 27887bf9ce
commit d993aa5ffa

@ -90,9 +90,8 @@ typedef enum event_identifier
EVENT_LOGFILE_SUB_INITIALIZE = 0x00000023,
EVENT_LOGFILE_SUB_FINALIZE = 0x00000024,
EVENT_OUTERLOOP_STARTING = 0x00000031,
EVENT_OUTERLOOP_FINISHED = 0x00000032,
EVENT_OUTERLOOP_MAINSCREEN = 0x00000033,
EVENT_OUTERLOOP_WEAK_HASH = 0x00000034,
EVENT_OUTERLOOP_MAINSCREEN = 0x00000032,
EVENT_OUTERLOOP_FINISHED = 0x00000033,
EVENT_INNERLOOP1_STARTING = 0x00000041,
EVENT_INNERLOOP1_FINISHED = 0x00000042,
EVENT_INNERLOOP2_STARTING = 0x00000051,
@ -109,6 +108,10 @@ typedef enum event_identifier
EVENT_POTFILE_ALL_CRACKED = 0x00000063,
EVENT_OPENCL_SESSION_PRE = 0x00000071,
EVENT_OPENCL_SESSION_POST = 0x00000072,
EVENT_BITMAP_INIT_PRE = 0x00000081,
EVENT_BITMAP_INIT_POST = 0x00000082,
EVENT_WEAK_HASH_PRE = 0x00000091,
EVENT_WEAK_HASH_POST = 0x00000092,
// there will be much more event types soon

@ -94,8 +94,6 @@ void bitmap_ctx_init (hashcat_ctx_t *hashcat_ctx)
for (bitmap_bits = bitmap_min; bitmap_bits < bitmap_max; bitmap_bits++)
{
if (user_options->quiet == false) log_info_nn ("Generating bitmap tables with %u bits...", bitmap_bits);
bitmap_nums = 1u << bitmap_bits;
bitmap_mask = bitmap_nums - 1;

@ -392,6 +392,8 @@ static int inner1_loop (hashcat_ctx_t *hashcat_ctx)
* loop through wordlists
*/
EVENT_SEND (EVENT_INNERLOOP2_STARTING);
restore_data_t *rd = restore_ctx->rd;
if (straight_ctx->dicts_cnt)
@ -416,6 +418,8 @@ static int inner1_loop (hashcat_ctx_t *hashcat_ctx)
if (rc_inner2_loop == -1) return -1;
}
EVENT_SEND (EVENT_INNERLOOP2_FINISHED);
return 0;
}
@ -551,8 +555,12 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx)
* bitmaps
*/
EVENT_SEND (EVENT_BITMAP_INIT_PRE);
bitmap_ctx_init (hashcat_ctx);
EVENT_SEND (EVENT_BITMAP_INIT_POST);
/**
* cracks-per-time allocate buffer
*/
@ -666,12 +674,14 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx)
break;
}
EVENT_SEND (EVENT_OUTERLOOP_WEAK_HASH);
EVENT_SEND (EVENT_WEAK_HASH_PRE);
for (u32 salt_pos = 0; salt_pos < hashes->salts_cnt; salt_pos++)
{
weak_hash_check (hashcat_ctx, device_param, salt_pos);
}
EVENT_SEND (EVENT_WEAK_HASH_POST);
}
/**

@ -413,12 +413,12 @@ static int event_opencl_session_post (hashcat_ctx_t *hashcat_ctx)
if (user_options->quiet == true) return 0;
log_info_nn ("");
log_info_nn ("Initialized device kernels and memory...");
return 0;
}
static int event_outerloop_weak_hash (hashcat_ctx_t *hashcat_ctx)
static int event_weak_hash_pre (hashcat_ctx_t *hashcat_ctx)
{
const user_options_t *user_options = hashcat_ctx->user_options;
@ -429,6 +429,40 @@ static int event_outerloop_weak_hash (hashcat_ctx_t *hashcat_ctx)
return 0;
}
static int event_weak_hash_post (hashcat_ctx_t *hashcat_ctx)
{
const user_options_t *user_options = hashcat_ctx->user_options;
if (user_options->quiet == true) return 0;
log_info_nn ("Checked for weak hashes...");
return 0;
}
static int event_bitmap_init_pre (hashcat_ctx_t *hashcat_ctx)
{
const user_options_t *user_options = hashcat_ctx->user_options;
if (user_options->quiet == true) return 0;
log_info_nn ("Generating bitmap tables...");
return 0;
}
static int event_bitmap_init_post (hashcat_ctx_t *hashcat_ctx)
{
const user_options_t *user_options = hashcat_ctx->user_options;
if (user_options->quiet == true) return 0;
log_info_nn ("Generated bitmap tables...");
return 0;
}
int event (hashcat_ctx_t *hashcat_ctx, const u32 event)
{
int rc = 0;
@ -444,7 +478,6 @@ int event (hashcat_ctx_t *hashcat_ctx, const u32 event)
case EVENT_OUTERLOOP_STARTING: rc = event_outerloop_starting (hashcat_ctx); break;
case EVENT_OUTERLOOP_FINISHED: rc = event_outerloop_finished (hashcat_ctx); break;
case EVENT_OUTERLOOP_MAINSCREEN: rc = event_outerloop_mainscreen (hashcat_ctx); break;
case EVENT_OUTERLOOP_WEAK_HASH: rc = event_outerloop_weak_hash (hashcat_ctx); break;
case EVENT_CRACKER_STARTING: rc = event_cracker_starting (hashcat_ctx); break;
case EVENT_CRACKER_FINISHED: rc = event_cracker_finished (hashcat_ctx); break;
case EVENT_CRACKER_FINAL_STATS: rc = event_cracker_final_stats (hashcat_ctx); break;
@ -455,6 +488,10 @@ int event (hashcat_ctx_t *hashcat_ctx, const u32 event)
case EVENT_POTFILE_ALL_CRACKED: rc = event_potfile_all_cracked (hashcat_ctx); break;
case EVENT_OPENCL_SESSION_PRE: rc = event_opencl_session_pre (hashcat_ctx); break;
case EVENT_OPENCL_SESSION_POST: rc = event_opencl_session_post (hashcat_ctx); break;
case EVENT_BITMAP_INIT_PRE: rc = event_bitmap_init_pre (hashcat_ctx); break;
case EVENT_BITMAP_INIT_POST: rc = event_bitmap_init_post (hashcat_ctx); break;
case EVENT_WEAK_HASH_PRE: rc = event_weak_hash_pre (hashcat_ctx); break;
case EVENT_WEAK_HASH_POST: rc = event_weak_hash_post (hashcat_ctx); break;
}
return rc;

Loading…
Cancel
Save