[GH-ISSUE #854] (Pure) mask mode: progress issue with -min-len #460

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

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

$ ../run/john -mask=?l -stdout -min-len=0 -max-len=8 -prog=1 -verb=1
47255107p 0:00:00:01 15.30% (ETA: 18:11:45) 38108Kp/s bzojyc
94022287p 0:00:00:02 30.44% (ETA: 18:11:45) 42162Kp/s telswg
140728133p 0:00:00:03 45.56% (ETA: 18:11:45) 43569Kp/s lruxuk
187716650p 0:00:00:04 60.77% (ETA: 18:11:45) 44377Kp/s cigtto
234311961p 0:00:00:05 75.85% (ETA: 18:11:45) 44801Kp/s lhisrs
281151518p 0:00:00:06 91.01% (ETA: 18:11:45) 45128Kp/s wohfqw
324164830p 0:00:00:07 4.04% (ETA: 18:14:32) 44836Kp/s atoigaa
343204603p 0:00:00:08 4.27% (ETA: 18:14:46) 41701Kp/s zbwzvba
362236403p 0:00:00:09 4.51% (ETA: 18:14:58) 39245Kp/s hqrqlda
381017621p 0:00:00:10 4.74% (ETA: 18:15:09) 37245Kp/s vmgtafa
399994425p 0:00:00:11 4.98% (ETA: 18:15:19) 35618Kp/s xrygqga
419114472p 0:00:00:12 5.22% (ETA: 18:15:28) 34269Kp/s iuucgia
438160566p 0:00:00:13 5.46% (ETA: 18:15:37) 33118Kp/s kmluvja
456924053p 0:00:00:14 5.69% (ETA: 18:15:45) 32109Kp/s zcawkla
475874844p 0:00:00:15 5.92% (ETA: 18:15:52) 31245Kp/s ovfiana
475874844p 0:00:00:15 5.92% (ETA: 18:15:52) 31245Kp/s ovfiana
Session aborted

The progress reported from pure mask mode is currently
(100 * total candidates produced) / mask_tot_cand
but mask_tot_cand is only correct for the length we're currently at. Basically we need to calculate a mask_tot_cand that is the sum of all lengths' number of candidates.

An other way to fix this would be to keep it as-is (percent shown is for current length) but fix it so that figure is actually proper. For doing that, we need to keep track of 'total candidates produced' at start of each length so we get
(100 * candidates produced for current length) / mask_tot_cand

No panic, let's ponder this for a while

Originally created by @magnumripper on GitHub (Nov 17, 2014). Original GitHub issue: https://github.com/openwall/john/issues/854 ``` $ ../run/john -mask=?l -stdout -min-len=0 -max-len=8 -prog=1 -verb=1 47255107p 0:00:00:01 15.30% (ETA: 18:11:45) 38108Kp/s bzojyc 94022287p 0:00:00:02 30.44% (ETA: 18:11:45) 42162Kp/s telswg 140728133p 0:00:00:03 45.56% (ETA: 18:11:45) 43569Kp/s lruxuk 187716650p 0:00:00:04 60.77% (ETA: 18:11:45) 44377Kp/s cigtto 234311961p 0:00:00:05 75.85% (ETA: 18:11:45) 44801Kp/s lhisrs 281151518p 0:00:00:06 91.01% (ETA: 18:11:45) 45128Kp/s wohfqw 324164830p 0:00:00:07 4.04% (ETA: 18:14:32) 44836Kp/s atoigaa 343204603p 0:00:00:08 4.27% (ETA: 18:14:46) 41701Kp/s zbwzvba 362236403p 0:00:00:09 4.51% (ETA: 18:14:58) 39245Kp/s hqrqlda 381017621p 0:00:00:10 4.74% (ETA: 18:15:09) 37245Kp/s vmgtafa 399994425p 0:00:00:11 4.98% (ETA: 18:15:19) 35618Kp/s xrygqga 419114472p 0:00:00:12 5.22% (ETA: 18:15:28) 34269Kp/s iuucgia 438160566p 0:00:00:13 5.46% (ETA: 18:15:37) 33118Kp/s kmluvja 456924053p 0:00:00:14 5.69% (ETA: 18:15:45) 32109Kp/s zcawkla 475874844p 0:00:00:15 5.92% (ETA: 18:15:52) 31245Kp/s ovfiana 475874844p 0:00:00:15 5.92% (ETA: 18:15:52) 31245Kp/s ovfiana Session aborted ``` The progress reported from pure mask mode is currently (100 \* total candidates produced) / mask_tot_cand but mask_tot_cand is only correct for the length we're currently at. Basically we need to calculate a mask_tot_cand that is the sum of all lengths' number of candidates. An _other_ way to fix this would be to keep it as-is (percent shown is for current length) but fix it so that figure is actually proper. For doing that, we need to keep track of 'total candidates produced' at start of each length so we get (100 \* candidates produced for current length) / mask_tot_cand No panic, let's ponder this for a while
bsakaguchi 2026-10-14 03:09:06 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@frank-dittrich commented on GitHub (Nov 17, 2014):

On 11/17/2014 06:20 PM, magnum wrote:

An other way to fix this would be to keep it as-is (percent shown is for current length) but fix it so that figure is actually proper. For doing that, we need to keep track of 'total candidates produced' at start of each length so we get
(100 * candidates produced for current length) / mask_tot_cand)

If you do that, you might want to add the current length in parentheses
like it is done for the steps "single mode" (1), "wordlist mode" (2),
"incremental mode" (3) when running in batch mode.

<!-- gh-comment-id:63341641 --> @frank-dittrich commented on GitHub (Nov 17, 2014): On 11/17/2014 06:20 PM, magnum wrote: > An _other_ way to fix this would be to keep it as-is (percent shown is for current length) but fix it so that figure is actually proper. For doing that, we need to keep track of 'total candidates produced' at start of each length so we get > (100 \* candidates produced for current length) / mask_tot_cand) If you do that, you might want to add the current length in parentheses like it is done for the steps "single mode" (1), "wordlist mode" (2), "incremental mode" (3) when running in batch mode.
Author
Owner

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

Good point, I will try this.

<!-- gh-comment-id:63369267 --> @magnumripper commented on GitHub (Nov 17, 2014): Good point, I will try this.
Author
Owner

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

If you do that, you might want to add the current length in parentheses like it is done for the steps "single mode" (1), "wordlist mode" (2), "incremental mode" (3) when running in batch mode.

Batch mode actually prints it as 1/3, 2/3 and 3/3. I think printing min/max length as 2/3 will be confusing. Maybe just print it as (2) and not mention max length?

<!-- gh-comment-id:63372888 --> @magnumripper commented on GitHub (Nov 17, 2014): > If you do that, you might want to add the current length in parentheses like it is done for the steps "single mode" (1), "wordlist mode" (2), "incremental mode" (3) when running in batch mode. Batch mode actually prints it as 1/3, 2/3 and 3/3. I think printing min/max length as 2/3 will be confusing. Maybe just print it as (2) and not mention max length?
Author
Owner

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

Current output

$ ../run/john -mask=?d -stdout -min-len=0 -max-length=11 -prog=1 -verb=1
43423164p 0:00:00:01 32.31% (8) (ETA: 17:19:38) 35592Kp/s 25021323
86809537p 0:00:00:02 75.70% (8) (ETA: 17:19:37) 39103Kp/s 52489657
129889578p 0:00:00:03 1.88% (9) (ETA: 17:22:14) 40338Kp/s 664877810
172065784p 0:00:00:04 6.10% (9) (ETA: 17:20:40) 40870Kp/s 276459060
214899580p 0:00:00:05 10.38% (9) (ETA: 17:20:23) 41168Kp/s 864887301
257739734p 0:00:00:06 14.66% (9) (ETA: 17:20:15) 41503Kp/s 226826641
<!-- gh-comment-id:63497303 --> @magnumripper commented on GitHub (Nov 18, 2014): Current output ``` $ ../run/john -mask=?d -stdout -min-len=0 -max-length=11 -prog=1 -verb=1 43423164p 0:00:00:01 32.31% (8) (ETA: 17:19:38) 35592Kp/s 25021323 86809537p 0:00:00:02 75.70% (8) (ETA: 17:19:37) 39103Kp/s 52489657 129889578p 0:00:00:03 1.88% (9) (ETA: 17:22:14) 40338Kp/s 664877810 172065784p 0:00:00:04 6.10% (9) (ETA: 17:20:40) 40870Kp/s 276459060 214899580p 0:00:00:05 10.38% (9) (ETA: 17:20:23) 41168Kp/s 864887301 257739734p 0:00:00:06 14.66% (9) (ETA: 17:20:15) 41503Kp/s 226826641 ```
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#460
No description provided.