From 02a72d77c4436606d018e3bec32a834cc95e2bdb Mon Sep 17 00:00:00 2001 From: nahuhh <50635951+nahuhh@users.noreply.github.com> Date: Sat, 30 Nov 2024 16:25:40 +0000 Subject: [PATCH] tor: autogenerate passwd --- bsx/enabletor.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bsx/enabletor.sh b/bsx/enabletor.sh index a0cf85a..4411f38 100755 --- a/bsx/enabletor.sh +++ b/bsx/enabletor.sh @@ -70,8 +70,7 @@ else fi # Create HashedControlPassword -printf "In the next step you'll choose a password. NOTE: It will be saved in PLAIN TEXT.\n" -read -p "Enter a (new) tor control password [example: 123123] " torcontrolpass +torcontrolpass=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 24 | head -n 1) # Edit /etc/tor/torrc torhashedpass=$(tor --hash-password $torcontrolpass) enabledcontrol=$(echo "ControlPort 9051")