From b7ca2012f951ec783d3c3c4ec16bde3276004de9 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Mon, 18 Jun 2018 22:06:06 +0200 Subject: lets not print a header if we dont have a wordlist --- bin/bin/makepass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/bin/makepass b/bin/bin/makepass index 180271e..4aa05cd 100755 --- a/bin/bin/makepass +++ b/bin/bin/makepass @@ -36,10 +36,11 @@ function makepass { [ "$1" = "" ] && l=$(shuf -i 16-64 -n 1) < /dev/urandom tr -dc '!#$%&/()=?+-_,.;:<>[]{}|\@*^A-Z-a-z-0-9' | head -c${1:-$l};echo; done | column - echo "" - echo "Passphrases:" if [ -r "${MAKEPASS_WORDLIST}" ]; then + echo "" + echo "Passphrases:" + for i in {1..5}; do words=$(shuf -n 8 "${MAKEPASS_WORDLIST}" | tr '\n' '-' | tr -dc '_A-Z-a-z-0-9') echo "${words:0:-1}" -- cgit v1.2.3