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 fi
# Create HashedControlPassword # Create HashedControlPassword
printf "In the next step you'll choose a password. NOTE: It will be saved in PLAIN TEXT.\n" torcontrolpass=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 24 | head -n 1)
read -p "Enter a (new) tor control password [example: 123123] " torcontrolpass
# Edit /etc/tor/torrc # Edit /etc/tor/torrc
torhashedpass=$(tor --hash-password $torcontrolpass) torhashedpass=$(tor --hash-password $torcontrolpass)
enabledcontrol=$(echo "ControlPort 9051") enabledcontrol=$(echo "ControlPort 9051")