mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-26 18:08:20 +00:00
Finish conversion to strtol family
This commit is contained in:
parent
ea5425b344
commit
b3adf1dc30
@ -322,11 +322,11 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
|
|||||||
case IDX_ADVICE_DISABLE: user_options->advice_disable = true; break;
|
case IDX_ADVICE_DISABLE: user_options->advice_disable = true; break;
|
||||||
case IDX_USERNAME: user_options->username = true; break;
|
case IDX_USERNAME: user_options->username = true; break;
|
||||||
case IDX_REMOVE: user_options->remove = true; break;
|
case IDX_REMOVE: user_options->remove = true; break;
|
||||||
case IDX_REMOVE_TIMER: user_options->remove_timer = atoi (optarg);
|
case IDX_REMOVE_TIMER: user_options->remove_timer = strtoul (optarg, NULL, 10);
|
||||||
user_options->remove_timer_chgd = true; break;
|
user_options->remove_timer_chgd = true; break;
|
||||||
case IDX_POTFILE_DISABLE: user_options->potfile_disable = true; break;
|
case IDX_POTFILE_DISABLE: user_options->potfile_disable = true; break;
|
||||||
case IDX_POTFILE_PATH: user_options->potfile_path = optarg; break;
|
case IDX_POTFILE_PATH: user_options->potfile_path = optarg; break;
|
||||||
case IDX_DEBUG_MODE: user_options->debug_mode = atoi (optarg); break;
|
case IDX_DEBUG_MODE: user_options->debug_mode = strtoul (optarg, NULL, 10); break;
|
||||||
case IDX_DEBUG_FILE: user_options->debug_file = optarg; break;
|
case IDX_DEBUG_FILE: user_options->debug_file = optarg; break;
|
||||||
case IDX_ENCODING_FROM: user_options->encoding_from = optarg; break;
|
case IDX_ENCODING_FROM: user_options->encoding_from = optarg; break;
|
||||||
case IDX_ENCODING_TO: user_options->encoding_to = optarg; break;
|
case IDX_ENCODING_TO: user_options->encoding_to = optarg; break;
|
||||||
@ -335,8 +335,8 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
|
|||||||
case IDX_EXAMPLE_HASHES: user_options->example_hashes = true; break;
|
case IDX_EXAMPLE_HASHES: user_options->example_hashes = true; break;
|
||||||
case IDX_FORCE: user_options->force = true; break;
|
case IDX_FORCE: user_options->force = true; break;
|
||||||
case IDX_SELF_TEST_DISABLE: user_options->self_test_disable = true; break;
|
case IDX_SELF_TEST_DISABLE: user_options->self_test_disable = true; break;
|
||||||
case IDX_SKIP: user_options->skip = atoll (optarg); break;
|
case IDX_SKIP: user_options->skip = strtoull (optarg, NULL, 10); break;
|
||||||
case IDX_LIMIT: user_options->limit = atoll (optarg); break;
|
case IDX_LIMIT: user_options->limit = strtoull (optarg, NULL, 10); break;
|
||||||
case IDX_KEEP_GUESSING: user_options->keep_guessing = true; break;
|
case IDX_KEEP_GUESSING: user_options->keep_guessing = true; break;
|
||||||
case IDX_KEYSPACE: user_options->keyspace = true; break;
|
case IDX_KEYSPACE: user_options->keyspace = true; break;
|
||||||
case IDX_BENCHMARK: user_options->benchmark = true; break;
|
case IDX_BENCHMARK: user_options->benchmark = true; break;
|
||||||
@ -346,34 +346,33 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
|
|||||||
case IDX_RESTORE_DISABLE: user_options->restore_disable = true; break;
|
case IDX_RESTORE_DISABLE: user_options->restore_disable = true; break;
|
||||||
case IDX_RESTORE_FILE_PATH: user_options->restore_file_path = optarg; break;
|
case IDX_RESTORE_FILE_PATH: user_options->restore_file_path = optarg; break;
|
||||||
case IDX_STATUS: user_options->status = true; break;
|
case IDX_STATUS: user_options->status = true; break;
|
||||||
case IDX_STATUS_TIMER: user_options->status_timer = atoi (optarg); break;
|
case IDX_STATUS_TIMER: user_options->status_timer = strtoul (optarg, NULL, 10); break;
|
||||||
case IDX_MACHINE_READABLE: user_options->machine_readable = true; break;
|
case IDX_MACHINE_READABLE: user_options->machine_readable = true; break;
|
||||||
case IDX_LOOPBACK: user_options->loopback = true; break;
|
case IDX_LOOPBACK: user_options->loopback = true; break;
|
||||||
case IDX_SESSION: user_options->session = optarg; break;
|
case IDX_SESSION: user_options->session = optarg; break;
|
||||||
case IDX_HASH_MODE: user_options->hash_mode = atoi (optarg);
|
case IDX_HASH_MODE: user_options->hash_mode = strtoul (optarg, NULL, 10);
|
||||||
user_options->hash_mode_chgd = true; break;
|
user_options->hash_mode_chgd = true; break;
|
||||||
case IDX_RUNTIME: user_options->runtime = atoi (optarg);
|
case IDX_RUNTIME: user_options->runtime = strtoul (optarg, NULL, 10);
|
||||||
user_options->runtime_chgd = true; break;
|
user_options->runtime_chgd = true; break;
|
||||||
case IDX_ATTACK_MODE: user_options->attack_mode = atoi (optarg);
|
case IDX_ATTACK_MODE: user_options->attack_mode = strtoul (optarg, NULL, 10);
|
||||||
user_options->attack_mode_chgd = true; break;
|
user_options->attack_mode_chgd = true; break;
|
||||||
case IDX_RP_FILE: user_options->rp_files[user_options->rp_files_cnt++]
|
case IDX_RP_FILE: user_options->rp_files[user_options->rp_files_cnt++] = optarg; break;
|
||||||
= optarg; break;
|
case IDX_RP_GEN: user_options->rp_gen = strtoul (optarg, NULL, 10); break;
|
||||||
case IDX_RP_GEN: user_options->rp_gen = atoi (optarg); break;
|
case IDX_RP_GEN_FUNC_MIN: user_options->rp_gen_func_min = strtoul (optarg, NULL, 10); break;
|
||||||
case IDX_RP_GEN_FUNC_MIN: user_options->rp_gen_func_min = atoi (optarg); break;
|
case IDX_RP_GEN_FUNC_MAX: user_options->rp_gen_func_max = strtoul (optarg, NULL, 10); break;
|
||||||
case IDX_RP_GEN_FUNC_MAX: user_options->rp_gen_func_max = atoi (optarg); break;
|
case IDX_RP_GEN_SEED: user_options->rp_gen_seed = strtoul (optarg, NULL, 10);
|
||||||
case IDX_RP_GEN_SEED: user_options->rp_gen_seed = atoi (optarg);
|
|
||||||
user_options->rp_gen_seed_chgd = true; break;
|
user_options->rp_gen_seed_chgd = true; break;
|
||||||
case IDX_RULE_BUF_L: user_options->rule_buf_l = optarg; break;
|
case IDX_RULE_BUF_L: user_options->rule_buf_l = optarg; break;
|
||||||
case IDX_RULE_BUF_R: user_options->rule_buf_r = optarg; break;
|
case IDX_RULE_BUF_R: user_options->rule_buf_r = optarg; break;
|
||||||
case IDX_MARKOV_DISABLE: user_options->markov_disable = true; break;
|
case IDX_MARKOV_DISABLE: user_options->markov_disable = true; break;
|
||||||
case IDX_MARKOV_CLASSIC: user_options->markov_classic = true; break;
|
case IDX_MARKOV_CLASSIC: user_options->markov_classic = true; break;
|
||||||
case IDX_MARKOV_THRESHOLD: user_options->markov_threshold = atoi (optarg); break;
|
case IDX_MARKOV_THRESHOLD: user_options->markov_threshold = strtoul (optarg, NULL, 10); break;
|
||||||
case IDX_MARKOV_HCSTAT: user_options->markov_hcstat = optarg; break;
|
case IDX_MARKOV_HCSTAT: user_options->markov_hcstat = optarg; break;
|
||||||
case IDX_OUTFILE: user_options->outfile = optarg; break;
|
case IDX_OUTFILE: user_options->outfile = optarg; break;
|
||||||
case IDX_OUTFILE_FORMAT: user_options->outfile_format = atoi (optarg);
|
case IDX_OUTFILE_FORMAT: user_options->outfile_format = strtoul (optarg, NULL, 10);
|
||||||
user_options->outfile_format_chgd = true; break;
|
user_options->outfile_format_chgd = true; break;
|
||||||
case IDX_OUTFILE_AUTOHEX_DISABLE: user_options->outfile_autohex = false; break;
|
case IDX_OUTFILE_AUTOHEX_DISABLE: user_options->outfile_autohex = false; break;
|
||||||
case IDX_OUTFILE_CHECK_TIMER: user_options->outfile_check_timer = atoi (optarg); break;
|
case IDX_OUTFILE_CHECK_TIMER: user_options->outfile_check_timer = strtoul (optarg, NULL, 10); break;
|
||||||
case IDX_WORDLIST_AUTOHEX_DISABLE: user_options->wordlist_autohex_disable = true; break;
|
case IDX_WORDLIST_AUTOHEX_DISABLE: user_options->wordlist_autohex_disable = true; break;
|
||||||
case IDX_HEX_CHARSET: user_options->hex_charset = true; break;
|
case IDX_HEX_CHARSET: user_options->hex_charset = true; break;
|
||||||
case IDX_HEX_SALT: user_options->hex_salt = true; break;
|
case IDX_HEX_SALT: user_options->hex_salt = true; break;
|
||||||
@ -383,38 +382,38 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
|
|||||||
case IDX_OPENCL_DEVICES: user_options->opencl_devices = optarg; break;
|
case IDX_OPENCL_DEVICES: user_options->opencl_devices = optarg; break;
|
||||||
case IDX_OPENCL_PLATFORMS: user_options->opencl_platforms = optarg; break;
|
case IDX_OPENCL_PLATFORMS: user_options->opencl_platforms = optarg; break;
|
||||||
case IDX_OPENCL_DEVICE_TYPES: user_options->opencl_device_types = optarg; break;
|
case IDX_OPENCL_DEVICE_TYPES: user_options->opencl_device_types = optarg; break;
|
||||||
case IDX_OPENCL_VECTOR_WIDTH: user_options->opencl_vector_width = atoi (optarg);
|
case IDX_OPENCL_VECTOR_WIDTH: user_options->opencl_vector_width = strtoul (optarg, NULL, 10);
|
||||||
user_options->opencl_vector_width_chgd = true; break;
|
user_options->opencl_vector_width_chgd = true; break;
|
||||||
case IDX_OPTIMIZED_KERNEL_ENABLE: user_options->optimized_kernel_enable = true; break;
|
case IDX_OPTIMIZED_KERNEL_ENABLE: user_options->optimized_kernel_enable = true; break;
|
||||||
case IDX_WORKLOAD_PROFILE: user_options->workload_profile = atoi (optarg);
|
case IDX_WORKLOAD_PROFILE: user_options->workload_profile = strtoul (optarg, NULL, 10);
|
||||||
user_options->workload_profile_chgd = true; break;
|
user_options->workload_profile_chgd = true; break;
|
||||||
case IDX_KERNEL_ACCEL: user_options->kernel_accel = atoi (optarg);
|
case IDX_KERNEL_ACCEL: user_options->kernel_accel = strtoul (optarg, NULL, 10);
|
||||||
user_options->kernel_accel_chgd = true; break;
|
user_options->kernel_accel_chgd = true; break;
|
||||||
case IDX_KERNEL_LOOPS: user_options->kernel_loops = atoi (optarg);
|
case IDX_KERNEL_LOOPS: user_options->kernel_loops = strtoul (optarg, NULL, 10);
|
||||||
user_options->kernel_loops_chgd = true; break;
|
user_options->kernel_loops_chgd = true; break;
|
||||||
case IDX_NVIDIA_SPIN_DAMP: user_options->nvidia_spin_damp = atoi (optarg);
|
case IDX_NVIDIA_SPIN_DAMP: user_options->nvidia_spin_damp = strtoul (optarg, NULL, 10);
|
||||||
user_options->nvidia_spin_damp_chgd = true; break;
|
user_options->nvidia_spin_damp_chgd = true; break;
|
||||||
case IDX_GPU_TEMP_DISABLE: user_options->gpu_temp_disable = true; break;
|
case IDX_GPU_TEMP_DISABLE: user_options->gpu_temp_disable = true; break;
|
||||||
case IDX_GPU_TEMP_ABORT: user_options->gpu_temp_abort = atoi (optarg); break;
|
case IDX_GPU_TEMP_ABORT: user_options->gpu_temp_abort = strtoul (optarg, NULL, 10); break;
|
||||||
case IDX_GPU_TEMP_RETAIN: user_options->gpu_temp_retain = atoi (optarg); break;
|
case IDX_GPU_TEMP_RETAIN: user_options->gpu_temp_retain = strtoul (optarg, NULL, 10); break;
|
||||||
case IDX_POWERTUNE_ENABLE: user_options->powertune_enable = true; break;
|
case IDX_POWERTUNE_ENABLE: user_options->powertune_enable = true; break;
|
||||||
case IDX_LOGFILE_DISABLE: user_options->logfile_disable = true; break;
|
case IDX_LOGFILE_DISABLE: user_options->logfile_disable = true; break;
|
||||||
case IDX_HCCAPX_MESSAGE_PAIR: user_options->hccapx_message_pair = atoi (optarg);
|
case IDX_HCCAPX_MESSAGE_PAIR: user_options->hccapx_message_pair = strtoul (optarg, NULL, 10);
|
||||||
user_options->hccapx_message_pair_chgd = true; break;
|
user_options->hccapx_message_pair_chgd = true; break;
|
||||||
case IDX_NONCE_ERROR_CORRECTIONS: user_options->nonce_error_corrections = atoi (optarg); break;
|
case IDX_NONCE_ERROR_CORRECTIONS: user_options->nonce_error_corrections = strtoul (optarg, NULL, 10); break;
|
||||||
case IDX_TRUECRYPT_KEYFILES: user_options->truecrypt_keyfiles = optarg; break;
|
case IDX_TRUECRYPT_KEYFILES: user_options->truecrypt_keyfiles = optarg; break;
|
||||||
case IDX_VERACRYPT_KEYFILES: user_options->veracrypt_keyfiles = optarg; break;
|
case IDX_VERACRYPT_KEYFILES: user_options->veracrypt_keyfiles = optarg; break;
|
||||||
case IDX_VERACRYPT_PIM: user_options->veracrypt_pim = atoi (optarg); break;
|
case IDX_VERACRYPT_PIM: user_options->veracrypt_pim = strtoul (optarg, NULL, 10); break;
|
||||||
case IDX_SEGMENT_SIZE: user_options->segment_size = atoi (optarg);
|
case IDX_SEGMENT_SIZE: user_options->segment_size = strtoul (optarg, NULL, 10);
|
||||||
user_options->segment_size_chgd = true; break;
|
user_options->segment_size_chgd = true; break;
|
||||||
case IDX_SCRYPT_TMTO: user_options->scrypt_tmto = atoi (optarg); break;
|
case IDX_SCRYPT_TMTO: user_options->scrypt_tmto = strtoul (optarg, NULL, 10); break;
|
||||||
case IDX_SEPARATOR: user_options->separator = optarg[0]; break;
|
case IDX_SEPARATOR: user_options->separator = optarg[0]; break;
|
||||||
case IDX_BITMAP_MIN: user_options->bitmap_min = atoi (optarg); break;
|
case IDX_BITMAP_MIN: user_options->bitmap_min = strtoul (optarg, NULL, 10); break;
|
||||||
case IDX_BITMAP_MAX: user_options->bitmap_max = atoi (optarg); break;
|
case IDX_BITMAP_MAX: user_options->bitmap_max = strtoul (optarg, NULL, 10); break;
|
||||||
case IDX_INCREMENT: user_options->increment = true; break;
|
case IDX_INCREMENT: user_options->increment = true; break;
|
||||||
case IDX_INCREMENT_MIN: user_options->increment_min = atoi (optarg);
|
case IDX_INCREMENT_MIN: user_options->increment_min = strtoul (optarg, NULL, 10);
|
||||||
user_options->increment_min_chgd = true; break;
|
user_options->increment_min_chgd = true; break;
|
||||||
case IDX_INCREMENT_MAX: user_options->increment_max = atoi (optarg);
|
case IDX_INCREMENT_MAX: user_options->increment_max = strtoul (optarg, NULL, 10);
|
||||||
user_options->increment_max_chgd = true; break;
|
user_options->increment_max_chgd = true; break;
|
||||||
case IDX_CUSTOM_CHARSET_1: user_options->custom_charset_1 = optarg; break;
|
case IDX_CUSTOM_CHARSET_1: user_options->custom_charset_1 = optarg; break;
|
||||||
case IDX_CUSTOM_CHARSET_2: user_options->custom_charset_2 = optarg; break;
|
case IDX_CUSTOM_CHARSET_2: user_options->custom_charset_2 = optarg; break;
|
||||||
|
Loading…
Reference in New Issue
Block a user