Last active
August 16, 2017 19:28
-
-
Save jamiehoward/458c3445fab8873439f27645b9dfb414 to your computer and use it in GitHub Desktop.
Search a file or directory for known Tor exit node IP addresses
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
#!/bin/sh | |
cp tor-search.sh /usr/local/bin/tor-search | |
chmod +x /usr/local/bin/tor-search |
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
#!/bin/sh | |
echo "--- Downloading latest list of Tor exit nodes...\r\n" | |
wget "https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=1.1.2.1" -O tor.txt | |
echo "--- Cleaning up the acquired list..." | |
sed -i '' '/\#/d' ./tor.txt | |
echo "--- Searching file for IP addresses of known Tor exit nodes..." | |
timestamp=$(date +%s) | |
grep -r --file tor.txt $@ > tor-search-$timestamp.txt | |
echo "--- Removing tor list..." | |
rm tor.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment