Commit 704adf95 by Fred Smith

optionally include symbols in passwords.

parent 9a5bb4ee
......@@ -8,6 +8,15 @@
function genpass () {
PASSLEN=${1:-10};
NUMPASS=${2:-1};
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $PASSLEN | head -n $NUMPASS
case $3 in
nosym)
CHARSET='a-zA-Z0-9';
;;
*)
CHARSET='a-zA-Z0-9!@#$%^&*()';
;;
esac
cat /dev/urandom | tr -dc $CHARSET | fold -w $PASSLEN | head -n $NUMPASS
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment