diff --git a/docs/changes.txt b/docs/changes.txt index d4dfff3c0..f0a4068e1 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -62,6 +62,7 @@ - OpenCL Kernels: Updated default scrypt TMTO to be ideal for latest NVidia and AMD top models - OpenCL Kernels: Vectorized tons of slow kernels to improve CPU cracking speed - OpenCL Runtime: Updated AMD ROCm driver version check, warn if version < 1.1 +- Startup: Add visual indicator of active options when benchmarking - Startup: Show some attack-specific optimizer constraints on start, eg: minimum and maximum support password- and salt-length - Startup: Check and abort session if outfile and wordlist point to the same file - WPA cracking: Improved nonce-error-corrections mode to use a both positive and negative corrections diff --git a/include/user_options.h b/include/user_options.h index 32cb1b308..d20f6ad2d 100644 --- a/include/user_options.h +++ b/include/user_options.h @@ -32,4 +32,6 @@ void user_options_logger (hashcat_ctx_t *hashcat_ctx); int user_options_check_files (hashcat_ctx_t *hashcat_ctx); +void user_options_info (hashcat_ctx_t *hashcat_ctx); + #endif // _USER_OPTIONS_H diff --git a/src/main.c b/src/main.c index 1e83ff936..98c67c7b6 100644 --- a/src/main.c +++ b/src/main.c @@ -1056,6 +1056,8 @@ int main (int argc, char **argv) opencl_info_compact (hashcat_ctx); + user_options_info (hashcat_ctx); + rc_final = hashcat_session_execute (hashcat_ctx); } } diff --git a/src/terminal.c b/src/terminal.c index b96a7c77f..ea3ed6b2e 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -38,14 +38,7 @@ void welcome_screen (hashcat_ctx_t *hashcat_ctx, const char *version_tag) if (user_options->machine_readable == false) { event_log_info (hashcat_ctx, "%s (%s) starting in benchmark mode...", PROGNAME, version_tag); - if (user_options->optimized_kernel_enable == true) - { - event_log_info (hashcat_ctx, "Active options: -O, -w %u", user_options->workload_profile); - } - else - { - event_log_info (hashcat_ctx, "Active options: -w %u", user_options->workload_profile); - } + event_log_info (hashcat_ctx, NULL); if (user_options->workload_profile_chgd == false) @@ -59,15 +52,7 @@ void welcome_screen (hashcat_ctx_t *hashcat_ctx, const char *version_tag) } else { - event_log_info (hashcat_ctx, "# %s (%s)", PROGNAME, version_tag); - if (user_options->optimized_kernel_enable == true) - { - event_log_info (hashcat_ctx, "# Active options: -O, -w %u", user_options->workload_profile); - } - else - { - event_log_info (hashcat_ctx, "# Active options: -w %u", user_options->workload_profile); - } + event_log_info (hashcat_ctx, "# version: %s", version_tag); } } else if (user_options->restore == true) diff --git a/src/user_options.c b/src/user_options.c index 5e64b6079..67b459031 100644 --- a/src/user_options.c +++ b/src/user_options.c @@ -1451,6 +1451,119 @@ void user_options_postprocess (hashcat_ctx_t *hashcat_ctx) } } +void user_options_info (hashcat_ctx_t *hashcat_ctx) +{ + const user_options_t *user_options = hashcat_ctx->user_options; + + if (user_options->quiet == true) return; + + if (user_options->machine_readable == false) + { + event_log_info (hashcat_ctx, "Benchmark relevant options:"); + event_log_info (hashcat_ctx, "==========================="); + + if (user_options->force == true) + { + event_log_info (hashcat_ctx, "* --force"); + } + + if (user_options->opencl_devices) + { + event_log_info (hashcat_ctx, "* --opencl-devices=%s", user_options->opencl_devices); + } + + if (user_options->opencl_device_types) + { + event_log_info (hashcat_ctx, "* --opencl-device-types=%s", user_options->opencl_device_types); + } + + if (user_options->opencl_platforms) + { + event_log_info (hashcat_ctx, "* --opencl-platforms=%s", user_options->opencl_platforms); + } + + if (user_options->optimized_kernel_enable == true) + { + event_log_info (hashcat_ctx, "* --optimized-kernel-enable"); + } + + if (user_options->opencl_vector_width_chgd == true) + { + event_log_info (hashcat_ctx, "* --opencl-vector-width=%u", user_options->opencl_vector_width); + } + + if (user_options->nvidia_spin_damp_chgd == true) + { + event_log_info (hashcat_ctx, "* --nvidia-spin-damp=%u", user_options->nvidia_spin_damp); + } + + if ((user_options->kernel_accel_chgd == true) || (user_options->kernel_loops_chgd == true)) + { + event_log_info (hashcat_ctx, "* --kernel-accel=%u", user_options->kernel_accel); + event_log_info (hashcat_ctx, "* --kernel-loops=%u", user_options->kernel_loops); + } + else + { + if (user_options->workload_profile_chgd == true) + { + event_log_info (hashcat_ctx, "* --workload-profile=%u", user_options->workload_profile); + } + } + + event_log_info (hashcat_ctx, NULL); + } + else + { + if (user_options->force == true) + { + event_log_info (hashcat_ctx, "# option: --force"); + } + + if (user_options->opencl_devices) + { + event_log_info (hashcat_ctx, "# option: --opencl-devices=%s", user_options->opencl_devices); + } + + if (user_options->opencl_device_types) + { + event_log_info (hashcat_ctx, "# option: --opencl-device-types=%s", user_options->opencl_device_types); + } + + if (user_options->opencl_platforms) + { + event_log_info (hashcat_ctx, "* option: --opencl-platforms=%s", user_options->opencl_platforms); + } + + if (user_options->optimized_kernel_enable == true) + { + event_log_info (hashcat_ctx, "# option: --optimized-kernel-enable"); + } + + if (user_options->opencl_vector_width_chgd == true) + { + event_log_info (hashcat_ctx, "# option: --opencl-vector-width=%u", user_options->opencl_vector_width); + } + + if (user_options->nvidia_spin_damp_chgd == true) + { + event_log_info (hashcat_ctx, "* option: --nvidia-spin-damp=%u", user_options->nvidia_spin_damp); + } + + if ((user_options->kernel_accel_chgd == true) || (user_options->kernel_loops_chgd == true)) + { + event_log_info (hashcat_ctx, "# option: --kernel-accel=%u", user_options->kernel_accel); + event_log_info (hashcat_ctx, "# option: --kernel-loops=%u", user_options->kernel_loops); + } + else + { + if (user_options->workload_profile_chgd == true) + { + event_log_info (hashcat_ctx, "# option: --workload-profile=%u", user_options->workload_profile); + } + } + } +} + void user_options_extra_init (hashcat_ctx_t *hashcat_ctx) { user_options_t *user_options = hashcat_ctx->user_options;