another docs update; include cmdline switches/args

This commit is contained in:
brent s. 2022-03-09 23:54:33 -05:00
parent 7e9269f056
commit e68bd2a1ff
Signed by: bts
GPG Key ID: 8C004C2F93481F6B
1 changed files with 25 additions and 1 deletions

View File

@ -10,7 +10,31 @@ PWGen generates cryptographically-sound (i.e. non-predictable) passwords:
* The order of characters in this generated password itself is then shuffled using `crypto/rand` as well.
* This is done for every single password generated.

You can build (`cd cmd/pwgen && go build`) and then run `./pwgen -h` for all invocation options available.
All invocation options:
```
Usage:
pwgen [OPTIONS]

Application Options:
-a, --disable-alpha If specified, do NOT include the Alphabetical (letter) charset.
-n, --disable-num If specified, do NOT include the Numerical (number) charset.
-s, --disable-symbols If specified, do NOT include the Simple Symbols charset.
-S, --enable-extended-symbols If specified, include the Extended Symbols charset (these characters may cause issues in some applications).
-u, --count-upper= The number of minimum uppercase characters. If not specified, this is random (if in the charset).
-U, --count-lower= The number of minimum lowercase characters. If not specified, this is random (if in the charset).
-N, --count-numbers= The number of minimum number characters. If not specified, this is random (if in the charset).
-y, --count-symbols= The number of minimum simple symbol characters. If not specified, this is random (if in the charset).
-Y, --count-extended= The number of minimum extended symbol characters. If not specified, this is random (if in the charset).
-d, --disable-chars= If specified, these chars should be explicitly excluded from the charset(s). Can be specified multiple times with multiple chars per switch.
-e, --explicit-chars= If specified, ignore all charset selection and only use these characters to select from. Can be specified multiple times.
-l, --min-length= The minimum length for passwords; use 0 for no minimum limit. Set this to the same as -L/--max-length to use a fixed length. Must be <= -L/--max-length. (default: 16)
-L, --max-length= The maximum length for passwords; use 0 for no maximum limit (this is hard-capped to 256 for performance reasons). Set this to the same as -l/--min-length for a fixed length. Must be >= -l/--min-length.
(default: 64)
-c, --count= The number of passwords to generate. (default: 1)

Help Options:
-h, --help Show this help message
```

## What it Doesn't Do
PWGen does not, and will not, generate "Correct Horse Battery Stapler" passphrases (as demonstrated in [XKCD #936](https://xkcd.com/936/)).