aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2018-06-18 22:04:49 +0200
committerDennis Eriksen <d@ennis.no>2018-06-18 22:04:49 +0200
commit9f48d8a223a4146865a6b9fbe88aaf2d62ba61ee (patch)
treea759e14a67821fe190586aa566ae6773375181aa
parenttesting out a passphrase-generating makepass (diff)
downloadmakepass-9f48d8a223a4146865a6b9fbe88aaf2d62ba61ee.tar.gz
adding some columns
-rwxr-xr-xbin/bin/makepass15
1 files changed, 11 insertions, 4 deletions
diff --git a/bin/bin/makepass b/bin/bin/makepass
index d798b9a..180271e 100755
--- a/bin/bin/makepass
+++ b/bin/bin/makepass
@@ -24,17 +24,24 @@ function makepass {
# if $l is not a number, then exit
[[ ! $l =~ ^[0-9]+$ ]] && [[ ! "$l" == "" ]] && echo "not a number" && return 1
# if $1 is actually empty, set $l to random value for each output
+ echo "Normal passwords:"
for i in {1..10}; do
[ "$1" = "" ] && l=$(shuf -i 8-44 -n 1)
< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-$l};echo;
- done;
- for i in {1..5}; do
+ done | column
+ echo ""
+
+ echo "Passwords with special characters:"
+ for i in {1..6}; do
[ "$1" = "" ] && l=$(shuf -i 16-64 -n 1)
< /dev/urandom tr -dc '!#$%&/()=?+-_,.;:<>[]{}|\@*^A-Z-a-z-0-9' | head -c${1:-$l};echo;
- done;
+ done | column
+ echo ""
+
+ echo "Passphrases:"
if [ -r "${MAKEPASS_WORDLIST}" ]; then
for i in {1..5}; do
- words=$(shuf -n 8 "${MAKEPASS_WORDLIST}" | tr '\n' '-' | tr -dc 'A-Z-a-z-0-9')
+ words=$(shuf -n 8 "${MAKEPASS_WORDLIST}" | tr '\n' '-' | tr -dc '_A-Z-a-z-0-9')
echo "${words:0:-1}"
done;
fi