[GH-ISSUE #848] Hybrid Mask vs. --min-length #458

Closed
opened 2026-10-14 03:08:55 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @magnumripper on GitHub (Nov 8, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/848

As discussed in #845, we need to decide how to handle -min-len in hybrid mask mode.

Some alternatives:

  1. Ignore -min-len completely in hybrid mask mode (but parent mode will obey it, taking mask_add_len in account).
  2. Let -min-len and -max-len mean "mask add len" when in hybrid mode.
  3. Do not allow -min-len at all when running hybrid.

After some thought I think I prefer option 1. What was the problem again?

Originally created by @magnumripper on GitHub (Nov 8, 2014). Original GitHub issue: https://github.com/openwall/john/issues/848 As discussed in #845, we need to decide how to handle -min-len in hybrid mask mode. Some alternatives: 1. Ignore -min-len completely in hybrid mask mode (but parent mode will obey it, taking mask_add_len in account). 2. Let -min-len and -max-len mean "mask add len" when in hybrid mode. 3. Do not allow -min-len at all when running hybrid. After some thought I think I prefer option 1. What was the problem again?
bsakaguchi 2026-10-14 03:08:55 +07:00
Author
Owner

@magnumripper commented on GitHub (Nov 8, 2014):

Implemented option 1 in 25060db for now.

<!-- gh-comment-id:62238029 --> @magnumripper commented on GitHub (Nov 8, 2014): Implemented option 1 in 25060db for now.
Author
Owner

@magnumripper commented on GitHub (Nov 8, 2014):

The good thing with this solution is simplicity. The drawback is we can't do things like "Add one to four digits to base word" in one session. For doing that, option 2 is needed (or some other option not yet listed).

<!-- gh-comment-id:62255689 --> @magnumripper commented on GitHub (Nov 8, 2014): The good thing with this solution is simplicity. The drawback is we can't do things like "Add one to four digits to base word" in one session. For doing that, option 2 is needed (or some other option not yet listed).
Author
Owner

@magnumripper commented on GitHub (Nov 9, 2014):

The drawback is we can't do things like "Add one to four digits to base word" in one session.

Apart from that though, the current logic works like a champ and I think it is logical for the end user. For example, running WPAPSK, wordlist and -mask=?w?d?d?d?d, wordlist mode will drop base words that are shorter than four characters, because they would be too short even after applying the mask.

<!-- gh-comment-id:62324113 --> @magnumripper commented on GitHub (Nov 9, 2014): > The drawback is we can't do things like "Add one to four digits to base word" in one session. Apart from that though, the current logic works like a champ and I think it is logical for the end user. For example, running WPAPSK, wordlist and -mask=?w?d?d?d?d, wordlist mode will drop base words that are shorter than four characters, because they would be too short even after applying the mask.
Author
Owner

@magnumripper commented on GitHub (Nov 18, 2014):

I think this is fine for now

<!-- gh-comment-id:63497549 --> @magnumripper commented on GitHub (Nov 18, 2014): I think this is fine for now
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#458
No description provided.