Open alex0112 opened 2 years ago
I've been thinking about this feature for a hot minute. Happy to implement it if there's interest and no one else beats me to it.
If there's interest in this feature, I'd also like to add another option (which I will write up in a separate issue) that's something like --exclude-strange
which would simply exclude some of the commonly disallowed characters mentioned above.
My thought being that when a site disallowing the regular character set is hit, a user can:
--exclude-strange
--simple
, and if that one is rejected--alphanumeric
and weep salty tears at the state of password policies on whatever service they are using.
Problem
I often find myself needing to generate a password where characters such as
'
"
\
or a backtick are not allowed.A while back the
--exclude
flag was added in #23, but I often find myself hitting this scenario:Usually I'm too lazy to figure out the proper quoting conventions for these characters in my current shell, and often my workflow for sites that block characters like these is to do this:
Which works, but is a bit much in terms of manual typing. Even then, sometimes sites will reject some of those characters. So I end up defaulting to:
Proposed Solution:
Add two new options:
--alphanumeric
to generate a password only matching the character class[A-Za0-9a-z]
--simple
to generate a password only matching the character class[0-9a-zA-Z!@#$%^&*()]
I've taken the liberty of prototyping a few Gherkin tests about what the end behavior might look like: