OpenCL Runtime: Use our own yielding technique for synchronizing rather than vendor specific

Parameter: Rename --nvidia-spin-damp to --spin-damp (now accessible for all devices)
pull/1793/head
Jens Steube 6 years ago
parent ae577410d0
commit e770449702

@ -30,6 +30,7 @@
## Improvements
##
- OpenCL Runtime: Use our own yielding technique for synchronizing rather than vendor specific
- Startup: Show OpenCL runtime initialization message (per device)
- xxHash: Added support for using the version provided by the OS/distribution
@ -63,6 +64,7 @@
- Hardware Monitor: Renamed --gpu-temp-disable to --hwmon-disable
- Memory: Limit maximum host memory allocation depending on bitness
- Memory: Reduced default maximum bitmap size from 24 to 18 and give a notice to use --bitmap-max to restore
- Parameter: Rename --nvidia-spin-damp to --spin-damp (now accessible for all devices)
- Pidfile: Treat a corrupted pidfile like a not existing pidfile
- OpenCL Device: Do a real query on OpenCL local memory type instead of just assuming it
- Tests: Added hash-mode 11700 (Streebog-256)

@ -189,8 +189,8 @@ _hashcat ()
local BUILD_IN_CHARSETS='?l ?u ?d ?a ?b ?s ?h ?H'
local SHORT_OPTS="-m -a -V -v -h -b -t -o -p -c -d -w -n -u -j -k -r -g -1 -2 -3 -4 -i -I -s -l -O -S -z"
local LONG_OPTS="--hash-type --attack-mode --version --help --quiet --benchmark --benchmark-all --hex-salt --hex-wordlist --hex-charset --force --status --status-timer --machine-readable --loopback --markov-hcstat2 --markov-disable --markov-classic --markov-threshold --runtime --session --speed-only --progress-only --restore --restore-file-path --restore-disable --outfile --outfile-format --outfile-autohex-disable --outfile-check-timer --outfile-check-dir --wordlist-autohex-disable --separator --show --left --username --remove --remove-timer --potfile-disable --potfile-path --debug-mode --debug-file --induction-dir --segment-size --bitmap-min --bitmap-max --cpu-affinity --example-hashes --opencl-info --opencl-devices --opencl-platforms --opencl-device-types --opencl-vector-width --workload-profile --kernel-accel --kernel-loops --kernel-threads --nvidia-spin-damp --hwmon-disable --hwmon-temp-abort --skip --limit --keyspace --rule-left --rule-right --rules-file --generate-rules --generate-rules-func-min --generate-rules-func-max --generate-rules-seed --custom-charset1 --custom-charset2 --custom-charset3 --custom-charset4 --increment --increment-min --increment-max --logfile-disable --scrypt-tmto --truecrypt-keyboard-layout --truecrypt-keyfiles --veracrypt-keyboard-layout --veracrypt-keyfiles --veracrypt-pim --stdout --keep-guessing --hccapx-message-pair --nonce-error-corrections --encoding-from --encoding-to --optimized-kernel-enable --self-test-disable --slow-candidates --brain-server --brain-client --brain-client-features --brain-host --brain-port --brain-session --brain-session-whitelist --brain-password"
local OPTIONS="-m -a -t -o -p -c -d -w -n -u -j -k -r -g -1 -2 -3 -4 -s -l --hash-type --attack-mode --status-timer --markov-hcstat2 --markov-threshold --runtime --session --timer --outfile --outfile-format --outfile-check-timer --outfile-check-dir --separator --remove-timer --potfile-path --restore-file-path --debug-mode --debug-file --induction-dir --segment-size --bitmap-min --bitmap-max --cpu-affinity --opencl-devices --opencl-platforms --opencl-device-types --opencl-vector-width --workload-profile --kernel-accel --kernel-loops --kernel-threads --nvidia-spin-damp --hwmon-temp-abort --skip --limit --rule-left --rule-right --rules-file --generate-rules --generate-rules-func-min --generate-rules-func-max --generate-rules-seed --custom-charset1 --custom-charset2 --custom-charset3 --custom-charset4 --increment-min --increment-max --scrypt-tmto --truecrypt-keyboard-layout --truecrypt-keyfiles --veracrypt-keyboard-layout --veracrypt-keyfiles --veracrypt-pim --hccapx-message-pair --nonce-error-corrections --encoding-from --encoding-to --brain-host --brain-password --brain-port --brain-session --brain-whitelist-session --stdin-timeout-abort"
local LONG_OPTS="--hash-type --attack-mode --version --help --quiet --benchmark --benchmark-all --hex-salt --hex-wordlist --hex-charset --force --status --status-timer --machine-readable --loopback --markov-hcstat2 --markov-disable --markov-classic --markov-threshold --runtime --session --speed-only --progress-only --restore --restore-file-path --restore-disable --outfile --outfile-format --outfile-autohex-disable --outfile-check-timer --outfile-check-dir --wordlist-autohex-disable --separator --show --left --username --remove --remove-timer --potfile-disable --potfile-path --debug-mode --debug-file --induction-dir --segment-size --bitmap-min --bitmap-max --cpu-affinity --example-hashes --opencl-info --opencl-devices --opencl-platforms --opencl-device-types --opencl-vector-width --workload-profile --kernel-accel --kernel-loops --kernel-threads --spin-damp --hwmon-disable --hwmon-temp-abort --skip --limit --keyspace --rule-left --rule-right --rules-file --generate-rules --generate-rules-func-min --generate-rules-func-max --generate-rules-seed --custom-charset1 --custom-charset2 --custom-charset3 --custom-charset4 --increment --increment-min --increment-max --logfile-disable --scrypt-tmto --truecrypt-keyboard-layout --truecrypt-keyfiles --veracrypt-keyboard-layout --veracrypt-keyfiles --veracrypt-pim --stdout --keep-guessing --hccapx-message-pair --nonce-error-corrections --encoding-from --encoding-to --optimized-kernel-enable --self-test-disable --slow-candidates --brain-server --brain-client --brain-client-features --brain-host --brain-port --brain-session --brain-session-whitelist --brain-password"
local OPTIONS="-m -a -t -o -p -c -d -w -n -u -j -k -r -g -1 -2 -3 -4 -s -l --hash-type --attack-mode --status-timer --markov-hcstat2 --markov-threshold --runtime --session --timer --outfile --outfile-format --outfile-check-timer --outfile-check-dir --separator --remove-timer --potfile-path --restore-file-path --debug-mode --debug-file --induction-dir --segment-size --bitmap-min --bitmap-max --cpu-affinity --opencl-devices --opencl-platforms --opencl-device-types --opencl-vector-width --workload-profile --kernel-accel --kernel-loops --kernel-threads --spin-damp --hwmon-temp-abort --skip --limit --rule-left --rule-right --rules-file --generate-rules --generate-rules-func-min --generate-rules-func-max --generate-rules-seed --custom-charset1 --custom-charset2 --custom-charset3 --custom-charset4 --increment-min --increment-max --scrypt-tmto --truecrypt-keyboard-layout --truecrypt-keyfiles --veracrypt-keyboard-layout --veracrypt-keyfiles --veracrypt-pim --hccapx-message-pair --nonce-error-corrections --encoding-from --encoding-to --brain-host --brain-password --brain-port --brain-session --brain-whitelist-session --stdin-timeout-abort"
COMPREPLY=()
local cur="${COMP_WORDS[COMP_CWORD]}"
@ -367,7 +367,7 @@ _hashcat ()
-t|-p|-c|-j|-k|-g| \
--status-timer|--markov-threshold|--runtime|--session|--separator|--segment-size|--rule-left|--rule-right| \
--nvidia-spin-damp|--hwmon-temp-abort|--generate-rules|--generate-rules-func-min|--generate-rules-func-max| \
--spin-damp|--hwmon-temp-abort|--generate-rules|--generate-rules-func-min|--generate-rules-func-max| \
--increment-min|--increment-max|--remove-timer|--bitmap-min|--bitmap-max|--skip|--limit|--generate-rules-seed| \
--outfile-check-timer|--outfile-check-dir|--induction-dir|--scrypt-tmto|--encoding-from|--encoding-to|--optimized-kernel-enable|--brain-host|--brain-port|--brain-password|--stdin-timeout-abort)
return 0

@ -573,7 +573,6 @@ typedef enum user_options_defaults
MARKOV_DISABLE = false,
MARKOV_THRESHOLD = 0,
NONCE_ERROR_CORRECTIONS = 8,
NVIDIA_SPIN_DAMP = 100,
OPENCL_INFO = false,
OPENCL_VECTOR_WIDTH = 0,
OPTIMIZED_KERNEL_ENABLE = false,
@ -601,6 +600,7 @@ typedef enum user_options_defaults
SKIP = 0,
SLOW_CANDIDATES = false,
SPEED_ONLY = false,
SPIN_DAMP = 8,
STATUS = false,
STATUS_TIMER = 10,
STDIN_TIMEOUT_ABORT = 120,
@ -669,44 +669,44 @@ typedef enum user_options_map
IDX_MARKOV_HCSTAT2 = 0xff23,
IDX_MARKOV_THRESHOLD = 't',
IDX_NONCE_ERROR_CORRECTIONS = 0xff24,
IDX_NVIDIA_SPIN_DAMP = 0xff25,
IDX_OPENCL_DEVICES = 'd',
IDX_OPENCL_DEVICE_TYPES = 'D',
IDX_OPENCL_INFO = 'I',
IDX_OPENCL_PLATFORMS = 0xff26,
IDX_OPENCL_VECTOR_WIDTH = 0xff27,
IDX_OPENCL_PLATFORMS = 0xff25,
IDX_OPENCL_VECTOR_WIDTH = 0xff26,
IDX_OPTIMIZED_KERNEL_ENABLE = 'O',
IDX_OUTFILE_AUTOHEX_DISABLE = 0xff28,
IDX_OUTFILE_CHECK_DIR = 0xff29,
IDX_OUTFILE_CHECK_TIMER = 0xff2a,
IDX_OUTFILE_FORMAT = 0xff2b,
IDX_OUTFILE_AUTOHEX_DISABLE = 0xff27,
IDX_OUTFILE_CHECK_DIR = 0xff28,
IDX_OUTFILE_CHECK_TIMER = 0xff29,
IDX_OUTFILE_FORMAT = 0xff2a,
IDX_OUTFILE = 'o',
IDX_POTFILE_DISABLE = 0xff2c,
IDX_POTFILE_PATH = 0xff2d,
IDX_PROGRESS_ONLY = 0xff2e,
IDX_QUIET = 0xff2f,
IDX_REMOVE = 0xff30,
IDX_REMOVE_TIMER = 0xff31,
IDX_RESTORE = 0xff32,
IDX_RESTORE_DISABLE = 0xff33,
IDX_RESTORE_FILE_PATH = 0xff34,
IDX_POTFILE_DISABLE = 0xff2b,
IDX_POTFILE_PATH = 0xff2c,
IDX_PROGRESS_ONLY = 0xff2d,
IDX_QUIET = 0xff2e,
IDX_REMOVE = 0xff2f,
IDX_REMOVE_TIMER = 0xff30,
IDX_RESTORE = 0xff31,
IDX_RESTORE_DISABLE = 0xff32,
IDX_RESTORE_FILE_PATH = 0xff33,
IDX_RP_FILE = 'r',
IDX_RP_GEN_FUNC_MAX = 0xff35,
IDX_RP_GEN_FUNC_MIN = 0xff36,
IDX_RP_GEN_FUNC_MAX = 0xff34,
IDX_RP_GEN_FUNC_MIN = 0xff35,
IDX_RP_GEN = 'g',
IDX_RP_GEN_SEED = 0xff37,
IDX_RP_GEN_SEED = 0xff36,
IDX_RULE_BUF_L = 'j',
IDX_RULE_BUF_R = 'k',
IDX_RUNTIME = 0xff38,
IDX_SCRYPT_TMTO = 0xff39,
IDX_RUNTIME = 0xff37,
IDX_SCRYPT_TMTO = 0xff38,
IDX_SEGMENT_SIZE = 'c',
IDX_SELF_TEST_DISABLE = 0xff3a,
IDX_SELF_TEST_DISABLE = 0xff39,
IDX_SEPARATOR = 'p',
IDX_SESSION = 0xff3b,
IDX_SHOW = 0xff3c,
IDX_SESSION = 0xff3a,
IDX_SHOW = 0xff3b,
IDX_SKIP = 's',
IDX_SLOW_CANDIDATES = 'S',
IDX_SPEED_ONLY = 0xff3d,
IDX_SPEED_ONLY = 0xff3c,
IDX_SPIN_DAMP = 0xff3d,
IDX_STATUS = 0xff3e,
IDX_STATUS_TIMER = 0xff3f,
IDX_STDOUT_FLAG = 0xff40,
@ -1209,7 +1209,7 @@ typedef struct hc_device_param
bool is_rocm;
double nvidia_spin_damp;
double spin_damp;
cl_platform_id platform;
@ -1692,7 +1692,7 @@ typedef struct user_options
bool kernel_loops_chgd;
bool kernel_threads_chgd;
bool nonce_error_corrections_chgd;
bool nvidia_spin_damp_chgd;
bool spin_damp_chgd;
bool opencl_vector_width_chgd;
bool outfile_format_chgd;
bool remove_timer_chgd;
@ -1796,7 +1796,7 @@ typedef struct user_options
u32 kernel_threads;
u32 markov_threshold;
u32 nonce_error_corrections;
u32 nvidia_spin_damp;
u32 spin_damp;
u32 opencl_vector_width;
u32 outfile_check_timer;
u32 outfile_format;

@ -21,6 +21,10 @@ static double try_run (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_par
const u32 kernel_power_try = device_param->hardware_power * kernel_accel;
float spin_damp_sav = device_param->spin_damp;
device_param->spin_damp = 0;
if (hashconfig->attack_exec == ATTACK_EXEC_INSIDE_KERNEL)
{
if (hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL)
@ -37,6 +41,8 @@ static double try_run (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_par
run_kernel (hashcat_ctx, device_param, KERN_RUN_2, kernel_power_try, true, 0);
}
device_param->spin_damp = spin_damp_sav;
const double exec_msec_prev = get_avg_exec_time (device_param, 1);
return exec_msec_prev;

@ -1706,26 +1706,54 @@ int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, con
if (CL_rc == -1) return -1;
if (device_param->nvidia_spin_damp > 0)
// spin damper section
const u32 iterationm = iteration % EXPECTED_ITERATIONS;
cl_int event_status;
size_t param_value_size_ret;
CL_rc = hc_clGetEventInfo (hashcat_ctx, event, CL_EVENT_COMMAND_EXECUTION_STATUS, sizeof (event_status), &event_status, &param_value_size_ret);
if (CL_rc == -1) return -1;
if (device_param->spin_damp > 0)
{
if (status_ctx->devices_status == STATUS_RUNNING)
double spin_total = device_param->spin_damp;
while (event_status != CL_COMPLETE)
{
if (iteration < EXPECTED_ITERATIONS)
if (status_ctx->devices_status == STATUS_RUNNING)
{
switch (kern_run)
{
case KERN_RUN_1: if (device_param->exec_us_prev1[iteration] > 0) usleep ((useconds_t)(device_param->exec_us_prev1[iteration] * device_param->nvidia_spin_damp)); break;
case KERN_RUN_2: if (device_param->exec_us_prev2[iteration] > 0) usleep ((useconds_t)(device_param->exec_us_prev2[iteration] * device_param->nvidia_spin_damp)); break;
case KERN_RUN_3: if (device_param->exec_us_prev3[iteration] > 0) usleep ((useconds_t)(device_param->exec_us_prev3[iteration] * device_param->nvidia_spin_damp)); break;
case KERN_RUN_4: if (device_param->exec_us_prev4[iteration] > 0) usleep ((useconds_t)(device_param->exec_us_prev4[iteration] * device_param->nvidia_spin_damp)); break;
case KERN_RUN_INIT2: if (device_param->exec_us_prev_init2[iteration] > 0) usleep ((useconds_t)(device_param->exec_us_prev_init2[iteration] * device_param->nvidia_spin_damp)); break;
case KERN_RUN_LOOP2: if (device_param->exec_us_prev_loop2[iteration] > 0) usleep ((useconds_t)(device_param->exec_us_prev_loop2[iteration] * device_param->nvidia_spin_damp)); break;
case KERN_RUN_AUX1: if (device_param->exec_us_prev_aux1[iteration] > 0) usleep ((useconds_t)(device_param->exec_us_prev_aux1[iteration] * device_param->nvidia_spin_damp)); break;
case KERN_RUN_AUX2: if (device_param->exec_us_prev_aux2[iteration] > 0) usleep ((useconds_t)(device_param->exec_us_prev_aux2[iteration] * device_param->nvidia_spin_damp)); break;
case KERN_RUN_AUX3: if (device_param->exec_us_prev_aux3[iteration] > 0) usleep ((useconds_t)(device_param->exec_us_prev_aux3[iteration] * device_param->nvidia_spin_damp)); break;
case KERN_RUN_AUX4: if (device_param->exec_us_prev_aux4[iteration] > 0) usleep ((useconds_t)(device_param->exec_us_prev_aux4[iteration] * device_param->nvidia_spin_damp)); break;
case KERN_RUN_1: if (device_param->exec_us_prev1[iterationm] > 0) usleep ((useconds_t) (device_param->exec_us_prev1[iterationm] * device_param->spin_damp)); break;
case KERN_RUN_2: if (device_param->exec_us_prev2[iterationm] > 0) usleep ((useconds_t) (device_param->exec_us_prev2[iterationm] * device_param->spin_damp)); break;
case KERN_RUN_3: if (device_param->exec_us_prev3[iterationm] > 0) usleep ((useconds_t) (device_param->exec_us_prev3[iterationm] * device_param->spin_damp)); break;
case KERN_RUN_4: if (device_param->exec_us_prev4[iterationm] > 0) usleep ((useconds_t) (device_param->exec_us_prev4[iterationm] * device_param->spin_damp)); break;
case KERN_RUN_INIT2: if (device_param->exec_us_prev_init2[iterationm] > 0) usleep ((useconds_t) (device_param->exec_us_prev_init2[iterationm] * device_param->spin_damp)); break;
case KERN_RUN_LOOP2: if (device_param->exec_us_prev_loop2[iterationm] > 0) usleep ((useconds_t) (device_param->exec_us_prev_loop2[iterationm] * device_param->spin_damp)); break;
case KERN_RUN_AUX1: if (device_param->exec_us_prev_aux1[iterationm] > 0) usleep ((useconds_t) (device_param->exec_us_prev_aux1[iterationm] * device_param->spin_damp)); break;
case KERN_RUN_AUX2: if (device_param->exec_us_prev_aux2[iterationm] > 0) usleep ((useconds_t) (device_param->exec_us_prev_aux2[iterationm] * device_param->spin_damp)); break;
case KERN_RUN_AUX3: if (device_param->exec_us_prev_aux3[iterationm] > 0) usleep ((useconds_t) (device_param->exec_us_prev_aux3[iterationm] * device_param->spin_damp)); break;
case KERN_RUN_AUX4: if (device_param->exec_us_prev_aux4[iterationm] > 0) usleep ((useconds_t) (device_param->exec_us_prev_aux4[iterationm] * device_param->spin_damp)); break;
}
}
else
{
// we were told to be nice
sleep (0);
}
CL_rc = hc_clGetEventInfo (hashcat_ctx, event, CL_EVENT_COMMAND_EXECUTION_STATUS, sizeof (event_status), &event_status, &param_value_size_ret);
if (CL_rc == -1) return -1;
spin_total += device_param->spin_damp;
if (spin_total > 1) break;
}
}
@ -1741,22 +1769,22 @@ int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, con
const double exec_us = (double) (time_end - time_start) / 1000;
if (status_ctx->devices_status == STATUS_RUNNING)
if (device_param->spin_damp > 0)
{
if (iteration < EXPECTED_ITERATIONS)
if (status_ctx->devices_status == STATUS_RUNNING)
{
switch (kern_run)
{
case KERN_RUN_1: device_param->exec_us_prev1[iteration] = exec_us; break;
case KERN_RUN_2: device_param->exec_us_prev2[iteration] = exec_us; break;
case KERN_RUN_3: device_param->exec_us_prev3[iteration] = exec_us; break;
case KERN_RUN_4: device_param->exec_us_prev4[iteration] = exec_us; break;
case KERN_RUN_INIT2: device_param->exec_us_prev_init2[iteration] = exec_us; break;
case KERN_RUN_LOOP2: device_param->exec_us_prev_loop2[iteration] = exec_us; break;
case KERN_RUN_AUX1: device_param->exec_us_prev_aux1[iteration] = exec_us; break;
case KERN_RUN_AUX2: device_param->exec_us_prev_aux2[iteration] = exec_us; break;
case KERN_RUN_AUX3: device_param->exec_us_prev_aux3[iteration] = exec_us; break;
case KERN_RUN_AUX4: device_param->exec_us_prev_aux4[iteration] = exec_us; break;
case KERN_RUN_1: device_param->exec_us_prev1[iterationm] = exec_us; break;
case KERN_RUN_2: device_param->exec_us_prev2[iterationm] = exec_us; break;
case KERN_RUN_3: device_param->exec_us_prev3[iterationm] = exec_us; break;
case KERN_RUN_4: device_param->exec_us_prev4[iterationm] = exec_us; break;
case KERN_RUN_INIT2: device_param->exec_us_prev_init2[iterationm] = exec_us; break;
case KERN_RUN_LOOP2: device_param->exec_us_prev_loop2[iterationm] = exec_us; break;
case KERN_RUN_AUX1: device_param->exec_us_prev_aux1[iterationm] = exec_us; break;
case KERN_RUN_AUX2: device_param->exec_us_prev_aux2[iterationm] = exec_us; break;
case KERN_RUN_AUX3: device_param->exec_us_prev_aux3[iterationm] = exec_us; break;
case KERN_RUN_AUX4: device_param->exec_us_prev_aux4[iterationm] = exec_us; break;
}
}
}
@ -3773,26 +3801,9 @@ int opencl_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime)
// CPU burning loop damper
// Value is given as number between 0-100
// By default 100%
device_param->nvidia_spin_damp = (double) user_options->nvidia_spin_damp;
if (user_options->nvidia_spin_damp_chgd == false)
{
if (user_options->attack_mode == ATTACK_MODE_STRAIGHT)
{
/**
* the workaround is not a friend of rule based attacks
* the words from the wordlist combined with fast and slow rules cause
* fluctuations which cause inaccurate wait time estimations
* using a reduced damping percentage almost compensates this
*/
device_param->nvidia_spin_damp = 64;
}
}
// By default 8%
device_param->nvidia_spin_damp /= 100;
device_param->spin_damp = (double) user_options->spin_damp / 100;
}
}

@ -74,7 +74,6 @@ static const struct option long_options[] =
{"markov-hcstat2", required_argument, NULL, IDX_MARKOV_HCSTAT2},
{"markov-threshold", required_argument, NULL, IDX_MARKOV_THRESHOLD},
{"nonce-error-corrections", required_argument, NULL, IDX_NONCE_ERROR_CORRECTIONS},
{"nvidia-spin-damp", required_argument, NULL, IDX_NVIDIA_SPIN_DAMP},
{"opencl-devices", required_argument, NULL, IDX_OPENCL_DEVICES},
{"opencl-device-types", required_argument, NULL, IDX_OPENCL_DEVICE_TYPES},
{"opencl-info", no_argument, NULL, IDX_OPENCL_INFO},
@ -109,6 +108,7 @@ static const struct option long_options[] =
{"skip", required_argument, NULL, IDX_SKIP},
{"slow-candidates", no_argument, NULL, IDX_SLOW_CANDIDATES},
{"speed-only", no_argument, NULL, IDX_SPEED_ONLY},
{"spin-damp", required_argument, NULL, IDX_SPIN_DAMP},
{"status", no_argument, NULL, IDX_STATUS},
{"status-timer", required_argument, NULL, IDX_STATUS_TIMER},
{"stdout", no_argument, NULL, IDX_STDOUT_FLAG},
@ -201,7 +201,6 @@ int user_options_init (hashcat_ctx_t *hashcat_ctx)
user_options->markov_hcstat2 = NULL;
user_options->markov_threshold = MARKOV_THRESHOLD;
user_options->nonce_error_corrections = NONCE_ERROR_CORRECTIONS;
user_options->nvidia_spin_damp = NVIDIA_SPIN_DAMP;
user_options->opencl_devices = NULL;
user_options->opencl_device_types = NULL;
user_options->opencl_info = OPENCL_INFO;
@ -239,6 +238,7 @@ int user_options_init (hashcat_ctx_t *hashcat_ctx)
user_options->skip = SKIP;
user_options->slow_candidates = SLOW_CANDIDATES;
user_options->speed_only = SPEED_ONLY;
user_options->spin_damp = SPIN_DAMP;
user_options->status = STATUS;
user_options->status_timer = STATUS_TIMER;
user_options->stdin_timeout_abort = STDIN_TIMEOUT_ABORT;
@ -309,7 +309,7 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
case IDX_KERNEL_ACCEL:
case IDX_KERNEL_LOOPS:
case IDX_KERNEL_THREADS:
case IDX_NVIDIA_SPIN_DAMP:
case IDX_SPIN_DAMP:
case IDX_HWMON_TEMP_ABORT:
case IDX_HCCAPX_MESSAGE_PAIR:
case IDX_NONCE_ERROR_CORRECTIONS:
@ -436,8 +436,8 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
user_options->kernel_loops_chgd = true; break;
case IDX_KERNEL_THREADS: user_options->kernel_threads = hc_strtoul (optarg, NULL, 10);
user_options->kernel_threads_chgd = true; break;
case IDX_NVIDIA_SPIN_DAMP: user_options->nvidia_spin_damp = hc_strtoul (optarg, NULL, 10);
user_options->nvidia_spin_damp_chgd = true; break;
case IDX_SPIN_DAMP: user_options->spin_damp = hc_strtoul (optarg, NULL, 10);
user_options->spin_damp_chgd = true; break;
case IDX_HWMON_DISABLE: user_options->hwmon_disable = true; break;
case IDX_HWMON_TEMP_ABORT: user_options->hwmon_temp_abort = hc_strtoul (optarg, NULL, 10); break;
case IDX_LOGFILE_DISABLE: user_options->logfile_disable = true; break;
@ -983,16 +983,16 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
}
}
if (user_options->nvidia_spin_damp > 100)
if (user_options->spin_damp > 100)
{
event_log_error (hashcat_ctx, "Values of --nvidia-spin-damp must be between 0 and 100 (inclusive).");
event_log_error (hashcat_ctx, "Values of --spin-damp must be between 0 and 100 (inclusive).");
return -1;
}
if ((user_options->nvidia_spin_damp_chgd == true) && (user_options->benchmark == true))
if ((user_options->spin_damp_chgd == true) && (user_options->benchmark == true))
{
event_log_error (hashcat_ctx, "Values of --nvidia-spin-damp cannot be used in combination with --benchmark.");
event_log_error (hashcat_ctx, "Values of --spin-damp cannot be used in combination with --benchmark.");
return -1;
}
@ -1443,7 +1443,7 @@ void user_options_preprocess (hashcat_ctx_t *hashcat_ctx)
user_options->hwmon_disable = true;
user_options->left = false;
user_options->logfile_disable = true;
user_options->nvidia_spin_damp = 0;
user_options->spin_damp = 0;
user_options->outfile_check_timer = 0;
user_options->potfile_disable = true;
user_options->restore_disable = true;
@ -1465,7 +1465,7 @@ void user_options_preprocess (hashcat_ctx_t *hashcat_ctx)
user_options->hwmon_disable = true;
user_options->left = false;
user_options->logfile_disable = true;
user_options->nvidia_spin_damp = 0;
user_options->spin_damp = 0;
user_options->outfile_check_timer = 0;
user_options->potfile_disable = true;
user_options->restore_disable = true;
@ -1488,7 +1488,7 @@ void user_options_preprocess (hashcat_ctx_t *hashcat_ctx)
user_options->increment = false;
user_options->left = false;
user_options->logfile_disable = true;
user_options->nvidia_spin_damp = 0;
user_options->spin_damp = 0;
user_options->potfile_disable = true;
user_options->progress_only = false;
user_options->restore_disable = true;
@ -2666,7 +2666,6 @@ void user_options_logger (hashcat_ctx_t *hashcat_ctx)
logfile_top_uint (user_options->markov_classic);
logfile_top_uint (user_options->markov_disable);
logfile_top_uint (user_options->markov_threshold);
logfile_top_uint (user_options->nvidia_spin_damp);
logfile_top_uint (user_options->opencl_info);
logfile_top_uint (user_options->opencl_vector_width);
logfile_top_uint (user_options->optimized_kernel_enable);
@ -2694,6 +2693,7 @@ void user_options_logger (hashcat_ctx_t *hashcat_ctx)
logfile_top_uint (user_options->slow_candidates);
logfile_top_uint (user_options->show);
logfile_top_uint (user_options->speed_only);
logfile_top_uint (user_options->spin_damp);
logfile_top_uint (user_options->status);
logfile_top_uint (user_options->status_timer);
logfile_top_uint (user_options->stdout_flag);

Loading…
Cancel
Save