Markov mode prints wrong number of passwords if min level > 0
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
The
MKV start (stats=$JOHN/stats, lvl=200 len=12 pwd=259356431)
output is correct if no min. level has been specified.
But if a min. level is specified, that line still prints the number of passwords for the max. level, not subtracting the number of candidates that will be excluded due to min. level.
This also results in the ETA being bogus, since markov mode will not stop at about 100%, but, depending on min. level, at a much lower percentage of the total number of password candidates.
$ LC_ALL=C ./john --stdout --markov=200 | wc -l
Press 'q' or Ctrl-C to abort, almost any other key for status
MKV start (stats=$JOHN/stats, lvl=200 len=12 pwd=259356431)
259356430p 0:00:00:17 100.00% (ETA: 14:50:42) 14862Kp/s }
259356430
$ LC_ALL=C ./john --stdout --markov=199-200 | wc -l
Press 'q' or Ctrl-C to abort, almost any other key for status
MKV start (stats=$JOHN/stats, lvl=199-200 len=12 pwd=259356431)
47821850p 0:00:00:06 18.44% (ETA: 14:51:21) 7688Kp/s }sva
47821850
$ LC_ALL=C ./john --stdout --markov=200-200 | wc -l
Press 'q' or Ctrl-C to abort, almost any other key for status
MKV start (stats=$JOHN/stats, lvl=200-200 len=12 pwd=259356431)
25130360p 0:00:00:04 9.69% (ETA: 14:51:42) 5139Kp/s }sva
25130360
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the three ./john --stdout --markov commands in the issue and trace the Markov mode handling behind --markov. Done means the startup password count accounts for the minimum level, and the progress percentage and ETA reach approximately 100% when the selected candidate range is exhausted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100