diff --git a/tools/gen-auth b/tools/gen-auth index ea4ada0..2d27c70 100644 --- a/tools/gen-auth +++ b/tools/gen-auth @@ -3,19 +3,19 @@ set -e -GREEN='\033[0;32m' -BLUE='\033[0;34m' -YELLOW='\033[1;33m' -CYAN='\033[0;36m' -BOLD='\033[1m' -NC='\033[0m' +GREEN=$(printf '\033[0;32m') +BLUE=$(printf '\033[0;34m') +YELLOW=$(printf '\033[1;33m') +CYAN=$(printf '\033[0;36m') +BOLD=$(printf '\033[1m') +NC=$(printf '\033[0m') PASS=$(head -c 24 /dev/urandom | base64 | tr -d '\n') HASH=$(tor --hash-password "$PASS") echo "" echo "${CYAN}╔════════════════════════════════════════════════════════════╗${NC}" -echo "${CYAN}║${NC} ${BOLD}Tor Control Port Authentication Generator${NC} ${CYAN}║${NC}" +echo "${CYAN}║${NC} ${BOLD}Tor Control Port Authentication Generator${NC} ${CYAN}║${NC}" echo "${CYAN}╚════════════════════════════════════════════════════════════╝${NC}" echo "" echo "${GREEN}✓${NC} Generated secure 32-character password"