mirror of
https://github.com/hashcat/hashcat.git
synced 2025-02-17 01:52:06 +00:00
Add autotune event to inform the user about autotune is starting/stopping on startup
Fix uninitialized value in terminal.c
This commit is contained in:
parent
70f1e16a0d
commit
ea5ddee6e2
20
src/main.c
20
src/main.c
@ -1059,10 +1059,30 @@ static void main_selftest_finished (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAY
|
|||||||
event_log_info_nn (hashcat_ctx, "Finished self-test");
|
event_log_info_nn (hashcat_ctx, "Finished self-test");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void main_autotune_starting (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;
|
||||||
|
|
||||||
|
event_log_info_nn (hashcat_ctx, "Starting autotune. Please be patient...");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void main_autotune_finished (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;
|
||||||
|
|
||||||
|
event_log_info_nn (hashcat_ctx, "Finished autotune");
|
||||||
|
}
|
||||||
|
|
||||||
static void event (const u32 id, hashcat_ctx_t *hashcat_ctx, const void *buf, const size_t len)
|
static void event (const u32 id, hashcat_ctx_t *hashcat_ctx, const void *buf, const size_t len)
|
||||||
{
|
{
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
|
case EVENT_AUTOTUNE_FINISHED: main_autotune_finished (hashcat_ctx, buf, len); break;
|
||||||
|
case EVENT_AUTOTUNE_STARTING: main_autotune_starting (hashcat_ctx, buf, len); break;
|
||||||
case EVENT_SELFTEST_FINISHED: main_selftest_finished (hashcat_ctx, buf, len); break;
|
case EVENT_SELFTEST_FINISHED: main_selftest_finished (hashcat_ctx, buf, len); break;
|
||||||
case EVENT_SELFTEST_STARTING: main_selftest_starting (hashcat_ctx, buf, len); break;
|
case EVENT_SELFTEST_STARTING: main_selftest_starting (hashcat_ctx, buf, len); break;
|
||||||
case EVENT_AUTODETECT_FINISHED: main_autodetect_finished (hashcat_ctx, buf, len); break;
|
case EVENT_AUTODETECT_FINISHED: main_autodetect_finished (hashcat_ctx, buf, len); break;
|
||||||
|
@ -117,7 +117,7 @@ void goodbye_screen (hashcat_ctx_t *hashcat_ctx, const time_t proc_start, const
|
|||||||
if (user_options->identify == true) return;
|
if (user_options->identify == true) return;
|
||||||
|
|
||||||
char start_buf[32]; memset (start_buf, 0, sizeof (start_buf));
|
char start_buf[32]; memset (start_buf, 0, sizeof (start_buf));
|
||||||
char stop_buf[32]; memset (start_buf, 0, sizeof (stop_buf));
|
char stop_buf[32]; memset (stop_buf, 0, sizeof (stop_buf));
|
||||||
|
|
||||||
event_log_info_nn (hashcat_ctx, "Started: %s", ctime_r (&proc_start, start_buf));
|
event_log_info_nn (hashcat_ctx, "Started: %s", ctime_r (&proc_start, start_buf));
|
||||||
event_log_info_nn (hashcat_ctx, "Stopped: %s", ctime_r (&proc_stop, stop_buf));
|
event_log_info_nn (hashcat_ctx, "Stopped: %s", ctime_r (&proc_stop, stop_buf));
|
||||||
|
Loading…
Reference in New Issue
Block a user