From ed7d58b8507a76210964ddc32cdb783f22137915 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Sat, 28 Aug 2021 13:05:05 +0200 Subject: [PATCH] Update benchmark hash-mode header visualization --- src/main.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index f1eafb51a..798df9db1 100644 --- a/src/main.c +++ b/src/main.c @@ -450,14 +450,29 @@ static void main_outerloop_mainscreen (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, { if (user_options->machine_readable == false) { + char buf[HCBUFSIZ_TINY] = { 0 }; + + size_t len = 0; + if ((hashconfig->attack_exec == ATTACK_EXEC_OUTSIDE_KERNEL) && (hashconfig->is_salted == true)) { - event_log_info (hashcat_ctx, "Hash.Mode: %d (%s) [Iterations: %d]", hashconfig->hash_mode, hashconfig->hash_name, hashes[0].salts_buf[0].salt_iter); + len = snprintf (buf, sizeof (buf), "* Hash-Mode %d (%s) [Iterations: %d]", hashconfig->hash_mode, hashconfig->hash_name, hashes[0].salts_buf[0].salt_iter); } else { - event_log_info (hashcat_ctx, "Hash.Mode: %d (%s)", hashconfig->hash_mode, hashconfig->hash_name); + len = snprintf (buf, sizeof (buf), "* Hash-Mode %d (%s)", hashconfig->hash_mode, hashconfig->hash_name); } + + char line[HCBUFSIZ_TINY] = { 0 }; + + memset (line, '-', len); + + line[len] = 0; + + event_log_info (hashcat_ctx, "%s", line); + event_log_info (hashcat_ctx, "%s", buf); + event_log_info (hashcat_ctx, "%s", line); + event_log_info (hashcat_ctx, NULL); } }