Skip to content

Instantly share code, notes, and snippets.

@maqp
Last active June 25, 2018 06:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maqp/c2993d2abbac4989a2a100a61445d943 to your computer and use it in GitHub Desktop.
Save maqp/c2993d2abbac4989a2a100a61445d943 to your computer and use it in GitHub Desktop.
UPLOAD_REJECTED reproducer
#!/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
}
set -e
# 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
./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 and run test script
wget https://gist.githubusercontent.com/maqp/d3d0fc9efe5bb7ab18a54840f980484e/raw/98af67362e240d5522a7b62ca0f1190e09f4d2b5/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