Skip to content

Instantly share code, notes, and snippets.

@kleo
Created December 4, 2020 06:26
Show Gist options
  • Select an option

  • Save kleo/07b9b3f2e42c3271f6866933e2f9dd19 to your computer and use it in GitHub Desktop.

Select an option

Save kleo/07b9b3f2e42c3271f6866933e2f9dd19 to your computer and use it in GitHub Desktop.
Simple addon to check if script is running on Tor
#!/bin/bash
# alias foo='torsocks script.sh'
curl -s https://check.torproject.org | sed '/<!doctype/d' | sed '/&raquo/d' | xmlstarlet sel -t -v '//html/body/div[2]/h1' | tr -d '\n' | awk '{$1=$1};1'
echo
curl https://ipv4.icanhazip.com
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment