openwall / openwall/john

Update hashcat mode rules for character class support

Open
#5,553 6 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

Once https://github.com/hashcat/hashcat/pull/4107 is merged, we'll need to enable our class support in the purge command also in hashcat mode. It is currently disabled with the check here:

#define CLASS_export_pos(start, true, false) { \
        char value, *class; \
        if (((value = RULE) == '?') && !hc_logic) { \

This may be a bit complicated because:

  1. It looks like hashcat is currently only adding class support to this one command, whereas we use the same macro for many commands.
  2. hashcat will likely add exceptions where @? followed by some characters found in existing rulesets is treated the same as @??. We'll likely want to mimic those exceptions when in hashcat mode (or we'll need to update our copies of hashcat style rulesets to use @?? where appropriate - it's just 3 places).

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

Review the CLASS_export_pos macro shown in the issue and the related hashcat pull request 4107 before changing hashcat-mode handling. Trace how the purge command and other commands use this macro, then verify that character classes and the noted hashcat exceptions behave correctly in hashcat mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
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.