[GH-ISSUE #2779] Markov mode prints wrong number of passwords if min level > 0 #1785

Open
opened 2026-10-15 04:24:26 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @frank-dittrich on GitHub (Sep 24, 2017).
Original GitHub issue: https://github.com/openwall/john/issues/2779

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
Originally created by @frank-dittrich on GitHub (Sep 24, 2017). Original GitHub issue: https://github.com/openwall/john/issues/2779 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 ```
Author
Owner

@frank-dittrich commented on GitHub (Sep 25, 2017):

Looks like this bug is as old as Markov mode in jumbo.
Hopefully, I'll have more time to look into it over the weekend.

<!-- gh-comment-id:331838416 --> @frank-dittrich commented on GitHub (Sep 25, 2017): Looks like this bug is as old as Markov mode in jumbo. Hopefully, I'll have more time to look into it over the weekend.
Author
Owner

@magnumripper commented on GitHub (Nov 30, 2017):

The ETA/progress part of this issue is solved. The rest I can't fix - I have no idea how to pre-calculate stuff to get the keyspace beforehand.

<!-- gh-comment-id:348198301 --> @magnumripper commented on GitHub (Nov 30, 2017): The ETA/progress part of this issue is solved. The rest I can't fix - I have no idea how to pre-calculate stuff to get the keyspace beforehand.
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#1785
No description provided.