Update hashcat mode rules for character class support
Open
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:
- It looks like hashcat is currently only adding class support to this one command, whereas we use the same macro for many commands.
- 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
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
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