Skip to content

Instantly share code, notes, and snippets.

@human-inhabitant
Last active November 2, 2020 03:27
Show Gist options
  • Save human-inhabitant/6100969532042bfd29eb325c180b9cc9 to your computer and use it in GitHub Desktop.
Save human-inhabitant/6100969532042bfd29eb325c180b9cc9 to your computer and use it in GitHub Desktop.
Linux (64bit): Get/Validate TorBrowser
#!/bin/bash
# Get tor-browser for Linux 64bit
# Cuz I am lazy...
#
# @version 0.6.7
# @param version (Not required but suggested...)
# @param key (Not required today... but possibly tomorrow...)
#
# Change Log:
# 0.6.9 - Updated default version.
# 0.6.8 - Updated default version.
# 0.6.7 - Fix typo.
# 0.6.6 - Updated default version.
# 0.6.5 - Drop wget for curl.
# Some parameters/static options...
VERSION=${1:-10.0.2}
KEY=${2:-0xEF6E286DDA85EA2A4BA7DE684E2C6E8793298290}
TORDIR=.tor
TORPATH="https://dist.torproject.org/torbrowser/${VERSION}/tor-browser-linux64-${VERSION}_en-US.tar.xz"
SIGNATURE="${TORPATH}.asc"
# Make/move to working directory...
[ -d $TORDIR ] || mkdir -p $TORDIR &&
cd $TORDIR &&
echo -e "\nMoved to ${TORDIR}...\n" &&
# Attempt to download files...
curl -O $TORPATH &&
curl -O $SIGNATURE &&
echo -e "\nAttempt to download is complete...\n" &&
# Verify download...
# https://support.torproject.org/tbb/how-to-verify-signature/
echo -e "\nVerifying...\n" &&
gpg --auto-key-locate nodefault,wkd --locate-keys torbrowser@torproject.org &&
gpg --yes --output ./tor.keyring --export ${KEY} &&
gpgv --keyring ./tor.keyring tor-browser-linux64-${VERSION}_en-US.tar.xz{.asc,} &&
# I am out...
echo -e "\nCompleted..." && exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment