Last active
December 15, 2018 15:04
-
-
Save maqp/45462de93334398f4f294c154d9af5b0 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
create_install_dir () { | |
if [ -d "$HOME/stemtest" ]; then | |
mv $HOME/stemtest stemtest_backup_at_$(date +%Y-%m-%d_%H-%M-%S) | |
fi | |
mkdir -p $HOME/stemtest 2>/dev/null | |
} | |
# Install dependencies | |
sudo apt update | |
sudo apt install automake build-essential git libevent-dev libssl-dev zlib1g zlib1g-dev python3-pip -y | |
python3.6 -m pip install virtualenv | |
cd $HOME | |
create_install_dir | |
cd stemtest | |
# Compile Tor from source | |
git clone https://git.torproject.org/tor.git | |
cd tor | |
git checkout 69264f96f3561c72d14c1e518ca84ad18557d905 . # Works | |
#git checkout 94a79981580d6260597f799bc1a163c8e6f07acd . # Does not work | |
./autogen.sh | |
./configure --disable-asciidoc --prefix=/usr/local/tor --with-openssl-dir=/usr/local/ssl --with-libevent-dir=/usr/local/lib && make && make check | |
# Create virtual environment | |
cd .. | |
python3.6 -m virtualenv --system-site-packages venv_stemtest | |
. $HOME/stemtest/venv_stemtest/bin/activate | |
python3.6 -m pip install stem | |
# Download and run test script | |
wget https://gist.githubusercontent.com/maqp/50a736ce509e066b5f43523b68d2b703/raw/1b20ed52822499174c2758c89c075a767cac1b69/v3_onion_test.py | |
python3.6 v3_onion_test.py | |
deactivate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment