mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #2007] MASK mode. add 'empty' character to range #1350
Labels
No labels
bug
core branch
documentation
enhancement
enhancement
fixed - pending verify
fuzz bug
good first issue
invalid
invalid
maintenance/cleanup
new cracking mode
new format
new tool
non-trivial
notes/external issues
portability
question
RFC / discussion
testing
WONTFIX
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openwall/john#1350
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jfoug on GitHub (Jan 25, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2007
Allow an escape or something to the range syntax, so that a range will output any listed character AND output nothing. Example (very useful for things like dates)
--mask=jan[\b0-2][0-9]19[7-9][0-9]
Here the \b is the escape (not sure that is the right thing, and this would give us these outputs:
jan11970
jan011970
jan111970
jan211970
The jan11970 is the example this issue requests (the empty).
@magnumripper commented on GitHub (Jan 26, 2016):
This would also allow us to run eg. wordlist + mask and try the original word as well as with mask appended. I really like this idea but it has to work for GPU-side mask too, and this may be tricky. Assigning to @Sayantan2048 for now.
@jfoug commented on GitHub (Jan 26, 2016):
What esc for the empty? \b is frequently used as a space ' ' character (at least in C). I used it here in this example, but not sure it is the right escape we want to use.
@magnumripper commented on GitHub (Jan 26, 2016):
I never heard of \b for space, but indeed for backspace. Anyway I think \0 would be a fair choice if it wasn't for it's different meaning in rules and yet another meaning in regex mode.
BTW we should consult Hashcat team before we make a final decision.
@jfoug commented on GitHub (Jan 26, 2016):
You are right about the backspace. I just had a little brain fart with the space.
I wonder about
\+That is 'close' to the regex usage, for 0 or more (the context is slightly different). But here it would be 0 or 1 instance.@magnumripper commented on GitHub (Jan 26, 2016):
Yeah
\+might be usable. Anyhow I'm more concerned about whether this is doable at all without ruining GPU-side speed.Hmmm maybe if GPU-side never picked that particular placeholder? Still, it would now be a variable length base word, which may or may not be tricky... but in hybrid mode they also vary! Let's wait for @Sayantan2048 to comment this.
@magnumripper commented on GitHub (Jan 26, 2016):
Oh, but mask stuff is ?l and ?u so it would be more like ?+, right? Or even ?? (which is now defined as meaning a single literal questionmark).
@jfoug commented on GitHub (Jan 26, 2016):
I really like ?? but I think that is already defined as the ? literal ?+ still gives me a warm fuzzy about recognizing it's meaning from regex usage.
@jfoug commented on GitHub (Jan 27, 2016):
Ok, how about this:
[range] Only outputs r a n g e
(range) Outputs r a n g e and nothing
?d alias for [0-9]
!d alias for (0-9)
@ghost commented on GitHub (Jan 27, 2016):
Example: -mask=word(0-9)(a-c). This is not easy.
As it works now:
From now on:
@jfoug commented on GitHub (Jan 27, 2016):
This may not be a viable request. I was just thinking it would be useful to issue only a single mask run and have it handle things such as optional characters.
@ghost commented on GitHub (Jan 27, 2016):
This is a very useful request. So, if it is not viable on GPU mask mode (it probably hurts performance) this request and a few others have to be addressed somehow (e.g. --min-len=1 --max-len=7).
I guess mask mode has to (when GPU mask available):
A kind of pre-processor generating the proper inner calls
@magnumripper commented on GitHub (Jan 28, 2016):
It shouldn't be necessary to turn GPU-side mask off completely. Just make sure any placeholder that includes "the empty" is always on CPU side.
These runs seem to work fine (although slower than optimal) despite not getting anywhere near the target value for GPU-side mask size, and despite the base word is variable length:
Note that due to ?w we do have variable length base words. In both cases, the multiplier ends up as 3 although it wants much more.
@magnumripper commented on GitHub (Mar 6, 2018):
Bump. I'm currently doing a major overhaul on mask mode, and this should be reconsidered.