pass-append

An extension for pass
Log | Files | Refs | README | LICENSE

commit dd3297e81a5b0dc3d19b153de1103589d4da97cc
parent 0553ef84f27b75f855ba2b74d040125624b3ab79
Author: NunoSempere <nuno.sempere@protonmail.com>
Date:   Fri, 23 Jun 2023 17:44:44 +0100

new method of generating a password; 5 random words from dict.

Diffstat:
Mappend.bash | 14++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/append.bash b/append.bash @@ -64,14 +64,16 @@ cmd_append_append() { else ARGS="$@" - charstring1='"' - charstring2="\!#\$&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_\`abcdefghijklmnopqrstuvwxyz{|}~" - characters="$charstring1$charstring2" - - length=25 - read -r -n $length new_password < <(LC_ALL=C tr -dc "$characters" < /dev/urandom) + # old method of generating a password: + # charstring1='"' + # charstring2="\!#\$&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_\`abcdefghijklmnopqrstuvwxyz{|}~" + # characters="$charstring1$charstring2" + # length=25 + # read -r -n $length new_password < <(LC_ALL=C tr -dc "$characters" < /dev/urandom) + # new method: + new_password=$(cat /usr/share/dict/words | sed "s|'s||g" | shuf -n6 | sed -z 's/\n/-/g;s/-$/\n/' | tr '[:upper:]' '[:lower:]') printf "$new_password" | xclip -sel clip echo "Copied new password to clipboard: " echo "$new_password"