From 3ed1f0d840b60937ef059eb48f0120030df13274 Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Tue, 29 Dec 2020 04:58:58 +0100 Subject: [PATCH 1/3] Added new option: --hash-info --- docs/changes.txt | 6 +++ include/terminal.h | 2 + include/types.h | 3 ++ src/Makefile | 2 +- src/backend.c | 1 + src/bitmap.c | 1 + src/combinator.c | 1 + src/cpt.c | 1 + src/debugfile.c | 1 + src/dictstat.c | 1 + src/hashes.c | 3 ++ src/hwmon.c | 1 + src/induct.c | 1 + src/interface.c | 2 +- src/loopback.c | 1 + src/main.c | 25 ++++++--- src/mpsp.c | 1 + src/outfile_check.c | 1 + src/potfile.c | 1 + src/restore.c | 1 + src/straight.c | 1 + src/terminal.c | 123 ++++++++++++++++++++++++++++++++++++++++++++ src/tuningdb.c | 1 + src/usage.c | 1 + src/user_options.c | 30 +++++++++++ src/wordlist.c | 1 + 26 files changed, 204 insertions(+), 9 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 387941f96..2cdb27ef3 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -15,6 +15,12 @@ - Added hash-mode: RSA/DSA/EC/OPENSSH Private Keys - Added hash-mode: sha1(sha1($pass).$salt) +## +## Features +## + +- Added option --hash-info to print generic information on hash types supported + ## ## Bugs ## diff --git a/include/terminal.h b/include/terminal.h index e15d4ef9c..d0fe1760c 100644 --- a/include/terminal.h +++ b/include/terminal.h @@ -41,6 +41,8 @@ int tty_fix(void); void compress_terminal_line_length (char *out_buf, const size_t keep_from_beginning, const size_t keep_from_end); +void hash_info (hashcat_ctx_t *hashcat_ctx); + void example_hashes (hashcat_ctx_t *hashcat_ctx); void backend_info (hashcat_ctx_t *hashcat_ctx); diff --git a/include/types.h b/include/types.h index 89f338453..88b7b4cf8 100644 --- a/include/types.h +++ b/include/types.h @@ -595,6 +595,7 @@ typedef enum user_options_defaults FORCE = false, HWMON_DISABLE = false, HWMON_TEMP_ABORT = 90, + HASH_INFO = false, HASH_MODE = 0, HCCAPX_MESSAGE_PAIR = 0, HEX_CHARSET = false, @@ -700,6 +701,7 @@ typedef enum user_options_map IDX_FORCE = 0xff15, IDX_HWMON_DISABLE = 0xff16, IDX_HWMON_TEMP_ABORT = 0xff17, + IDX_HASH_INFO = 0xff4d, // must be changed before merging IDX_HASH_MODE = 'm', IDX_HCCAPX_MESSAGE_PAIR = 0xff18, IDX_HELP = 'h', @@ -1941,6 +1943,7 @@ typedef struct user_options bool example_hashes; bool force; bool hwmon_disable; + bool hash_info; bool hex_charset; bool hex_salt; bool hex_wordlist; diff --git a/src/Makefile b/src/Makefile index 00a55b509..ebab9b677 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,7 +4,7 @@ ## SHARED ?= 0 -DEBUG := 0 +DEBUG := 1 PRODUCTION := 0 PRODUCTION_VERSION := v6.1.1 ENABLE_CUBIN ?= 1 diff --git a/src/backend.c b/src/backend.c index 5dfb777b9..593dda198 100644 --- a/src/backend.c +++ b/src/backend.c @@ -4956,6 +4956,7 @@ int backend_ctx_init (hashcat_ctx_t *hashcat_ctx) backend_ctx->enabled = false; + if (user_options->hash_info == true) return 0; if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; diff --git a/src/bitmap.c b/src/bitmap.c index d2184acf0..9027c0dd1 100644 --- a/src/bitmap.c +++ b/src/bitmap.c @@ -79,6 +79,7 @@ int bitmap_ctx_init (hashcat_ctx_t *hashcat_ctx) bitmap_ctx->enabled = false; + if (user_options->hash_info == true) return 0; if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; diff --git a/src/combinator.c b/src/combinator.c index bb4efb322..6db46a886 100644 --- a/src/combinator.c +++ b/src/combinator.c @@ -19,6 +19,7 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx) combinator_ctx->enabled = false; + if (user_options->hash_info == true) return 0; if (user_options->example_hashes == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/cpt.c b/src/cpt.c index 72db45415..c18f5d3bf 100644 --- a/src/cpt.c +++ b/src/cpt.c @@ -15,6 +15,7 @@ int cpt_ctx_init (hashcat_ctx_t *hashcat_ctx) cpt_ctx->enabled = false; + if (user_options->hash_info == true) return 0; if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; diff --git a/src/debugfile.c b/src/debugfile.c index a6ffd3826..2be26d356 100644 --- a/src/debugfile.c +++ b/src/debugfile.c @@ -87,6 +87,7 @@ int debugfile_init (hashcat_ctx_t *hashcat_ctx) debugfile_ctx->enabled = false; if (user_options->benchmark == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; diff --git a/src/dictstat.c b/src/dictstat.c index 03736e74b..96514ad5a 100644 --- a/src/dictstat.c +++ b/src/dictstat.c @@ -57,6 +57,7 @@ int dictstat_init (hashcat_ctx_t *hashcat_ctx) dictstat_ctx->enabled = false; if (user_options->benchmark == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; diff --git a/src/hashes.c b/src/hashes.c index eda7d550f..d86a9b32c 100644 --- a/src/hashes.c +++ b/src/hashes.c @@ -901,6 +901,9 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx) hashes_cnt = 1; } + else if (user_options->hash_info == true) + { + } else if (user_options->example_hashes == true) { } diff --git a/src/hwmon.c b/src/hwmon.c index a2de81bc9..9d6987bcc 100644 --- a/src/hwmon.c +++ b/src/hwmon.c @@ -2225,6 +2225,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx) return 0; #endif // WITH_HWMON + if (user_options->hash_info == true) return 0; if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; diff --git a/src/induct.c b/src/induct.c index 11f80bf8c..c239cf5d7 100644 --- a/src/induct.c +++ b/src/induct.c @@ -40,6 +40,7 @@ int induct_ctx_init (hashcat_ctx_t *hashcat_ctx) induct_ctx->enabled = false; if (user_options->benchmark == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; diff --git a/src/interface.c b/src/interface.c index 64995a90b..dbca7d760 100644 --- a/src/interface.c +++ b/src/interface.c @@ -333,7 +333,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) hashconfig->has_optimized_kernel = hc_path_read (source_file); - if (user_options->example_hashes == false) + if (user_options->example_hashes == false && user_options->hash_info == false) { if (user_options->optimized_kernel_enable == true) { diff --git a/src/loopback.c b/src/loopback.c index 2568971d7..8de8d5084 100644 --- a/src/loopback.c +++ b/src/loopback.c @@ -61,6 +61,7 @@ int loopback_init (hashcat_ctx_t *hashcat_ctx) loopback_ctx->enabled = false; if (user_options->benchmark == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; diff --git a/src/main.c b/src/main.c index ea46786d6..422e30123 100644 --- a/src/main.c +++ b/src/main.c @@ -184,16 +184,20 @@ static void main_outerloop_starting (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MA status_ctx->shutdown_outer = false; - if ((user_options->example_hashes == false) && (user_options->keyspace == false) && (user_options->stdout_flag == false) && (user_options->backend_info == false) && (user_options->speed_only == false)) + if (user_options->hash_info == true) return; + if (user_options->example_hashes == true) return; + if (user_options->keyspace == true) return; + if (user_options->stdout_flag == true) return; + if (user_options->backend_info == true) return; + if (user_options->speed_only == true) return; + + if ((user_options_extra->wordlist_mode == WL_MODE_FILE) || (user_options_extra->wordlist_mode == WL_MODE_MASK)) { - if ((user_options_extra->wordlist_mode == WL_MODE_FILE) || (user_options_extra->wordlist_mode == WL_MODE_MASK)) - { - // see thread_keypress() how to access status information + // see thread_keypress() how to access status information - hc_thread_create (hashcat_user->outer_threads[hashcat_user->outer_threads_cnt], thread_keypress, hashcat_ctx); + hc_thread_create (hashcat_user->outer_threads[hashcat_user->outer_threads_cnt], thread_keypress, hashcat_ctx); - hashcat_user->outer_threads_cnt++; - } + hashcat_user->outer_threads_cnt++; } } @@ -257,6 +261,7 @@ static void main_cracker_finished (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAYB const user_options_t *user_options = hashcat_ctx->user_options; const user_options_extra_t *user_options_extra = hashcat_ctx->user_options_extra; + if (user_options->hash_info == true) return; if (user_options->example_hashes == true) return; if (user_options->keyspace == true) return; if (user_options->backend_info == true) return; @@ -1157,6 +1162,12 @@ int main (int argc, char **argv) rc_final = 0; } + else if (user_options->hash_info == true) + { + hash_info (hashcat_ctx); + + rc_final = 0; + } else if (user_options->example_hashes == true) { example_hashes (hashcat_ctx); diff --git a/src/mpsp.c b/src/mpsp.c index dfc25efaf..3ecdc653d 100644 --- a/src/mpsp.c +++ b/src/mpsp.c @@ -1391,6 +1391,7 @@ int mask_ctx_init (hashcat_ctx_t *hashcat_ctx) mask_ctx->enabled = false; + if (user_options->hash_info == true) return 0; if (user_options->example_hashes == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/outfile_check.c b/src/outfile_check.c index 02e3cb4fa..efde8735b 100644 --- a/src/outfile_check.c +++ b/src/outfile_check.c @@ -360,6 +360,7 @@ int outcheck_ctx_init (hashcat_ctx_t *hashcat_ctx) if (user_options->keyspace == true) return 0; if (user_options->benchmark == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->example_hashes == true) return 0; if (user_options->speed_only == true) return 0; if (user_options->progress_only == true) return 0; diff --git a/src/potfile.c b/src/potfile.c index c8864f7e3..ec655f378 100644 --- a/src/potfile.c +++ b/src/potfile.c @@ -111,6 +111,7 @@ int potfile_init (hashcat_ctx_t *hashcat_ctx) potfile_ctx->enabled = false; if (user_options->benchmark == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/restore.c b/src/restore.c index a56c1aa08..2736d451a 100644 --- a/src/restore.c +++ b/src/restore.c @@ -299,6 +299,7 @@ int restore_ctx_init (hashcat_ctx_t *hashcat_ctx, int argc, char **argv) restore_ctx->enabled = false; if (user_options->benchmark == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; diff --git a/src/straight.c b/src/straight.c index 5774f3ca2..08e9cced2 100644 --- a/src/straight.c +++ b/src/straight.c @@ -261,6 +261,7 @@ int straight_ctx_init (hashcat_ctx_t *hashcat_ctx) straight_ctx->enabled = false; + if (user_options->hash_info == true) return 0; if (user_options->example_hashes == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/terminal.c b/src/terminal.c index cb26e9d85..ba0ae2cf9 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -537,6 +537,129 @@ void compress_terminal_line_length (char *out_buf, const size_t keep_from_beginn *ptr1 = 0; } +void hash_info_single (hashcat_ctx_t *hashcat_ctx, user_options_t *user_options) +{ + if (hashconfig_init (hashcat_ctx) == 0) + { + hashconfig_t *hashconfig = hashcat_ctx->hashconfig; + + event_log_info (hashcat_ctx, "Hash mode #%u", hashconfig->hash_mode); + event_log_info (hashcat_ctx, " Name................: %s", hashconfig->hash_name); + event_log_info (hashcat_ctx, " Category............: %s", strhashcategory (hashconfig->hash_category)); + event_log_info (hashcat_ctx, " Password.Len.Min....: %d", hashconfig->pw_min); + event_log_info (hashcat_ctx, " Password.Len.Max....: %d", hashconfig->pw_max); + + if (hashconfig->is_salted == true) + { + event_log_info (hashcat_ctx, " Salt.Len.Min........: %d", hashconfig->salt_min); + event_log_info (hashcat_ctx, " Salt.Len.Max........: %d", hashconfig->salt_max); + } + + event_log_info (hashcat_ctx, " Hashes.Count.Min....: %d", hashconfig->hashes_count_min); + event_log_info (hashcat_ctx, " Hashes.Count.Max....: %u", hashconfig->hashes_count_max); + + char kernel_types[15]; + + memset (kernel_types, 0, sizeof (kernel_types)); + + if (hashconfig->has_pure_kernel) strncat (kernel_types, "pure ", 5); + if (hashconfig->has_optimized_kernel) strncat (kernel_types, "optimized", 9); + + event_log_info (hashcat_ctx, " Kernel.Type(s)......: %s", kernel_types); + + if ((hashconfig->st_hash != NULL) && (hashconfig->st_pass != NULL)) + { + if (hashconfig->opts_type & OPTS_TYPE_BINARY_HASHFILE) + { + event_log_info (hashcat_ctx, " Example.Hash.Format.: hex-encoded"); + event_log_info (hashcat_ctx, " Example.Hash........: %s", hashconfig->st_hash); + } + else + { + event_log_info (hashcat_ctx, " Example.Hash.Format.: plain"); + event_log_info (hashcat_ctx, " Example.Hash........: %s", hashconfig->st_hash); + } + + if (need_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), user_options->separator, false)) + { + char tmp_buf[HCBUFSIZ_LARGE] = { 0 }; + + int tmp_len = 0; + + tmp_buf[tmp_len++] = '$'; + tmp_buf[tmp_len++] = 'H'; + tmp_buf[tmp_len++] = 'E'; + tmp_buf[tmp_len++] = 'X'; + tmp_buf[tmp_len++] = '['; + + exec_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), (u8 *) tmp_buf + tmp_len); + + tmp_len += strlen (hashconfig->st_pass) * 2; + + tmp_buf[tmp_len++] = ']'; + tmp_buf[tmp_len++] = 0; + + event_log_info (hashcat_ctx, " Example.Pass........: %s", tmp_buf); + } + else + { + event_log_info (hashcat_ctx, " Example.Pass........: %s", hashconfig->st_pass); + } + } + else + { + event_log_info (hashcat_ctx, " Example.Hash.Format.: N/A"); + event_log_info (hashcat_ctx, " Example.Hash........: N/A"); + event_log_info (hashcat_ctx, " Example.Pass........: N/A"); + } + + if (hashconfig->benchmark_mask != NULL) + { + event_log_info (hashcat_ctx, " Benchmark.Mask......: %s", hashconfig->benchmark_mask); + } + else + { + event_log_info (hashcat_ctx, " Benchmark.Mask......: N/A"); + } + + event_log_info (hashcat_ctx, NULL); + } + + hashconfig_destroy (hashcat_ctx); +} + +void hash_info (hashcat_ctx_t *hashcat_ctx) +{ + folder_config_t *folder_config = hashcat_ctx->folder_config; + user_options_t *user_options = hashcat_ctx->user_options; + + event_log_info (hashcat_ctx, "Hash Info:"); + event_log_info (hashcat_ctx, "=========="); + event_log_info (hashcat_ctx, NULL); + + if (user_options->hash_mode_chgd == true) + { + hash_info_single (hashcat_ctx, user_options); + } + else + { + char *modulefile = (char *) hcmalloc (HCBUFSIZ_TINY); + + for (int i = 0; i < MODULE_HASH_MODES_MAXIMUM; i++) + { + user_options->hash_mode = i; + + module_filename (folder_config, i, modulefile, HCBUFSIZ_TINY); + + if (hc_path_exist (modulefile) == false) continue; + + hash_info_single (hashcat_ctx, user_options); + } + + hcfree (modulefile); + } +} + void example_hashes (hashcat_ctx_t *hashcat_ctx) { folder_config_t *folder_config = hashcat_ctx->folder_config; diff --git a/src/tuningdb.c b/src/tuningdb.c index f4e845c32..67e5b896b 100644 --- a/src/tuningdb.c +++ b/src/tuningdb.c @@ -54,6 +54,7 @@ int tuning_db_init (hashcat_ctx_t *hashcat_ctx) tuning_db->enabled = false; + if (user_options->hash_info == true) return 0; if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; diff --git a/src/usage.c b/src/usage.c index 0b9ad03fc..2320c190d 100644 --- a/src/usage.c +++ b/src/usage.c @@ -89,6 +89,7 @@ static const char *const USAGE_BIG_PRE_HASHMODES[] = " --bitmap-max | Num | Sets maximum bits allowed for bitmaps to X | --bitmap-max=24", " --cpu-affinity | Str | Locks to CPU devices, separated with commas | --cpu-affinity=1,2,3", " --hook-threads | Num | Sets number of threads for a hook (per compute unit) | --hook-threads=8", + " --hash-info | | Show information for each hash-mode |", " --example-hashes | | Show an example hash for each hash-mode |", " --backend-ignore-cuda | | Do not try to open CUDA interface on startup |", " --backend-ignore-opencl | | Do not try to open OpenCL interface on startup |", diff --git a/src/user_options.c b/src/user_options.c index 68dd69e68..c06ccd347 100644 --- a/src/user_options.c +++ b/src/user_options.c @@ -55,6 +55,7 @@ static const struct option long_options[] = {"generate-rules-seed", required_argument, NULL, IDX_RP_GEN_SEED}, {"hwmon-disable", no_argument, NULL, IDX_HWMON_DISABLE}, {"hwmon-temp-abort", required_argument, NULL, IDX_HWMON_TEMP_ABORT}, + {"hash-info", no_argument, NULL, IDX_HASH_INFO}, {"hash-type", required_argument, NULL, IDX_HASH_MODE}, {"hccapx-message-pair", required_argument, NULL, IDX_HCCAPX_MESSAGE_PAIR}, {"help", no_argument, NULL, IDX_HELP}, @@ -188,6 +189,7 @@ int user_options_init (hashcat_ctx_t *hashcat_ctx) user_options->force = FORCE; user_options->hwmon_disable = HWMON_DISABLE; user_options->hwmon_temp_abort = HWMON_TEMP_ABORT; + user_options->hash_info = HASH_INFO; user_options->hash_mode = HASH_MODE; user_options->hccapx_message_pair = HCCAPX_MESSAGE_PAIR; user_options->hex_charset = HEX_CHARSET; @@ -380,6 +382,7 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv) case IDX_ENCODING_TO: user_options->encoding_to = optarg; break; case IDX_INDUCTION_DIR: user_options->induction_dir = optarg; break; case IDX_OUTFILE_CHECK_DIR: user_options->outfile_check_dir = optarg; break; + case IDX_HASH_INFO: user_options->hash_info = true; break; case IDX_EXAMPLE_HASHES: user_options->example_hashes = true; break; case IDX_FORCE: user_options->force = true; break; case IDX_SELF_TEST_DISABLE: user_options->self_test_disable = true; break; @@ -1391,6 +1394,13 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) show_error = false; } } + else if (user_options->hash_info == true) + { + if (user_options->hc_argc == 0) + { + show_error = false; + } + } else if (user_options->example_hashes == true) { if (user_options->hc_argc == 0) @@ -1589,6 +1599,11 @@ void user_options_session_auto (hashcat_ctx_t *hashcat_ctx) user_options->session = "benchmark"; } + if (user_options->hash_info == true) + { + user_options->session = "hash_info"; + } + if (user_options->example_hashes == true) { user_options->session = "example_hashes"; @@ -1668,6 +1683,7 @@ void user_options_preprocess (hashcat_ctx_t *hashcat_ctx) } if (user_options->example_hashes == true + || user_options->hash_info == true || user_options->backend_info == true || user_options->keyspace == true || user_options->speed_only == true @@ -1723,6 +1739,11 @@ void user_options_preprocess (hashcat_ctx_t *hashcat_ctx) } } + if (user_options->hash_info == true) + { + user_options->quiet = true; + } + if (user_options->example_hashes == true) { user_options->quiet = true; @@ -1840,6 +1861,10 @@ void user_options_preprocess (hashcat_ctx_t *hashcat_ctx) if (user_options->example_hashes == true) { + } + else if (user_options->hash_info == true) + { + } else if (user_options->backend_info == true) { @@ -2057,6 +2082,10 @@ void user_options_extra_init (hashcat_ctx_t *hashcat_ctx) if (user_options->benchmark == true) { + } + else if (user_options->hash_info == true) + { + } else if (user_options->example_hashes == true) { @@ -3005,6 +3034,7 @@ void user_options_logger (hashcat_ctx_t *hashcat_ctx) logfile_top_uint (user_options->force); logfile_top_uint (user_options->hwmon_disable); logfile_top_uint (user_options->hwmon_temp_abort); + logfile_top_uint (user_options->hash_info); logfile_top_uint (user_options->hash_mode); logfile_top_uint (user_options->hex_charset); logfile_top_uint (user_options->hex_salt); diff --git a/src/wordlist.c b/src/wordlist.c index deda8afd2..66bf4e6f4 100644 --- a/src/wordlist.c +++ b/src/wordlist.c @@ -588,6 +588,7 @@ int wl_data_init (hashcat_ctx_t *hashcat_ctx) wl_data->enabled = false; if (user_options->benchmark == true) return 0; + if (user_options->hash_info == true) return 0; if (user_options->example_hashes == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; From 77e328d6591a8736fdaadd15e95584b449b05d02 Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Tue, 29 Dec 2020 07:56:20 +0100 Subject: [PATCH 2/3] Removed option --example-hashes, now is an alias of --hash-info --- docs/changes.txt | 3 +- include/terminal.h | 2 - include/types.h | 5 +- src/Makefile | 2 +- src/backend.c | 1 - src/bitmap.c | 1 - src/combinator.c | 1 - src/cpt.c | 1 - src/debugfile.c | 1 - src/dictstat.c | 1 - src/hashes.c | 3 -- src/hwmon.c | 1 - src/induct.c | 1 - src/interface.c | 2 +- src/loopback.c | 1 - src/main.c | 8 --- src/mpsp.c | 1 - src/outfile_check.c | 1 - src/potfile.c | 1 - src/restore.c | 1 - src/straight.c | 1 - src/terminal.c | 127 -------------------------------------------- src/tuningdb.c | 1 - src/usage.c | 2 +- src/user_options.c | 37 ++----------- src/wordlist.c | 1 - 26 files changed, 10 insertions(+), 197 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 2cdb27ef3..c8fef4fe8 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -19,7 +19,8 @@ ## Features ## -- Added option --hash-info to print generic information on hash types supported +- Added option --hash-info to show generic information for each hash-mode +- Removed option --example-hashes, now is an alias of --hash-info ## ## Bugs diff --git a/include/terminal.h b/include/terminal.h index d0fe1760c..b40ec9ed3 100644 --- a/include/terminal.h +++ b/include/terminal.h @@ -43,8 +43,6 @@ void compress_terminal_line_length (char *out_buf, const size_t keep_from_beginn void hash_info (hashcat_ctx_t *hashcat_ctx); -void example_hashes (hashcat_ctx_t *hashcat_ctx); - void backend_info (hashcat_ctx_t *hashcat_ctx); void backend_info_compact (hashcat_ctx_t *hashcat_ctx); diff --git a/include/types.h b/include/types.h index 88b7b4cf8..3f1a1cb9f 100644 --- a/include/types.h +++ b/include/types.h @@ -591,7 +591,6 @@ typedef enum user_options_defaults BRAIN_SESSION = 0, #endif DEBUG_MODE = 0, - EXAMPLE_HASHES = false, FORCE = false, HWMON_DISABLE = false, HWMON_TEMP_ABORT = 90, @@ -697,11 +696,10 @@ typedef enum user_options_map IDX_DEBUG_MODE = 0xff11, IDX_ENCODING_FROM = 0xff12, IDX_ENCODING_TO = 0xff13, - IDX_EXAMPLE_HASHES = 0xff14, + IDX_HASH_INFO = 0xff14, IDX_FORCE = 0xff15, IDX_HWMON_DISABLE = 0xff16, IDX_HWMON_TEMP_ABORT = 0xff17, - IDX_HASH_INFO = 0xff4d, // must be changed before merging IDX_HASH_MODE = 'm', IDX_HCCAPX_MESSAGE_PAIR = 0xff18, IDX_HELP = 'h', @@ -1940,7 +1938,6 @@ typedef struct user_options bool brain_client; bool brain_server; #endif - bool example_hashes; bool force; bool hwmon_disable; bool hash_info; diff --git a/src/Makefile b/src/Makefile index ebab9b677..00a55b509 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,7 +4,7 @@ ## SHARED ?= 0 -DEBUG := 1 +DEBUG := 0 PRODUCTION := 0 PRODUCTION_VERSION := v6.1.1 ENABLE_CUBIN ?= 1 diff --git a/src/backend.c b/src/backend.c index 593dda198..aa4f79c9e 100644 --- a/src/backend.c +++ b/src/backend.c @@ -4957,7 +4957,6 @@ int backend_ctx_init (hashcat_ctx_t *hashcat_ctx) backend_ctx->enabled = false; if (user_options->hash_info == true) return 0; - if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->show == true) return 0; diff --git a/src/bitmap.c b/src/bitmap.c index 9027c0dd1..f161d3027 100644 --- a/src/bitmap.c +++ b/src/bitmap.c @@ -80,7 +80,6 @@ int bitmap_ctx_init (hashcat_ctx_t *hashcat_ctx) bitmap_ctx->enabled = false; if (user_options->hash_info == true) return 0; - if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/combinator.c b/src/combinator.c index 6db46a886..b695d7fff 100644 --- a/src/combinator.c +++ b/src/combinator.c @@ -20,7 +20,6 @@ int combinator_ctx_init (hashcat_ctx_t *hashcat_ctx) combinator_ctx->enabled = false; if (user_options->hash_info == true) return 0; - if (user_options->example_hashes == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; if (user_options->show == true) return 0; diff --git a/src/cpt.c b/src/cpt.c index c18f5d3bf..dc40d612c 100644 --- a/src/cpt.c +++ b/src/cpt.c @@ -16,7 +16,6 @@ int cpt_ctx_init (hashcat_ctx_t *hashcat_ctx) cpt_ctx->enabled = false; if (user_options->hash_info == true) return 0; - if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/debugfile.c b/src/debugfile.c index 2be26d356..041b46f28 100644 --- a/src/debugfile.c +++ b/src/debugfile.c @@ -88,7 +88,6 @@ int debugfile_init (hashcat_ctx_t *hashcat_ctx) if (user_options->benchmark == true) return 0; if (user_options->hash_info == true) return 0; - if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/dictstat.c b/src/dictstat.c index 96514ad5a..66d49ccce 100644 --- a/src/dictstat.c +++ b/src/dictstat.c @@ -58,7 +58,6 @@ int dictstat_init (hashcat_ctx_t *hashcat_ctx) if (user_options->benchmark == true) return 0; if (user_options->hash_info == true) return 0; - if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/hashes.c b/src/hashes.c index d86a9b32c..653df4e39 100644 --- a/src/hashes.c +++ b/src/hashes.c @@ -904,9 +904,6 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx) else if (user_options->hash_info == true) { } - else if (user_options->example_hashes == true) - { - } else if (user_options->keyspace == true) { } diff --git a/src/hwmon.c b/src/hwmon.c index 9d6987bcc..824aa767b 100644 --- a/src/hwmon.c +++ b/src/hwmon.c @@ -2226,7 +2226,6 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx) #endif // WITH_HWMON if (user_options->hash_info == true) return 0; - if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/induct.c b/src/induct.c index c239cf5d7..b11befb79 100644 --- a/src/induct.c +++ b/src/induct.c @@ -41,7 +41,6 @@ int induct_ctx_init (hashcat_ctx_t *hashcat_ctx) if (user_options->benchmark == true) return 0; if (user_options->hash_info == true) return 0; - if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/interface.c b/src/interface.c index dbca7d760..7128dbd61 100644 --- a/src/interface.c +++ b/src/interface.c @@ -333,7 +333,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx) hashconfig->has_optimized_kernel = hc_path_read (source_file); - if (user_options->example_hashes == false && user_options->hash_info == false) + if (user_options->hash_info == false) { if (user_options->optimized_kernel_enable == true) { diff --git a/src/loopback.c b/src/loopback.c index 8de8d5084..694ef1a87 100644 --- a/src/loopback.c +++ b/src/loopback.c @@ -62,7 +62,6 @@ int loopback_init (hashcat_ctx_t *hashcat_ctx) if (user_options->benchmark == true) return 0; if (user_options->hash_info == true) return 0; - if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/main.c b/src/main.c index 422e30123..86aa4749c 100644 --- a/src/main.c +++ b/src/main.c @@ -185,7 +185,6 @@ static void main_outerloop_starting (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MA status_ctx->shutdown_outer = false; if (user_options->hash_info == true) return; - if (user_options->example_hashes == true) return; if (user_options->keyspace == true) return; if (user_options->stdout_flag == true) return; if (user_options->backend_info == true) return; @@ -262,7 +261,6 @@ static void main_cracker_finished (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAYB const user_options_extra_t *user_options_extra = hashcat_ctx->user_options_extra; if (user_options->hash_info == true) return; - if (user_options->example_hashes == true) return; if (user_options->keyspace == true) return; if (user_options->backend_info == true) return; if (user_options->stdout_flag == true) return; @@ -1168,12 +1166,6 @@ int main (int argc, char **argv) rc_final = 0; } - else if (user_options->example_hashes == true) - { - example_hashes (hashcat_ctx); - - rc_final = 0; - } else if (user_options->backend_info == true) { // if this is just backend_info, no need to execute some real cracking session diff --git a/src/mpsp.c b/src/mpsp.c index 3ecdc653d..908d0d443 100644 --- a/src/mpsp.c +++ b/src/mpsp.c @@ -1392,7 +1392,6 @@ int mask_ctx_init (hashcat_ctx_t *hashcat_ctx) mask_ctx->enabled = false; if (user_options->hash_info == true) return 0; - if (user_options->example_hashes == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; if (user_options->show == true) return 0; diff --git a/src/outfile_check.c b/src/outfile_check.c index efde8735b..12c7cd757 100644 --- a/src/outfile_check.c +++ b/src/outfile_check.c @@ -361,7 +361,6 @@ int outcheck_ctx_init (hashcat_ctx_t *hashcat_ctx) if (user_options->keyspace == true) return 0; if (user_options->benchmark == true) return 0; if (user_options->hash_info == true) return 0; - if (user_options->example_hashes == true) return 0; if (user_options->speed_only == true) return 0; if (user_options->progress_only == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/potfile.c b/src/potfile.c index ec655f378..e8059c0c2 100644 --- a/src/potfile.c +++ b/src/potfile.c @@ -112,7 +112,6 @@ int potfile_init (hashcat_ctx_t *hashcat_ctx) if (user_options->benchmark == true) return 0; if (user_options->hash_info == true) return 0; - if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->backend_info == true) return 0; if (user_options->stdout_flag == true) return 0; diff --git a/src/restore.c b/src/restore.c index 2736d451a..7d3c41ff4 100644 --- a/src/restore.c +++ b/src/restore.c @@ -300,7 +300,6 @@ int restore_ctx_init (hashcat_ctx_t *hashcat_ctx, int argc, char **argv) if (user_options->benchmark == true) return 0; if (user_options->hash_info == true) return 0; - if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/straight.c b/src/straight.c index 08e9cced2..9b91ec30d 100644 --- a/src/straight.c +++ b/src/straight.c @@ -262,7 +262,6 @@ int straight_ctx_init (hashcat_ctx_t *hashcat_ctx) straight_ctx->enabled = false; if (user_options->hash_info == true) return 0; - if (user_options->example_hashes == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; if (user_options->show == true) return 0; diff --git a/src/terminal.c b/src/terminal.c index ba0ae2cf9..9c89d81a7 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -660,133 +660,6 @@ void hash_info (hashcat_ctx_t *hashcat_ctx) } } -void example_hashes (hashcat_ctx_t *hashcat_ctx) -{ - folder_config_t *folder_config = hashcat_ctx->folder_config; - user_options_t *user_options = hashcat_ctx->user_options; - - if (user_options->hash_mode_chgd == true) - { - if (hashconfig_init (hashcat_ctx) == 0) - { - hashconfig_t *hashconfig = hashcat_ctx->hashconfig; - - event_log_info (hashcat_ctx, "MODE: %u", hashconfig->hash_mode); - event_log_info (hashcat_ctx, "TYPE: %s", hashconfig->hash_name); - - if ((hashconfig->st_hash != NULL) && (hashconfig->st_pass != NULL)) - { - if (hashconfig->opts_type & OPTS_TYPE_BINARY_HASHFILE) - { - event_log_info (hashcat_ctx, "HASH (hex-encoded): %s", hashconfig->st_hash); - } - else - { - event_log_info (hashcat_ctx, "HASH: %s", hashconfig->st_hash); - } - - if (need_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), user_options->separator, false)) - { - char tmp_buf[HCBUFSIZ_LARGE] = { 0 }; - - int tmp_len = 0; - - tmp_buf[tmp_len++] = '$'; - tmp_buf[tmp_len++] = 'H'; - tmp_buf[tmp_len++] = 'E'; - tmp_buf[tmp_len++] = 'X'; - tmp_buf[tmp_len++] = '['; - - exec_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), (u8 *) tmp_buf + tmp_len); - - tmp_len += strlen (hashconfig->st_pass) * 2; - - tmp_buf[tmp_len++] = ']'; - tmp_buf[tmp_len++] = 0; - - event_log_info (hashcat_ctx, "PASS: %s", tmp_buf); - } - else - { - event_log_info (hashcat_ctx, "PASS: %s", hashconfig->st_pass); - } - } - else - { - event_log_info (hashcat_ctx, "HASH: not stored"); - event_log_info (hashcat_ctx, "PASS: not stored"); - } - - event_log_info (hashcat_ctx, NULL); - } - - hashconfig_destroy (hashcat_ctx); - } - else - { - char *modulefile = (char *) hcmalloc (HCBUFSIZ_TINY); - - for (int i = 0; i < MODULE_HASH_MODES_MAXIMUM; i++) - { - user_options->hash_mode = i; - - module_filename (folder_config, i, modulefile, HCBUFSIZ_TINY); - - if (hc_path_exist (modulefile) == false) continue; - - if (hashconfig_init (hashcat_ctx) == 0) - { - hashconfig_t *hashconfig = hashcat_ctx->hashconfig; - - event_log_info (hashcat_ctx, "MODE: %u", hashconfig->hash_mode); - event_log_info (hashcat_ctx, "TYPE: %s", hashconfig->hash_name); - - if ((hashconfig->st_hash != NULL) && (hashconfig->st_pass != NULL)) - { - event_log_info (hashcat_ctx, "HASH: %s", hashconfig->st_hash); - - if (need_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), user_options->separator, false)) - { - char tmp_buf[HCBUFSIZ_LARGE] = { 0 }; - - int tmp_len = 0; - - tmp_buf[tmp_len++] = '$'; - tmp_buf[tmp_len++] = 'H'; - tmp_buf[tmp_len++] = 'E'; - tmp_buf[tmp_len++] = 'X'; - tmp_buf[tmp_len++] = '['; - - exec_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), (u8 *) tmp_buf + tmp_len); - - tmp_len += strlen (hashconfig->st_pass) * 2; - - tmp_buf[tmp_len++] = ']'; - tmp_buf[tmp_len++] = 0; - - event_log_info (hashcat_ctx, "PASS: %s", tmp_buf); - } - else - { - event_log_info (hashcat_ctx, "PASS: %s", hashconfig->st_pass); - } - } - else - { - event_log_info (hashcat_ctx, "HASH: not stored"); - event_log_info (hashcat_ctx, "PASS: not stored"); - } - - event_log_info (hashcat_ctx, NULL); - } - - hashconfig_destroy (hashcat_ctx); - } - - hcfree (modulefile); - } -} - void backend_info (hashcat_ctx_t *hashcat_ctx) { const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; diff --git a/src/tuningdb.c b/src/tuningdb.c index 67e5b896b..c06d0b88c 100644 --- a/src/tuningdb.c +++ b/src/tuningdb.c @@ -55,7 +55,6 @@ int tuning_db_init (hashcat_ctx_t *hashcat_ctx) tuning_db->enabled = false; if (user_options->hash_info == true) return 0; - if (user_options->example_hashes == true) return 0; if (user_options->keyspace == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; diff --git a/src/usage.c b/src/usage.c index 2320c190d..77f860547 100644 --- a/src/usage.c +++ b/src/usage.c @@ -90,7 +90,7 @@ static const char *const USAGE_BIG_PRE_HASHMODES[] = " --cpu-affinity | Str | Locks to CPU devices, separated with commas | --cpu-affinity=1,2,3", " --hook-threads | Num | Sets number of threads for a hook (per compute unit) | --hook-threads=8", " --hash-info | | Show information for each hash-mode |", - " --example-hashes | | Show an example hash for each hash-mode |", + " --example-hashes | | Alias of --hash-info |", " --backend-ignore-cuda | | Do not try to open CUDA interface on startup |", " --backend-ignore-opencl | | Do not try to open OpenCL interface on startup |", " -I, --backend-info | | Show info about detected backend API devices | -I", diff --git a/src/user_options.c b/src/user_options.c index c06ccd347..8f0955867 100644 --- a/src/user_options.c +++ b/src/user_options.c @@ -47,7 +47,7 @@ static const struct option long_options[] = {"debug-mode", required_argument, NULL, IDX_DEBUG_MODE}, {"encoding-from", required_argument, NULL, IDX_ENCODING_FROM}, {"encoding-to", required_argument, NULL, IDX_ENCODING_TO}, - {"example-hashes", no_argument, NULL, IDX_EXAMPLE_HASHES}, + {"example-hashes", no_argument, NULL, IDX_HASH_INFO}, // alias of hash-info {"force", no_argument, NULL, IDX_FORCE}, {"generate-rules-func-max", required_argument, NULL, IDX_RP_GEN_FUNC_MAX}, {"generate-rules-func-min", required_argument, NULL, IDX_RP_GEN_FUNC_MIN}, @@ -185,7 +185,6 @@ int user_options_init (hashcat_ctx_t *hashcat_ctx) user_options->debug_mode = DEBUG_MODE; user_options->encoding_from = ENCODING_FROM; user_options->encoding_to = ENCODING_TO; - user_options->example_hashes = EXAMPLE_HASHES; user_options->force = FORCE; user_options->hwmon_disable = HWMON_DISABLE; user_options->hwmon_temp_abort = HWMON_TEMP_ABORT; @@ -383,7 +382,6 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv) case IDX_INDUCTION_DIR: user_options->induction_dir = optarg; break; case IDX_OUTFILE_CHECK_DIR: user_options->outfile_check_dir = optarg; break; case IDX_HASH_INFO: user_options->hash_info = true; break; - case IDX_EXAMPLE_HASHES: user_options->example_hashes = true; break; case IDX_FORCE: user_options->force = true; break; case IDX_SELF_TEST_DISABLE: user_options->self_test_disable = true; break; case IDX_SKIP: user_options->skip = hc_strtoull (optarg, NULL, 10); @@ -1401,13 +1399,6 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) show_error = false; } } - else if (user_options->example_hashes == true) - { - if (user_options->hc_argc == 0) - { - show_error = false; - } - } else if (user_options->backend_info == true) { if (user_options->hc_argc == 0) @@ -1604,11 +1595,6 @@ void user_options_session_auto (hashcat_ctx_t *hashcat_ctx) user_options->session = "hash_info"; } - if (user_options->example_hashes == true) - { - user_options->session = "example_hashes"; - } - if (user_options->usage == true) { user_options->session = "usage"; @@ -1682,8 +1668,7 @@ void user_options_preprocess (hashcat_ctx_t *hashcat_ctx) user_options->bitmap_max = 1; } - if (user_options->example_hashes == true - || user_options->hash_info == true + if (user_options->hash_info == true || user_options->backend_info == true || user_options->keyspace == true || user_options->speed_only == true @@ -1744,11 +1729,6 @@ void user_options_preprocess (hashcat_ctx_t *hashcat_ctx) user_options->quiet = true; } - if (user_options->example_hashes == true) - { - user_options->quiet = true; - } - if (user_options->usage == true) { user_options->quiet = true; @@ -1858,11 +1838,7 @@ void user_options_preprocess (hashcat_ctx_t *hashcat_ctx) if (user_options->attack_mode == ATTACK_MODE_BF) { - if (user_options->example_hashes == true) - { - - } - else if (user_options->hash_info == true) + if (user_options->hash_info == true) { } @@ -2086,10 +2062,6 @@ void user_options_extra_init (hashcat_ctx_t *hashcat_ctx) else if (user_options->hash_info == true) { - } - else if (user_options->example_hashes == true) - { - } else if (user_options->backend_info == true) { @@ -3030,11 +3002,10 @@ void user_options_logger (hashcat_ctx_t *hashcat_ctx) logfile_top_uint (user_options->bitmap_max); logfile_top_uint (user_options->bitmap_min); logfile_top_uint (user_options->debug_mode); - logfile_top_uint (user_options->example_hashes); + logfile_top_uint (user_options->hash_info); logfile_top_uint (user_options->force); logfile_top_uint (user_options->hwmon_disable); logfile_top_uint (user_options->hwmon_temp_abort); - logfile_top_uint (user_options->hash_info); logfile_top_uint (user_options->hash_mode); logfile_top_uint (user_options->hex_charset); logfile_top_uint (user_options->hex_salt); diff --git a/src/wordlist.c b/src/wordlist.c index 66bf4e6f4..aa8aaf82e 100644 --- a/src/wordlist.c +++ b/src/wordlist.c @@ -589,7 +589,6 @@ int wl_data_init (hashcat_ctx_t *hashcat_ctx) if (user_options->benchmark == true) return 0; if (user_options->hash_info == true) return 0; - if (user_options->example_hashes == true) return 0; if (user_options->left == true) return 0; if (user_options->backend_info == true) return 0; if (user_options->usage == true) return 0; From 82af37b93a0a49462ae486764ede9b3aab89cedc Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Wed, 30 Dec 2020 19:16:57 +0100 Subject: [PATCH 3/3] Added salt type and slow hash info --- src/terminal.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/terminal.c b/src/terminal.c index 9c89d81a7..786c8d6bf 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -546,11 +546,16 @@ void hash_info_single (hashcat_ctx_t *hashcat_ctx, user_options_t *user_options) event_log_info (hashcat_ctx, "Hash mode #%u", hashconfig->hash_mode); event_log_info (hashcat_ctx, " Name................: %s", hashconfig->hash_name); event_log_info (hashcat_ctx, " Category............: %s", strhashcategory (hashconfig->hash_category)); + event_log_info (hashcat_ctx, " Slow.Hash...........: %s", (hashconfig->attack_exec == ATTACK_EXEC_INSIDE_KERNEL) ? "No" : "Yes"); + event_log_info (hashcat_ctx, " Password.Len.Min....: %d", hashconfig->pw_min); event_log_info (hashcat_ctx, " Password.Len.Max....: %d", hashconfig->pw_max); if (hashconfig->is_salted == true) { + u32 t = hashconfig->salt_type; + char *t_desc = (t == SALT_TYPE_EMBEDDED) ? "Embedded\0" : (t == SALT_TYPE_GENERIC) ? "Generic\0" : "Virtual\0"; + event_log_info (hashcat_ctx, " Salt.Type...........: %s", t_desc); event_log_info (hashcat_ctx, " Salt.Len.Min........: %d", hashconfig->salt_min); event_log_info (hashcat_ctx, " Salt.Len.Max........: %d", hashconfig->salt_max); }