incremental + hybrid + rules-stack + min/max-len + stdout: changes from rules-stack are not accounted well
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Two cases when --min-length and --max-length are set to the same value:
- we reduce length (e.g.
]), so output is shorter than specified by--min-length, - we increase length (e.g.
$0), so output is dropped because it is loner than specified by--max-length. It is just an observation, it looks more like shooting my own foot.
Hybrid mask with --min-length/--max-length imply length
restrictions onto incremental. --rules-stack may change length, then --min-length is not checked, --max-length is checked.
To have direct control over length of incremental, user may use --stdout | john --pipe --rules....
Base output:
$ john --incremental=alpha --mask='?w?d' --rules-stack=':' --min-length=7 --max-length=7 --stdout | head -n 3
Press 'q' or Ctrl-C to abort, almost any other key for status
samila1
samila0
samila2
Case 1:
$ john --incremental=alpha --mask='?w?d' --rules-stack=':\]' --min-length=7 --max-length=7 --stdout | head -n 3
Press 'q' or Ctrl-C to abort, almost any other key for status
samila
samily
shanne
Case 2:
$ john --incremental=alpha --mask='?w?d' --rules-stack=':$0' --min-length=7 --max-length=7 --stdout | head -n 3
Press 'q' or Ctrl-C to abort, almost any other key for status
[... waiting, then ^C ...]
0p 0:00:00:06 0.00% 0p/s
Session aborted
$ john --incremental=alpha --mask='?w?d' --rules-stack=':$0' --min-length=7 --max-length=8 --stdout | head -n 3
Press 'q' or Ctrl-C to abort, almost any other key for status
samila10
samila00
samila20
$ john --list=build-info
Version: 1.8.0.16-jumbo-1-bleeding-f389ca4 2019-04-05 08:45:43 +0200
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 reported commands using --incremental, --mask, --rules-stack, --min-length, and --max-length with --stdout. Trace how rule changes affect length filtering, then verify that reduced and increased outputs are handled consistently within the requested bounds.
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
- 30/100