Created
February 23, 2015 03:46
-
-
Save khws4v1/846dec102c45adcff512 to your computer and use it in GitHub Desktop.
Torの出口ノードのIPアドレスを表示するシェルスクリプト
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 | |
# Get tor exit address | |
data=`curl -s https://check.torproject.org/exit-addresses` | |
if [ $? -ne 0 ]; then | |
echo "Cannot get address." | |
exit 1 | |
fi | |
echo "${data}" | grep "ExitAddress" | while read line | |
do | |
ip=`echo "${line}" | sed -e "s/^ExitAddress \([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*/\1/g"` | |
echo "${ip}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment