empty vs "N/A" vs "DONE (date)" in final status line with mask mode
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
It may be related to #1372. I am not sure what behaviour is correct, so I'll document my observations.
I tried different masks to tune run time:
- 0 seconds causes final status line without progress indication,
- 0 seconds may give final status line with "N/A",
- 1 -- ~10 seconds give "N/A",
- 10+ seem to give "DONE (date)".
$ cat t4.pw # crypt.crypt('123456', '$6$asdf')
$6$asdf$PA4y6n7xopdOZJIf7Em3nlPY6ySAAFnKXyHmtvIyajhkoKpzhzDBScEuFqTIsNvR2e4FHA4GTIfNw3FD1CI1o0
$ john --format=sha512crypt --mask='password?d' t4.pw
Using default input encoding: UTF-8
Loaded 1 password hash (sha512crypt, crypt(3) $6$ [SHA512 128/128 SSE4.1 2x])
Cost 1 (iteration count) is 5000 for all loaded hashes
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:00 0g/s 33.33p/s 33.33c/s 33.33C/s password1..password7
Session completed
$ john --format=sha512crypt --mask='password?d?d' t4.pw
[...]
0g 0:00:00:00 N/A 0g/s 204.0p/s 204.0c/s 204.0C/s password95..password77
Session completed
$ john --format=sha512crypt --mask='password?d?d?d?d' t4.pw
[...]
0g 0:00:00:24 DONE (2019-03-30 13:49) 0g/s 409.5p/s 409.5c/s 409.5C/s password9677..password7777
Session completed
$ john --format=sha512crypt --mask='password?d?d?d[0-3]' t4.pw
[...]
0g 0:00:00:10 DONE (2019-03-30 13:50) 0g/s 394.4p/s 394.4c/s 394.4C/s password6573..password7773
Session completed
$ john --format=sha512crypt --mask='password?d?d?d[0-2]' t4.pw
[...]
0g 0:00:00:07 N/A 0g/s 390.1p/s 390.1c/s 390.1C/s password9972..password7772
Session completed
$ john --format=sha512crypt --mask='password?d?d[0-8][0-3]' t4.pw
[...]
0g 0:00:00:08 DONE (2019-03-30 13:51) 0g/s 401.7p/s 401.7c/s 401.7C/s password9683..password7783
Session completed
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
Reproduce the four john --format=sha512crypt --mask commands from the report and compare their final status lines, especially the differing N/A and DONE output. Determine the expected status behavior for completed mask sessions and verify it consistently across the reported mask lengths and runtimes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100