A standalone python program that generates simple pseudo-random strings. I'm sure there are a dozen versions of this out there, but I didn't care to look and decided to write one myself. Well, you know what they say about security and crypto - always roll your own.
This should not be used for critical passwords. It's intended to help generate throwaway passwords or phrases.
To use this as a regular command line program:
- Set the shebang in the
pw
script to the python interpreter you wish to use. Unless you prefer otherwise set this to the path specified bywhich python3
. - Add
/usr/local/bin
to your$PATH
, if needed. - Set the program files to
rwxr-xr-x
, if needed. - Copy the contents of this project to
/usr/local/bin
withsudo cp -R src/* /usr/local/bin
. - Check that
pw
is accessible usingpw --help
.
usage: pw [-h] [-l LENGTH] [-d DELIMITER] [-t {mnemonic,alpha_lower,numeric,alpha_numeric}]
optional arguments:
-h, --help show this help message and exit
-l LENGTH, --length LENGTH
number of elements to use; defaults to 4
-d DELIMITER, --delimiter DELIMITER
token delimiter to use; defaults to "-"
-t {mnemonic,alpha_lower,numeric,alpha_numeric}, --token {mnemonic,alpha_lower,numeric,alpha_numeric}
type of password tokens to use; defaults to mnemonic words
token name | set |
---|---|
mnemonic | bip-0039 english word list; used by many wallet programs such as Electrum |
alpha_lower | ASCII lowercase characters (e.g. a-z) |
alpha_numeric | ASCII lowercase characters and digits (e.g. a-z and 0-9) |
numeric | ASCII digits (e.g. 0-9) |