openwall / openwall/john

More use of opportunistic dupe suppression

Open
#5,055 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C
Stars
13.6k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

  1. The current code implemented in #5046 does not suppress dupes produced by --rules-stack (but does suppress dupes right before them being applied). Example:
$ rm -f out && ../run/john -loopback -stdout -rules=single -rules-stack=best64 | unique out
Using default input encoding: UTF-8
Permutation rules: single
Press 'q' or Ctrl-C to abort, 'h' for help, almost any other key for status
Enabling duplicate candidate password suppressor
268275585p 0:00:01:36 100.00% (2022-02-07 14:29) 2789Kp/s A21900
Total lines read: 268275585, unique lines written: 146550958 (54%), 1 slow passes
  1. We might want to enable use of dupe suppression for --external mode, as some of them can produce many dupes.
$ rm -f out && ../run/john -stdout -external:subsets -max-len=6 | unique out
Warning: external mode 'subsets' can't be resumed if aborted
Press 'q' or Ctrl-C to abort, 'h' for help, almost any other key for status
150042430p 0:00:00:45 100.00% (2022-02-07 14:33) 3315Kp/s ~~~~~~
Total lines read: 150042430, unique lines written: 101829360 (67%), no slow passes
  1. We could consider --regex mode. While most carefully thought out regex'es produce no dupes, I think there are situations where they are hard to battle. And there can definitely be many dupes from hybrid wordlist + regex.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the opportunistic duplicate-suppression implementation from #5046 and reproduce the provided --rules-stack and --external commands. Determine whether suppression should also cover --regex and hybrid wordlist-plus-regex output. Done means duplicate candidates are suppressed in the selected modes without breaking their existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.