diff --git a/dot_local/bin/executable_genpass b/dot_local/bin/executable_genpass index 52cc23c..726ed6d 100644 --- a/dot_local/bin/executable_genpass +++ b/dot_local/bin/executable_genpass @@ -14,6 +14,8 @@ Generate random password from /dev/urandom using the character set chosen Option (pick one character set):" local help_options="\t\-a ,\--all\ all printable characters, not including space \t\-lt ,\--limited\ all except special characters [A-Za-z0-9%+,-./:=@^_] + \t\-b32 ,\--base32\ all valid base32 characters [A-Z2-7=] + \t\-b64 ,\--base64\ all valid base64 characters [A-Za-z0-9+/] \t\-an ,\--alphanumeric\ letters and digits \t\-al ,\--alpha\ letters \t\-u ,\--upper\ upper case letters @@ -55,42 +57,42 @@ key="$1" case $key in -a|--all) - all="true" characters="[:graph:]" shift ;; -lt|--limited) - special="true" characters="A-Za-z0-9%+,-./:=@^_" shift ;; + -b32|--base32) + characters="A-Z2-7=" + shift + ;; + -b64|--base64) + characters="A-Za-z0-9+/" + shift + ;; -an|--alphanumeric) - alphanumeric="true" characters="[:alnum:]" shift ;; -al|--alpha) - alpha="true" characters="[:alpha:]" shift ;; -u|--upper) - upper="true" characters="[:upper:]" shift ;; -l|--lower) - lower="true" characters="[:lower:]" shift ;; -n|--numeric) - numeric="true" characters="[:digit:]" shift ;; -h|--hex) - hex="true" characters="0-9a-f" shift ;;