From 9d1ed97e07723cd662d0b6be3ae4b734bd82bd8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Bolvansk=C3=BD?= Date: Sun, 27 Mar 2022 12:37:56 +0200 Subject: [PATCH] Fixed negative numbers in json output --- src/terminal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/terminal.c b/src/terminal.c index 8ac46257e..3416e8fbc 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -643,8 +643,8 @@ void hash_info_single_json (hashcat_ctx_t *hashcat_ctx, user_options_extra_t *us printf ("\"category\": \"%s\", ", strhashcategory (hashconfig->hash_category)); printf ("\"slow_hash\": %s, ", (hashconfig->attack_exec == ATTACK_EXEC_INSIDE_KERNEL) ? "false" : "true"); - printf ("\"password_len_min\": %d, ", hashconfig->pw_min); - printf ("\"password_len_max\": %d, ", hashconfig->pw_max); + printf ("\"password_len_min\": %u, ", hashconfig->pw_min); + printf ("\"password_len_max\": %u, ", hashconfig->pw_max); printf ("\"is_salted\": %s, ", (hashconfig->is_salted == true) ? "true" : "false"); @@ -653,8 +653,8 @@ void hash_info_single_json (hashcat_ctx_t *hashcat_ctx, user_options_extra_t *us u32 t = hashconfig->salt_type; const char *t_desc = (t == SALT_TYPE_EMBEDDED) ? "embedded" : (t == SALT_TYPE_GENERIC) ? "generic" : "virtual"; printf("\"salt_type\": \"%s\", ", t_desc); - printf("\"salt_len_min\": %d, ", hashconfig->salt_min); - printf("\"salt_len_max\": %d, ", hashconfig->salt_max); + printf("\"salt_len_min\": %u, ", hashconfig->salt_min); + printf("\"salt_len_max\": %u, ", hashconfig->salt_max); } if ((hashconfig->has_pure_kernel) && (hashconfig->has_optimized_kernel))