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.
I used pseudo hash for a personal project, however I needed more fine grained control over the generated password list than what was possible over the cli.
Long story short, while initially wanting to make small edits, I ended up changing every line.
Here is the list of changes:
for the same reason main() is a function;
either the ability load as a module or readability,
choose whichever explanation you like
if b: return True else return False
andfor a in A: B.append(a)
opts
, instead of having them half split between globals AND args;opts
is declared at the top with its defaults, making the script much nicer to peak into during "work"i haven't benchmarked it, however, i'm positive repeatedly opening and closing a file takes time
config
script is attempted to be imported; this allows users to modify all globals very cleanly (e.g. passingtransformations
from the cli would be awkward; words could be dynamically generated)I know having only one commit makes code-review significantly harder. I'm sincerely sorry about that.