mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
67 lines
2.1 KiB
Markdown
67 lines
2.1 KiB
Markdown
# genpass
|
||
|
||
This plugin provides three unique password generators for ZSH. Each generator
|
||
has at least a 128-bit security margin and generates passwords from the
|
||
cryptographically secure `/dev/urandom`. Each generator can also take an
|
||
optional numeric argument to generate multiple passwords.
|
||
|
||
To use it from an interactive ZSH, add `genpass` to the plugins array in your
|
||
zshrc file:
|
||
|
||
plugins=(... genpass)
|
||
|
||
You can also invoke password generators directly (they are implemented as
|
||
standalone executable files), which can be handy when you need to generate
|
||
passwords in a script:
|
||
|
||
~/.oh-my-zsh/plugins/genpass/genpass-apple 3
|
||
|
||
## genpass-apple
|
||
|
||
Generates a pronounceable pseudoword passphrase of the "cvccvc" consonant/vowel
|
||
syntax based on [Apple Passwords’ Generated Strong Password Format][1]. Each
|
||
password has exactly 1 digit placed on other either side of the hyphen or at the
|
||
end of the password and exactly 1 capital letter to satisfy most password security
|
||
requirements.
|
||
|
||
% genpass-apple
|
||
nyvtyv-mYhmob-xyqby4
|
||
|
||
% genpass-apple 3
|
||
kedfu4-nowryn-gezjeR
|
||
qoJsoh-fikgon-nugfa8
|
||
fecvos-kiCliv-byvhi1
|
||
|
||
[1]: https://rmondello.com/2024/10/07/apple-passwords-generated-strong-password-format/
|
||
|
||
## genpass-monkey
|
||
|
||
Generates visually unambiguous random meaningless strings using [Crockford's
|
||
base32][2].
|
||
|
||
% genpass-monkey
|
||
xt7gn976e7jj3fstgpy27330x3
|
||
|
||
% genpass-monkey 3
|
||
n1qqwtzgejwgqve9yzf2gxvx4m
|
||
r2n3f5s6vbqs2yx7xjnmahqewy
|
||
296w9y9rts3p5r9yay0raek8e5
|
||
|
||
[2]: https://www.crockford.com/base32.html
|
||
|
||
## genpass-xkcd
|
||
|
||
Generates passphrases from `/usr/share/dict/words` inspired by the [famous (and
|
||
slightly misleading) XKCD comic][3]. Each passphrase is prepended with a digit
|
||
showing the number of words in the passphrase to adhere to password security
|
||
requirements that require digits. Each word is 6 characters or less.
|
||
|
||
% genpass-xkcd
|
||
9-eaten-Slav-rife-aired-hill-cordon-splits-welsh-napes
|
||
|
||
% genpass-xkcd 3
|
||
9-worker-Vlad-horde-shrubs-smite-thwart-paw-alters-prawns
|
||
9-tutors-stink-rhythm-junk-snappy-hooray-barbs-mewl-clomp
|
||
9-vital-escape-Angkor-Huff-wet-Mayra-abbés-putts-guzzle
|
||
|
||
[3]: https://xkcd.com/936/
|