Skip to content

Modernised - #8

Open
briangillan wants to merge 14 commits into
Hydraze:masterfrom
briangillan:modernize
Open

Modernised#8
briangillan wants to merge 14 commits into
Hydraze:masterfrom
briangillan:modernize

Conversation

@briangillan

Copy link
Copy Markdown

No description provided.

philsmd and others added 14 commits March 1, 2016 12:15
When using the --threads flag, the script doesn't end, because it is waiting for cpu_count() threads (which is never satisfied).
issue #1 : policygen.py did not respect the --maxdigit value
Fixed inverse logic bug in maskgen.
Fix bug when threads != cpu_count
Optimized script to process large wordlists
Support for more character sets
Update all four tools (statsgen, maskgen, policygen, rulegen) and add
packaging, with the biggest focus on rulegen.

CLI / dependencies:
- Port all tools from deprecated optparse to argparse.
- rulegen: make pyenchant optional with a clear install message instead of
  a raw ImportError; default providers aspell,myspell -> aspell,hunspell
  (enchant-2, since myspell no longer exists there).

Bug fixes:
- rulegen: word-frequency percentages summed the rules counter instead of
  the words counter.
- rulegen: extract rule 'x' collided with truncate rule "'"; a debug branch
  was a no-op string literal instead of a print.
- rulegen --password now prints the generated word and rule instead of
  silently discarding them.
- statsgen/maskgen: guard division-by-zero on empty/fully-filtered input.
- statsgen/maskgen/policygen: output files were never closed; now closed
  via try/finally.

Cleanups:
- Wrap file access in context managers; raw strings for regexes and the
  ASCII-art banners (no more invalid-escape warnings on Python 3.12+).
- Wrap each CLI in a main() so the tools install as console scripts.

Packaging:
- Add pyproject.toml (console entry points, optional [rulegen] extra),
  requirements.txt, .gitignore.
- Replace the plain-text README with a modern README.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts:
#	maskgen.py
#	policygen.py
#	rulegen.py
#	statsgen.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants