Modernised - #8
Open
briangillan wants to merge 14 commits into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.