From 0b0de6a28380e5270705b1ee17ebc6689d61a312 Mon Sep 17 00:00:00 2001 From: Chick3nman Date: Fri, 12 Jul 2019 12:54:21 -0500 Subject: [PATCH 1/3] Added Remaining digest and salt count to Status output Added logic to show/hide salt count based on number of salts for remaining digests as well as recovered digests --- src/terminal.c | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/src/terminal.c b/src/terminal.c index 4a820f098..618dce6a6 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -1450,7 +1450,9 @@ void status_display (hashcat_ctx_t *hashcat_ctx) "Speed.#*.........: %9sH/s", hashcat_status->speed_sec_all); } - + + if (hashcat_status->salts_cnt > 1) + { event_log_info (hashcat_ctx, "Recovered........: %d/%d (%.2f%%) Digests, %d/%d (%.2f%%) Salts", hashcat_status->digests_done, @@ -1459,7 +1461,40 @@ void status_display (hashcat_ctx_t *hashcat_ctx) hashcat_status->salts_done, hashcat_status->salts_cnt, hashcat_status->salts_percent); - + } + else + { + event_log_info (hashcat_ctx, + "Recovered........: %d/%d (%.2f%%) Digests", + hashcat_status->digests_done, + hashcat_status->digests_cnt, + hashcat_status->digests_percent); + } + + if (hashcat_status->digests_cnt > 1000) + { + int digests_remain = hashcat_status->digests_cnt - hashcat_status->digests_done; + double digests_remain_percent = (double) digests_remain / (double) hashcat_status->digests_cnt * 100; + int salts_remain = hashcat_status->salts_cnt - hashcat_status->salts_done; + double salts_remain_percent = (double) salts_remain / (double) hashcat_status->salts_cnt * 100; + if (hashcat_status->salts_cnt > 1) + { + event_log_info (hashcat_ctx, + "Remaining........: %d (%.2f%%) Digests, %d (%.2f%%) Salts", + digests_remain, + digests_remain_percent, + salts_remain, + salts_remain_percent); + } + else + { + event_log_info (hashcat_ctx, + "Remaining........: %d (%.2f%%) Digests", + digests_remain, + digests_remain_percent); + } + } + if (hashcat_status->digests_cnt > 1000) { event_log_info (hashcat_ctx, From fcb100b26ce1c0120193deef053552146c57c67a Mon Sep 17 00:00:00 2001 From: Chick3nman Date: Fri, 12 Jul 2019 13:32:22 -0500 Subject: [PATCH 2/3] Changed Error message, OpenCL is not the only kernel type --- src/interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interface.c b/src/interface.c index 442076317..9eb0af983 100644 --- a/src/interface.c +++ b/src/interface.c @@ -351,7 +351,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) { if (hashconfig->has_optimized_kernel == false) { - if (user_options->quiet == false) event_log_warning (hashcat_ctx, "%s: Optimized OpenCL kernel requested but not needed - falling back to pure OpenCL kernel", source_file); + if (user_options->quiet == false) event_log_warning (hashcat_ctx, "%s: Optimized kernel requested but not needed - falling back to pure kernel", source_file); } else { @@ -362,7 +362,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) { if (hashconfig->has_pure_kernel == false) { - if (user_options->quiet == false) event_log_warning (hashcat_ctx, "%s: Pure OpenCL kernel not found, falling back to optimized OpenCL kernel", source_file); + if (user_options->quiet == false) event_log_warning (hashcat_ctx, "%s: Pure kernel not found, falling back to optimized kernel", source_file); hashconfig->opti_type |= OPTI_TYPE_OPTIMIZED_KERNEL; } From 9e1ae3cb4a5398f6a0ed356194c517bd944989a6 Mon Sep 17 00:00:00 2001 From: Chick3nman Date: Fri, 12 Jul 2019 13:38:12 -0500 Subject: [PATCH 3/3] Updated Kernel self-test failure message to reflect OpenCL or Cuda installation failure, depending on backend used --- src/selftest.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/selftest.c b/src/selftest.c index 1957f969a..b299cb3eb 100644 --- a/src/selftest.c +++ b/src/selftest.c @@ -654,8 +654,14 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param if (num_cracked == 0) { hc_thread_mutex_lock (status_ctx->mux_display); - - event_log_error (hashcat_ctx, "* Device #%u: ATTENTION! OpenCL kernel self-test failed.", device_param->device_id + 1); + if (device_param->is_opencl == true) + { + event_log_error (hashcat_ctx, "* Device #%u: ATTENTION! OpenCL kernel self-test failed.", device_param->device_id + 1); + } + if (device_param->is_cuda == true) + { + event_log_error (hashcat_ctx, "* Device #%u: ATTENTION! CUDA kernel self-test failed.", device_param->device_id + 1); + } event_log_warning (hashcat_ctx, "Your device driver installation is probably broken."); event_log_warning (hashcat_ctx, "See also: https://hashcat.net/faq/wrongdriver");