Last active
April 26, 2018 22:50
-
-
Save maqp/5ea6cf41a836c290b22ec302213d8a00 to your computer and use it in GitHub Desktop.
stemtest.sh
This file contains 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 | |
sudo apt install automake build-essential git libevent-dev libssl-dev zlib1g zlib1g-dev -y # Tor dependencies | |
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 | |
} | |
cd $HOME | |
create_install_dir | |
cd stemtest | |
git clone https://git.torproject.org/tor.git | |
cd tor | |
# Choose Tor commit to use | |
git reset --hard ed89bb32535fbf354b406a36f3176380a4e226bf # Works | |
#git reset --hard a4fcdc5decfe60bbd95aee2e5586e90c40b73225 # Does not work | |
# Compile Tor from source | |
./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 | |
# Install Stem dev-build | |
python3.6 -m pip install testresources | |
python3.6 -m pip install git+https://git.torproject.org/stem.git --upgrade | |
# Download test script | |
wget https://gist.githubusercontent.com/maqp/bf2d14ec625556997ae075d2084b4a4c/raw/6a4353336a76350b7511bd65dcc6183efb6bf215/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