openwall / openwall/john

Spawn external from within a rule

Open
#2,121 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core branch enhancement RFC / discussion
Dominant language
C
Stars
13.6k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

This idea came from #2095

Solar: It makes me thinking what command character we'd (eventually) use for executing an external mode function from a ruleset, though - 'e' could have stood for "external" - but perhaps this should in fact be a separate topic

As for external being called as a rule, I really only see calling a filter function, to modify the word or reject it.

As for the rule to use, these are already spoken for (where there are letters available of either case, there is a gap)

A cCdDeE f iI kKlL M oOpPqQ rRsStTuUvV xXyYzZ { } [ ] () <> _ ' : / $ ^ # % @ ! = \ * + - . , 12 4 6

So we can see we are getting pretty 'tight' on letters. For calling an external function, could we view this as a 'spawn', and wrap it in sh syntax? function ?

The ` is not used, and seems a 'safe' bet. That way, we could even comment it could be a extern function or even a system spawn (Yes, I know solar will not agree, but we can wish, lol).

So a rule such as:

\]\]$[a-f0-9]$[ -~]ccorp_complexity``
would chop last 2 letters, append a hex, then some other ascii char, then case the word, and then finally call the corp_complexity 'script/external' which would accept or cause the final word to be dropped as not meeting some corp standard.

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

The issue names no implementation files, tests, or entry points. Start by locating the ruleset parser and existing external or filter-function handling, then clarify the proposed syntax and execution behavior; done would require an agreed design and corresponding implementation and tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, shell
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.