From 4cbbd7caec3a9e1ed5324e75df3c0da25e33d93b Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 4 May 2021 20:08:34 +0200 Subject: passwort-tresor.in: extend alphabet to all printable ASCII --- passwort-tresor.in | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/passwort-tresor.in b/passwort-tresor.in index c64aa02..024eb31 100644 --- a/passwort-tresor.in +++ b/passwort-tresor.in @@ -164,9 +164,16 @@ then fi else pw1=$( - head -c ${pwLen} /dev/urandom | \ - base64 | \ - head -c ${pwLen} + printf '%s\n' {0..1}{0..7}{0..7} \ + | sed ' + 1,33d + $d + ' \ + | while read -r s; do + printf '\'"$s"'\n' + done \ + | shuf -n ${pwLen} --random-source=/dev/urandom -r \ + | tr -d '\n' ) fi fi -- cgit v1.2.3-54-g00ecf