tor: autogenerate passwd

This commit is contained in:
nahuhh 2024-11-30 16:25:40 +00:00
parent 7f8b90fea4
commit 02a72d77c4

View file

@ -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")