A simple tool to generate random strings.
Copy a 16 characters long random string containing letters, numbers
and symbols (GSXutSdunI#1NjI^
) to your clipboard.
pw_gen | pbcopy
If you have not switched to zsh jet, i can recomend oh-my-zsh.
Install:
mkdir -p ~/.oh-my-zsh/custom/plugins/password_generator
git clone git://github.com/Xiphe/Password-Generator-for-zsh.git ~/.oh-my-zsh/custom/plugins/password_generator
Activate:
vim ~/.zshrc
Add the plugin: plugins=([your other plugins] password_generator)
Save the file and restart your shell.
Clone the repository somewhere
git clone git://github.com/Xiphe/Password-Generator-for-zsh.git /your/custom/path
Include the password_generator.plugin.zsh in your script
#!/bin/zsh
. /your/custom/path/password_generator.plugin.zsh
# now use the generator:
pw_gen -l 128 -s aaaaan
-a --add Add this password to the latest.
-h --help Show this help.
-i --incognito Don't save the password for the --latest option.
-l --length The number of characters, the password should contain. (Default: 16)
--latest Show the latest password generated.
-s --source What type of characters should be used. (Default: aAns)
a = lowercased letters
A = uppercased letters
n = numbers
s = symbols ("',;.:-_#+*!$%&/^()=?@[]|{}~)
S = symbols without quotes (,;.:-_#+*!$%&/^()=?@[]|{}~)
-S --silent Make no output.
-v --version Show the version number.
-q --addquiet Same as --add but show only the new password.
Passwords.textexpander
and make sure the path to password_generator.plugin.zsh
~/.oh-my-zsh/custom/plugins/password_generator/password_generator.plugin.zsh
Passwords.textexpander
by clicking "New Group from File" in your Text expander window.#pw
somewhere and feel the magique.#pw
: A 16 characters long random string containing letters, numbersUIns3hIY;ia5Bi0K
)#lpw
: The latest Password AGAINUIns3hIY;ia5Bi0K
)#pwa
: 16 characters, AlphaBmGPmUPnaGZLmbsw
)#pwan
: 16 characters, AlphanumericD109toUBL6G277vA
)#pwn
: 16 numbers6927410783901882
)#pwl
: 64 characters, Alphanumeric + symbolsZzrKPf),Sc:cMeTq?%1lt,#f1AAbbvNKwZz;/qO7b8;xQmFGn,8:Jo.*a5lG.'XB
)#pwla
: 64 characters, AlphaJfSmspyFnNjjHKjSJQPdCtRcLVJNQkAypMrZiOVDshBffHXVGGNOWWguqrnaDWub
)#pwlan
: 64 characters, AlphaNumericvJQJfRD22z5wsBObCgRGrNfngg95jfTKHwcOVAjEGmzODLKR4TaEo0OlRPHMUWo3
)#pwln
: 64 numbers0646076676380719164741029151451960033091014516155374845683965847
)If you switch #
to +
the current password will be added to the one recently
saved. (Normally it is overwritten.)
So if you need a 32 characters long random string, just type #pw +pw
.
The result should be like ('zPki40V2Eiv=D:^wgk^xNBqo@3/klyq
) ...nothing fancy...
BUT: if you type #lpw
now, it's ('zPki40V2Eiv=D:^wgk^xNBqo@3/klyq
), too YAY!
Copyright (c) 2013 Hannes Diercks [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.