aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2018-06-18 22:06:06 +0200
committerDennis Eriksen <d@ennis.no>2018-06-18 22:06:06 +0200
commitb7ca2012f951ec783d3c3c4ec16bde3276004de9 (patch)
tree0fc30a312f88e54416b04740ff70285320927f57
parentadding some columns (diff)
downloadmakepass-b7ca2012f951ec783d3c3c4ec16bde3276004de9.tar.gz
lets not print a header if we dont have a wordlist
-rwxr-xr-xbin/bin/makepass5
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}"