diff options
author | Dennis Eriksen <d@ennis.no> | 2018-06-18 22:06:06 +0200 |
---|---|---|
committer | Dennis Eriksen <d@ennis.no> | 2018-06-18 22:06:06 +0200 |
commit | b7ca2012f951ec783d3c3c4ec16bde3276004de9 (patch) | |
tree | 0fc30a312f88e54416b04740ff70285320927f57 | |
parent | adding some columns (diff) | |
download | makepass-b7ca2012f951ec783d3c3c4ec16bde3276004de9.tar.gz |
lets not print a header if we dont have a wordlist
-rwxr-xr-x | bin/bin/makepass | 5 |
1 files 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}" |