[GH-ISSUE #560] Mask mode with hashcat / john / InsidePro character classes #239

Closed
opened 2026-10-14 02:57:32 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @frank-dittrich on GitHub (Apr 10, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/560

See also
http://www.openwall.com/lists/john-dev/2013/09/09/11

Currently, --mask uses the same "character" classes as hashcat's mask mode (for compatibility reasons).

But:
1.
Being able to use the same character classes that are used for rules would be desirable for many users.
2.
Apparently, hashcat's and InsidePro's mask mode are not compatible, either.

That's why, an optimal solution would be to have some config variable.
Users who are used to hashcat might use
MaskModeClasses = hashcat
Users who don't care about hashcat compatibility, but are familiar with john's character classes, might prefer
MaskModeClasses = john
If there is a strong need for it (but why would there be?), we could even implement a
MaskModeClasses = InsidePro

If we want to allow combining mask mode with other modes (wordlist, incremental, etc.), in addition to MaskModeClasses, a placeholder for "word" needs to be defined.
This placeholder indicates at which location(s) in the mask the password candidate that has been generated by --wordlist, --incremental, etc. appears.

How hard would implementing this flexibility actually be?

Originally created by @frank-dittrich on GitHub (Apr 10, 2014). Original GitHub issue: https://github.com/openwall/john/issues/560 See also http://www.openwall.com/lists/john-dev/2013/09/09/11 Currently, --mask uses the same "character" classes as hashcat's mask mode (for compatibility reasons). But: 1. Being able to use the same character classes that are used for rules would be desirable for many users. 2. Apparently, hashcat's and InsidePro's mask mode are not compatible, either. That's why, an optimal solution would be to have some config variable. Users who are used to hashcat might use MaskModeClasses = hashcat Users who don't care about hashcat compatibility, but are familiar with john's character classes, might prefer MaskModeClasses = john If there is a strong need for it (but why would there be?), we could even implement a MaskModeClasses = InsidePro If we want to allow combining mask mode with other modes (wordlist, incremental, etc.), in addition to MaskModeClasses, a placeholder for "word" needs to be defined. This placeholder indicates at which location(s) in the mask the password candidate that has been generated by --wordlist, --incremental, etc. appears. How hard would implementing this flexibility actually be?
bsakaguchi 2026-10-14 02:57:32 +07:00
Author
Owner

@magnumripper commented on GitHub (Apr 10, 2014):

Regardless of compatibility, we currently have masks that are not the same as in rules. That might be very confusing. For example, ?a means "letters" in rules and "all" (or perhaps "ascii") in masks. (edit: that was what your linked post commented on).

I don't care much whether we're "compatible" with the others, but we already are not. I tried implementing some rules Hashcat has but noone was interested so I ditched it.

We also deviate from the others in that, for example, ?l does not mean just "a-z" if you activate a codepage, but all lowercase letters in that codepage. Since not long ago this goes for mask mode too.

<!-- gh-comment-id:40089035 --> @magnumripper commented on GitHub (Apr 10, 2014): Regardless of compatibility, we currently have masks that are not the same as in rules. That might be very confusing. For example, ?a means "letters" in rules and "all" (or perhaps "ascii") in masks. (edit: that was what your linked post commented on). I don't care much whether we're "compatible" with the others, but we already are not. I tried implementing some rules Hashcat has but noone was interested so I ditched it. We also deviate from the others in that, for example, ?l does not mean just "a-z" if you activate a codepage, but all lowercase letters in that codepage. Since not long ago this goes for mask mode too.
Author
Owner

@magnumripper commented on GitHub (Jun 3, 2014):

How hard would implementing this flexibility actually be?

Even if it's pretty easy to implement (I think it is but I'm not sure), it adds unnecessary complexity and "support problems" (like a user following an example from (our) mailing list but it doesn't work the same). I doubt there is enough need for this to be worth the trouble.

Or put another way: If Solar changes core, you'll get it in Jumbo.

<!-- gh-comment-id:44916066 --> @magnumripper commented on GitHub (Jun 3, 2014): > How hard would implementing this flexibility actually be? Even if it's pretty easy to implement (I think it is but I'm not sure), it adds unnecessary complexity and "support problems" (like a user following an example from (our) mailing list but it doesn't work the same). I doubt there is enough need for this to be worth the trouble. Or put another way: If Solar changes core, you'll get it in Jumbo.
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#239
No description provided.