diff --git a/append.bash b/append.bash index dcae8c2..b47409f 100644 --- a/append.bash +++ b/append.bash @@ -73,7 +73,10 @@ cmd_append_append() { # 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:]') + new_password_words=$(cat /usr/share/dict/words | sed "s|'s||g" | shuf -n4 | sed -z 's/\n/-/g;s/-$/\n/' | tr '[:upper:]' '[:lower:]') + new_password_num=$(shuf -i 1-100 -n 1) + new_password_symbol=$(echo '!@#$%*()' | fold -w1 | shuf -n1) + new_password=$new_password_words$new_password_symbol$new_password_num printf "$new_password" | xclip -sel clip echo "Copied new password to clipboard: " echo "$new_password"