tDisable globbing feature in shell scripts - hashcrush - Compute Argon2id hashes
(HTM) git clone git://git.z3bra.org/hashcrush.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit 2ad2869fd06f97840cbb22c8dd211b36c3650d69
(DIR) parent e53c3e6319c0e856120980bcecc9e7b05cf37b62
(HTM) Author: Willy Goiffon <contact@z3bra.org>
Date: Thu, 17 Aug 2023 18:09:02 +0200
Disable globbing feature in shell scripts
Diffstat:
M tools/diceware | 2 ++
M tools/hashdump | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/tools/diceware b/tools/diceware
t@@ -1,5 +1,7 @@
#!/bin/sh
+set -o noglob
+
usage() {
echo "usage: $(basename $0) -f wordlist [-c count]"
}
(DIR) diff --git a/tools/hashdump b/tools/hashdump
t@@ -1,4 +1,7 @@
#!/bin/sh
+
+set -o noglob
+
while read PASS; do
# Argon2id / SHA256; comment out one
HASH=$(./tools/hashgen -p "$PASS")