Created
January 31, 2016 19:43
-
-
Save binkybear/b1d8fec196b60f7bd177 to your computer and use it in GitHub Desktop.
Quick bash script for TOR/privoxy set up
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Quickly get TOR/privoxy running with python modifiable python script to change IP every 10 seconds | |
# See https://github.com/FrackingAnalysis/PyTorStemPrivoxy for more details | |
# | |
echo "Downloading prerequisites" | |
apt-get install -y tor privoxy python-stem wget | |
echo "Setting up privoxy" | |
# Setup privoxy to listen on 127.0.0.1 instead of localhost (can lead to ipv6 errors) | |
# Also forward to torrc | |
echo "forward-socks5 / 127.0.0.1:9050 ." >> /etc/privoxy/config | |
sed -i 's/listen-address localhost:8118/listen-address 127.0.0.1:8118/g' /etc/privoxy/config | |
# Generate password | |
read -p "Enter your super secret password: " PASSWORD | |
# Enable TORRC to listen on 9051 with your hashed password | |
HASHED_PASS=$(tor --hash-password PASSWORD | grep 16) | |
sed -i 's/#ControlPort 9051/ControlPort 9051/g' /etc/tor/torrc | |
sed -i 's/#HashedControlPassword 16:872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053EC4C/HashedControlPassword $HASHED_PASS/g' /etc/tor/torrc | |
# Restart services | |
/etc/init.d/tor restart | |
/etc/init.d/privoxy restart | |
cd /opt | |
wget https://raw.githubusercontent.com/FrackingAnalysis/PyTorStemPrivoxy/master/PyTorStemPrivoxy.py | |
sed -i 's/'my_password'/'$PASSWORD'/g' PyTorStemPrivoxy.py | |
echo "Run: python PyTorStemPrivoxy.py" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment