1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 16:18:09 +00:00

Added new options --backend-ignore-cuda and --backend-ingore-opencl, to ignore CUDA and/or OpenCL interface from being load on startup

This commit is contained in:
Jens Steube 2020-01-03 11:51:24 +01:00
parent 469e13aa0b
commit d0fb171da9
6 changed files with 212 additions and 187 deletions

View File

@ -7,6 +7,7 @@
- Fully modularized hash-mode integration via plugin interface and conversion of all existing hash-modes - Fully modularized hash-mode integration via plugin interface and conversion of all existing hash-modes
- Refactor hashcat backend interface to allow adding compute API other than OpenCL - Refactor hashcat backend interface to allow adding compute API other than OpenCL
- Added CUDA as a new compute API to hashcat backend (enables hashcat to run on NVIDIA Jetson, IBM POWER9 w/ Nvidia V100, etc.) - Added CUDA as a new compute API to hashcat backend (enables hashcat to run on NVIDIA Jetson, IBM POWER9 w/ Nvidia V100, etc.)
- Added new options --backend-ignore-cuda and --backend-ingore-opencl, to ignore CUDA and/or OpenCL interface from being load on startup
- Support use of all available GPU memory using CUDA backend - Support use of all available GPU memory using CUDA backend
- Support use of all available CPU cores for hash-mode specific hooks - Support use of all available CPU cores for hash-mode specific hooks
- Support on-the-fly loading of compressed wordlists in zip and gzip format - Support on-the-fly loading of compressed wordlists in zip and gzip format

View File

@ -250,7 +250,7 @@ _hashcat ()
local BUILD_IN_CHARSETS='?l ?u ?d ?a ?b ?s ?h ?H' local BUILD_IN_CHARSETS='?l ?u ?d ?a ?b ?s ?h ?H'
local SHORT_OPTS="-m -a -V -h -b -t -T -o -p -c -d -D -w -n -u -j -k -r -g -1 -2 -3 -4 -i -I -s -l -O -S -z" local SHORT_OPTS="-m -a -V -h -b -t -T -o -p -c -d -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-json --status-timer --stdin-timeout-abort --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 --backend-info --backend-devices --opencl-device-types --backend-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 --hook-threads --increment --increment-min --increment-max --logfile-disable --scrypt-tmto --keyboard-layout-mapping --truecrypt-keyfiles --veracrypt-keyfiles --veracrypt-pim-start --veracrypt-pim-stop --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 LONG_OPTS="--hash-type --attack-mode --version --help --quiet --benchmark --benchmark-all --hex-salt --hex-wordlist --hex-charset --force --status --status-json --status-timer --stdin-timeout-abort --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 --backend-ignore-cuda --backend-ignore-opencl --backend-info --backend-devices --opencl-device-types --backend-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 --hook-threads --increment --increment-min --increment-max --logfile-disable --scrypt-tmto --keyboard-layout-mapping --truecrypt-keyfiles --veracrypt-keyfiles --veracrypt-pim-start --veracrypt-pim-stop --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 --stdin-timeout-abort --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 --backend-devices --opencl-device-types --backend-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 --hook-threads --increment-min --increment-max --scrypt-tmto --keyboard-layout-mapping --truecrypt-keyfiles --veracrypt-keyfiles --veracrypt-pim-start --veracrypt-pim-stop --hccapx-message-pair --nonce-error-corrections --encoding-from --encoding-to --brain-client-features --brain-host --brain-password --brain-port --brain-session --brain-session-whitelist" 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 --stdin-timeout-abort --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 --backend-devices --opencl-device-types --backend-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 --hook-threads --increment-min --increment-max --scrypt-tmto --keyboard-layout-mapping --truecrypt-keyfiles --veracrypt-keyfiles --veracrypt-pim-start --veracrypt-pim-stop --hccapx-message-pair --nonce-error-corrections --encoding-from --encoding-to --brain-client-features --brain-host --brain-password --brain-port --brain-session --brain-session-whitelist"
COMPREPLY=() COMPREPLY=()

View File

@ -604,6 +604,8 @@ typedef enum user_options_defaults
MARKOV_DISABLE = false, MARKOV_DISABLE = false,
MARKOV_THRESHOLD = 0, MARKOV_THRESHOLD = 0,
NONCE_ERROR_CORRECTIONS = 8, NONCE_ERROR_CORRECTIONS = 8,
BACKEND_IGNORE_CUDA = false,
BACKEND_IGNORE_OPENCL = false,
BACKEND_INFO = false, BACKEND_INFO = false,
BACKEND_VECTOR_WIDTH = 0, BACKEND_VECTOR_WIDTH = 0,
OPTIMIZED_KERNEL_ENABLE = false, OPTIMIZED_KERNEL_ENABLE = false,
@ -650,109 +652,111 @@ typedef enum user_options_map
IDX_ADVICE_DISABLE = 0xff00, IDX_ADVICE_DISABLE = 0xff00,
IDX_ATTACK_MODE = 'a', IDX_ATTACK_MODE = 'a',
IDX_BACKEND_DEVICES = 'd', IDX_BACKEND_DEVICES = 'd',
IDX_BACKEND_IGNORE_CUDA = 0xff01,
IDX_BACKEND_IGNORE_OPENCL = 0xff02,
IDX_BACKEND_INFO = 'I', IDX_BACKEND_INFO = 'I',
IDX_BACKEND_VECTOR_WIDTH = 0xff01, IDX_BACKEND_VECTOR_WIDTH = 0xff03,
IDX_BENCHMARK_ALL = 0xff02, IDX_BENCHMARK_ALL = 0xff04,
IDX_BENCHMARK = 'b', IDX_BENCHMARK = 'b',
IDX_BITMAP_MAX = 0xff03, IDX_BITMAP_MAX = 0xff05,
IDX_BITMAP_MIN = 0xff04, IDX_BITMAP_MIN = 0xff06,
#ifdef WITH_BRAIN #ifdef WITH_BRAIN
IDX_BRAIN_CLIENT = 'z', IDX_BRAIN_CLIENT = 'z',
IDX_BRAIN_CLIENT_FEATURES = 0xff05, IDX_BRAIN_CLIENT_FEATURES = 0xff07,
IDX_BRAIN_HOST = 0xff06, IDX_BRAIN_HOST = 0xff08,
IDX_BRAIN_PASSWORD = 0xff07, IDX_BRAIN_PASSWORD = 0xff09,
IDX_BRAIN_PORT = 0xff08, IDX_BRAIN_PORT = 0xff0a,
IDX_BRAIN_SERVER = 0xff09, IDX_BRAIN_SERVER = 0xff0b,
IDX_BRAIN_SESSION = 0xff0a, IDX_BRAIN_SESSION = 0xff0c,
IDX_BRAIN_SESSION_WHITELIST = 0xff0b, IDX_BRAIN_SESSION_WHITELIST = 0xff0d,
#endif #endif
IDX_CPU_AFFINITY = 0xff0c, IDX_CPU_AFFINITY = 0xff0e,
IDX_CUSTOM_CHARSET_1 = '1', IDX_CUSTOM_CHARSET_1 = '1',
IDX_CUSTOM_CHARSET_2 = '2', IDX_CUSTOM_CHARSET_2 = '2',
IDX_CUSTOM_CHARSET_3 = '3', IDX_CUSTOM_CHARSET_3 = '3',
IDX_CUSTOM_CHARSET_4 = '4', IDX_CUSTOM_CHARSET_4 = '4',
IDX_DEBUG_FILE = 0xff0d, IDX_DEBUG_FILE = 0xff0f,
IDX_DEBUG_MODE = 0xff0e, IDX_DEBUG_MODE = 0xff10,
IDX_ENCODING_FROM = 0xff0f, IDX_ENCODING_FROM = 0xff11,
IDX_ENCODING_TO = 0xff10, IDX_ENCODING_TO = 0xff12,
IDX_EXAMPLE_HASHES = 0xff11, IDX_EXAMPLE_HASHES = 0xff13,
IDX_FORCE = 0xff12, IDX_FORCE = 0xff14,
IDX_HWMON_DISABLE = 0xff13, IDX_HWMON_DISABLE = 0xff15,
IDX_HWMON_TEMP_ABORT = 0xff14, IDX_HWMON_TEMP_ABORT = 0xff16,
IDX_HASH_MODE = 'm', IDX_HASH_MODE = 'm',
IDX_HCCAPX_MESSAGE_PAIR = 0xff15, IDX_HCCAPX_MESSAGE_PAIR = 0xff17,
IDX_HELP = 'h', IDX_HELP = 'h',
IDX_HEX_CHARSET = 0xff16, IDX_HEX_CHARSET = 0xff18,
IDX_HEX_SALT = 0xff17, IDX_HEX_SALT = 0xff19,
IDX_HEX_WORDLIST = 0xff18, IDX_HEX_WORDLIST = 0xff1a,
IDX_HOOK_THREADS = 0xff19, IDX_HOOK_THREADS = 0xff1b,
IDX_INCREMENT = 'i', IDX_INCREMENT = 'i',
IDX_INCREMENT_MAX = 0xff1a, IDX_INCREMENT_MAX = 0xff1c,
IDX_INCREMENT_MIN = 0xff1b, IDX_INCREMENT_MIN = 0xff1d,
IDX_INDUCTION_DIR = 0xff1c, IDX_INDUCTION_DIR = 0xff1e,
IDX_KEEP_GUESSING = 0xff1d, IDX_KEEP_GUESSING = 0xff1f,
IDX_KERNEL_ACCEL = 'n', IDX_KERNEL_ACCEL = 'n',
IDX_KERNEL_LOOPS = 'u', IDX_KERNEL_LOOPS = 'u',
IDX_KERNEL_THREADS = 'T', IDX_KERNEL_THREADS = 'T',
IDX_KEYBOARD_LAYOUT_MAPPING = 0xff1e, IDX_KEYBOARD_LAYOUT_MAPPING = 0xff20,
IDX_KEYSPACE = 0xff1f, IDX_KEYSPACE = 0xff21,
IDX_LEFT = 0xff20, IDX_LEFT = 0xff22,
IDX_LIMIT = 'l', IDX_LIMIT = 'l',
IDX_LOGFILE_DISABLE = 0xff21, IDX_LOGFILE_DISABLE = 0xff23,
IDX_LOOPBACK = 0xff22, IDX_LOOPBACK = 0xff24,
IDX_MACHINE_READABLE = 0xff23, IDX_MACHINE_READABLE = 0xff25,
IDX_MARKOV_CLASSIC = 0xff24, IDX_MARKOV_CLASSIC = 0xff26,
IDX_MARKOV_DISABLE = 0xff25, IDX_MARKOV_DISABLE = 0xff27,
IDX_MARKOV_HCSTAT2 = 0xff26, IDX_MARKOV_HCSTAT2 = 0xff28,
IDX_MARKOV_THRESHOLD = 't', IDX_MARKOV_THRESHOLD = 't',
IDX_NONCE_ERROR_CORRECTIONS = 0xff27, IDX_NONCE_ERROR_CORRECTIONS = 0xff29,
IDX_OPENCL_DEVICE_TYPES = 'D', IDX_OPENCL_DEVICE_TYPES = 'D',
IDX_OPTIMIZED_KERNEL_ENABLE = 'O', IDX_OPTIMIZED_KERNEL_ENABLE = 'O',
IDX_OUTFILE_AUTOHEX_DISABLE = 0xff28, IDX_OUTFILE_AUTOHEX_DISABLE = 0xff2a,
IDX_OUTFILE_CHECK_DIR = 0xff29, IDX_OUTFILE_CHECK_DIR = 0xff2b,
IDX_OUTFILE_CHECK_TIMER = 0xff2a, IDX_OUTFILE_CHECK_TIMER = 0xff2c,
IDX_OUTFILE_FORMAT = 0xff2b, IDX_OUTFILE_FORMAT = 0xff2d,
IDX_OUTFILE = 'o', IDX_OUTFILE = 'o',
IDX_POTFILE_DISABLE = 0xff2c, IDX_POTFILE_DISABLE = 0xff2e,
IDX_POTFILE_PATH = 0xff2d, IDX_POTFILE_PATH = 0xff2f,
IDX_PROGRESS_ONLY = 0xff2e, IDX_PROGRESS_ONLY = 0xff30,
IDX_QUIET = 0xff2f, IDX_QUIET = 0xff31,
IDX_REMOVE = 0xff30, IDX_REMOVE = 0xff32,
IDX_REMOVE_TIMER = 0xff31, IDX_REMOVE_TIMER = 0xff33,
IDX_RESTORE = 0xff32, IDX_RESTORE = 0xff34,
IDX_RESTORE_DISABLE = 0xff33, IDX_RESTORE_DISABLE = 0xff35,
IDX_RESTORE_FILE_PATH = 0xff34, IDX_RESTORE_FILE_PATH = 0xff36,
IDX_RP_FILE = 'r', IDX_RP_FILE = 'r',
IDX_RP_GEN_FUNC_MAX = 0xff35, IDX_RP_GEN_FUNC_MAX = 0xff37,
IDX_RP_GEN_FUNC_MIN = 0xff36, IDX_RP_GEN_FUNC_MIN = 0xff38,
IDX_RP_GEN = 'g', IDX_RP_GEN = 'g',
IDX_RP_GEN_SEED = 0xff37, IDX_RP_GEN_SEED = 0xff39,
IDX_RULE_BUF_L = 'j', IDX_RULE_BUF_L = 'j',
IDX_RULE_BUF_R = 'k', IDX_RULE_BUF_R = 'k',
IDX_RUNTIME = 0xff38, IDX_RUNTIME = 0xff3a,
IDX_SCRYPT_TMTO = 0xff39, IDX_SCRYPT_TMTO = 0xff3b,
IDX_SEGMENT_SIZE = 'c', IDX_SEGMENT_SIZE = 'c',
IDX_SELF_TEST_DISABLE = 0xff3a, IDX_SELF_TEST_DISABLE = 0xff3c,
IDX_SEPARATOR = 'p', IDX_SEPARATOR = 'p',
IDX_SESSION = 0xff3b, IDX_SESSION = 0xff3d,
IDX_SHOW = 0xff3c, IDX_SHOW = 0xff3e,
IDX_SKIP = 's', IDX_SKIP = 's',
IDX_SLOW_CANDIDATES = 'S', IDX_SLOW_CANDIDATES = 'S',
IDX_SPEED_ONLY = 0xff3d, IDX_SPEED_ONLY = 0xff3f,
IDX_SPIN_DAMP = 0xff3e, IDX_SPIN_DAMP = 0xff40,
IDX_STATUS = 0xff3f, IDX_STATUS = 0xff41,
IDX_STATUS_JSON = 0xff40, IDX_STATUS_JSON = 0xff42,
IDX_STATUS_TIMER = 0xff41, IDX_STATUS_TIMER = 0xff43,
IDX_STDOUT_FLAG = 0xff42, IDX_STDOUT_FLAG = 0xff44,
IDX_STDIN_TIMEOUT_ABORT = 0xff43, IDX_STDIN_TIMEOUT_ABORT = 0xff45,
IDX_TRUECRYPT_KEYFILES = 0xff44, IDX_TRUECRYPT_KEYFILES = 0xff46,
IDX_USERNAME = 0xff45, IDX_USERNAME = 0xff47,
IDX_VERACRYPT_KEYFILES = 0xff46, IDX_VERACRYPT_KEYFILES = 0xff48,
IDX_VERACRYPT_PIM_START = 0xff47, IDX_VERACRYPT_PIM_START = 0xff49,
IDX_VERACRYPT_PIM_STOP = 0xff48, IDX_VERACRYPT_PIM_STOP = 0xff4a,
IDX_VERSION_LOWER = 'v', IDX_VERSION_LOWER = 'v',
IDX_VERSION = 'V', IDX_VERSION = 'V',
IDX_WORDLIST_AUTOHEX_DISABLE = 0xff49, IDX_WORDLIST_AUTOHEX_DISABLE = 0xff4b,
IDX_WORKLOAD_PROFILE = 'w', IDX_WORKLOAD_PROFILE = 'w',
} user_options_map_t; } user_options_map_t;
@ -1875,6 +1879,8 @@ typedef struct user_options
bool machine_readable; bool machine_readable;
bool markov_classic; bool markov_classic;
bool markov_disable; bool markov_disable;
bool backend_ignore_cuda;
bool backend_ignore_opencl;
bool backend_info; bool backend_info;
bool optimized_kernel_enable; bool optimized_kernel_enable;
bool outfile_autohex; bool outfile_autohex;

View File

@ -4743,11 +4743,15 @@ int backend_ctx_init (hashcat_ctx_t *hashcat_ctx)
* Load and map CUDA library calls, then init CUDA * Load and map CUDA library calls, then init CUDA
*/ */
int rc_cuda_init = -1;
if (user_options->backend_ignore_cuda == false)
{
CUDA_PTR *cuda = (CUDA_PTR *) hcmalloc (sizeof (CUDA_PTR)); CUDA_PTR *cuda = (CUDA_PTR *) hcmalloc (sizeof (CUDA_PTR));
backend_ctx->cuda = cuda; backend_ctx->cuda = cuda;
int rc_cuda_init = cuda_init (hashcat_ctx); rc_cuda_init = cuda_init (hashcat_ctx);
if (rc_cuda_init == -1) if (rc_cuda_init == -1)
{ {
@ -4814,16 +4818,21 @@ int backend_ctx_init (hashcat_ctx_t *hashcat_ctx)
cuda_close (hashcat_ctx); cuda_close (hashcat_ctx);
nvrtc_close (hashcat_ctx); nvrtc_close (hashcat_ctx);
} }
}
/** /**
* Load and map OpenCL library calls * Load and map OpenCL library calls
*/ */
int rc_ocl_init = -1;
if (user_options->backend_ignore_opencl == false)
{
OCL_PTR *ocl = (OCL_PTR *) hcmalloc (sizeof (OCL_PTR)); OCL_PTR *ocl = (OCL_PTR *) hcmalloc (sizeof (OCL_PTR));
backend_ctx->ocl = ocl; backend_ctx->ocl = ocl;
const int rc_ocl_init = ocl_init (hashcat_ctx); rc_ocl_init = ocl_init (hashcat_ctx);
if (rc_ocl_init == -1) if (rc_ocl_init == -1)
{ {
@ -4873,6 +4882,7 @@ int backend_ctx_init (hashcat_ctx_t *hashcat_ctx)
*/ */
if (ocl_check_dri (hashcat_ctx) == -1) return -1; if (ocl_check_dri (hashcat_ctx) == -1) return -1;
}
/** /**
* Backend device selection * Backend device selection

View File

@ -90,6 +90,8 @@ static const char *const USAGE_BIG_PRE_HASHMODES[] =
" --cpu-affinity | Str | Locks to CPU devices, separated with commas | --cpu-affinity=1,2,3", " --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", " --hook-threads | Num | Sets number of threads for a hook (per compute unit) | --hook-threads=8",
" --example-hashes | | Show an example hash 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 |",
" -I, --backend-info | | Show info about detected backend API devices | -I", " -I, --backend-info | | Show info about detected backend API devices | -I",
" -d, --backend-devices | Str | Backend devices to use, separated with commas | -d 1", " -d, --backend-devices | Str | Backend devices to use, separated with commas | -d 1",
" -D, --opencl-device-types | Str | OpenCL device-types to use, separated with commas | -D 1", " -D, --opencl-device-types | Str | OpenCL device-types to use, separated with commas | -D 1",

View File

@ -29,6 +29,8 @@ static const struct option long_options[] =
{"advice-disable", no_argument, NULL, IDX_ADVICE_DISABLE}, {"advice-disable", no_argument, NULL, IDX_ADVICE_DISABLE},
{"attack-mode", required_argument, NULL, IDX_ATTACK_MODE}, {"attack-mode", required_argument, NULL, IDX_ATTACK_MODE},
{"backend-devices", required_argument, NULL, IDX_BACKEND_DEVICES}, {"backend-devices", required_argument, NULL, IDX_BACKEND_DEVICES},
{"backend-ignore-cuda", no_argument, NULL, IDX_BACKEND_IGNORE_CUDA},
{"backend-ignore-opencl", no_argument, NULL, IDX_BACKEND_IGNORE_OPENCL},
{"backend-info", no_argument, NULL, IDX_BACKEND_INFO}, {"backend-info", no_argument, NULL, IDX_BACKEND_INFO},
{"backend-vector-width", required_argument, NULL, IDX_BACKEND_VECTOR_WIDTH}, {"backend-vector-width", required_argument, NULL, IDX_BACKEND_VECTOR_WIDTH},
{"benchmark-all", no_argument, NULL, IDX_BENCHMARK_ALL}, {"benchmark-all", no_argument, NULL, IDX_BENCHMARK_ALL},
@ -153,6 +155,8 @@ int user_options_init (hashcat_ctx_t *hashcat_ctx)
user_options->advice_disable = ADVICE_DISABLE; user_options->advice_disable = ADVICE_DISABLE;
user_options->attack_mode = ATTACK_MODE; user_options->attack_mode = ATTACK_MODE;
user_options->backend_devices = NULL; user_options->backend_devices = NULL;
user_options->backend_ignore_cuda = BACKEND_IGNORE_CUDA;
user_options->backend_ignore_opencl = BACKEND_IGNORE_OPENCL;
user_options->backend_info = BACKEND_INFO; user_options->backend_info = BACKEND_INFO;
user_options->backend_vector_width = BACKEND_VECTOR_WIDTH; user_options->backend_vector_width = BACKEND_VECTOR_WIDTH;
user_options->benchmark_all = BENCHMARK_ALL; user_options->benchmark_all = BENCHMARK_ALL;
@ -426,6 +430,8 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
case IDX_HEX_SALT: user_options->hex_salt = true; break; case IDX_HEX_SALT: user_options->hex_salt = true; break;
case IDX_HEX_WORDLIST: user_options->hex_wordlist = true; break; case IDX_HEX_WORDLIST: user_options->hex_wordlist = true; break;
case IDX_CPU_AFFINITY: user_options->cpu_affinity = optarg; break; case IDX_CPU_AFFINITY: user_options->cpu_affinity = optarg; break;
case IDX_BACKEND_IGNORE_CUDA: user_options->backend_ignore_cuda = true; break;
case IDX_BACKEND_IGNORE_OPENCL: user_options->backend_ignore_opencl = true; break;
case IDX_BACKEND_INFO: user_options->backend_info = true; break; case IDX_BACKEND_INFO: user_options->backend_info = true; break;
case IDX_BACKEND_DEVICES: user_options->backend_devices = optarg; break; case IDX_BACKEND_DEVICES: user_options->backend_devices = optarg; break;
case IDX_BACKEND_VECTOR_WIDTH: user_options->backend_vector_width = hc_strtoul (optarg, NULL, 10); case IDX_BACKEND_VECTOR_WIDTH: user_options->backend_vector_width = hc_strtoul (optarg, NULL, 10);