diff options
author | Erich Eckner <git@eckner.net> | 2021-05-04 20:08:34 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-05-04 20:08:34 +0200 |
commit | 4cbbd7caec3a9e1ed5324e75df3c0da25e33d93b (patch) | |
tree | fc90a4ede57c9d3f87ea5eeff0283a6e2b6ab06b | |
parent | 880e7a8883bb306fe27309e297ca4fd4111716fb (diff) | |
download | passwort-tresor-4cbbd7caec3a9e1ed5324e75df3c0da25e33d93b.tar.xz |
passwort-tresor.in: extend alphabet to all printable ASCII
-rw-r--r-- | passwort-tresor.in | 13 |
1 files 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 |