Skip to content

Commit c4d12d5

Browse files
magnumrippersolardiz
authored andcommitted
Default --mask: Iterate over length
Just saying "--mask" will use a default mask just like hashcat's: ?1?2?2?2?2?2?2?3?3?3?3?d?d?d?d unless changed in config. This mask is barely of any use unless we iterate over length, so let's default to that.
1 parent 62fa8d3 commit c4d12d5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/mask.c

+6
Original file line numberDiff line numberDiff line change
@@ -2130,6 +2130,12 @@ void mask_init(struct db_main *db, char *unprocessed_mask)
21302130
!strcasecmp(mask_fmt->params.label, "lm-opencl"))
21312131
format_cannot_reset = 1;
21322132

2133+
/* Using "--mask" alone will use default mask and iterate over length */
2134+
if (!(options.flags & FLG_MASK_STACKED) && !unprocessed_mask &&
2135+
options.req_minlength < 0 && !options.req_maxlength)
2136+
mask_increments_len = 1;
2137+
2138+
/* Specified length range given */
21332139
if ((options.req_minlength >= 0 || options.req_maxlength) &&
21342140
(options.eff_minlength != options.eff_maxlength) &&
21352141
!(options.flags & FLG_MASK_STACKED))

0 commit comments

Comments
 (0)