mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-21 23:58:07 +00:00
User Options: limit --bitmap-max value to 31
This commit is contained in:
parent
6716447dfc
commit
7398b03be3
@ -130,6 +130,7 @@
|
||||
- Metal Backend: allow use of devices with Metal if runtime version is >= 200
|
||||
- Metal Backend: disable Metal devices only if at least one OpenCL device is active
|
||||
- User Options: added --metal-compiler-runtime option
|
||||
- User Options: limit --bitmap-max value to 31
|
||||
- Hardware Monitor: avoid sprintf in src/ext_iokit.c
|
||||
- Help: show supported hash-modes only with -hh
|
||||
- Makefile: prevent make failure with Apple Silicon in case of partial rebuild
|
||||
|
@ -110,6 +110,8 @@ int bitmap_ctx_init (hashcat_ctx_t *hashcat_ctx)
|
||||
u32 *bitmap_s2_c = (u32 *) hcmalloc ((1U << bitmap_max) * sizeof (u32));
|
||||
u32 *bitmap_s2_d = (u32 *) hcmalloc ((1U << bitmap_max) * sizeof (u32));
|
||||
|
||||
if (!bitmap_s1_a || !bitmap_s1_b || !bitmap_s1_c || !bitmap_s1_d || !bitmap_s2_a || !bitmap_s2_b || !bitmap_s2_c || !bitmap_s2_d) return -1;
|
||||
|
||||
u32 bitmap_bits;
|
||||
u32 bitmap_nums;
|
||||
u32 bitmap_mask;
|
||||
|
@ -91,7 +91,7 @@ static const char *const USAGE_BIG_PRE_HASHMODES[] =
|
||||
" --progress-only | | Return ideal progress step size and time to process |",
|
||||
" -c, --segment-size | Num | Sets size in MB to cache from the wordfile to X | -c 32",
|
||||
" --bitmap-min | Num | Sets minimum bits allowed for bitmaps to X | --bitmap-min=24",
|
||||
" --bitmap-max | Num | Sets maximum bits allowed for bitmaps to X | --bitmap-max=24",
|
||||
" --bitmap-max | Num | Sets maximum bits allowed for bitmaps to X (max: 31) | --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 |",
|
||||
|
@ -945,6 +945,13 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (user_options->bitmap_max > 31)
|
||||
{
|
||||
event_log_error (hashcat_ctx, "Invalid --bitmap-max value specified - must be lower than 32.");
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (user_options->rp_gen_func_min > user_options->rp_gen_func_max)
|
||||
{
|
||||
event_log_error (hashcat_ctx, "Invalid --rp-gen-func-min value specified.");
|
||||
|
Loading…
Reference in New Issue
Block a user