Tor can spoof its IP address to another address. This is very well done and has been abused for crimes. Sadly, the Japanese police can almost certainly not find the criminal if the only clue is the IP address. Criminals who have been using Tor these days have often been arrested, but they probably found clues outside of their IP addresses.
Mac people You can install it from HomeBrew.
brew install tor
HomeBrew installation command
usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
tor
If you can start 100%, go to the terminal
Xxx XX XX:XX:XX.XXX [notice] Bootstrapped 100%: Done
Is displayed (X is a letter or number)
Once started, Tor can be used by connecting from socks: localhost: 9050. In Python, PySocks is used because it cannot be specified only with urllib2. The installation command is
pip install PySocks
# or
sudo easy_install PySocks
Code when used from Python
import urllib2, socket, socks
class Tor:
def __init__(self):
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, '127.0.0.1', 9050)
socket.socket = socks.socksocket
def test(self):
return urllib2.urlopen("https://api.ipify.org?format=json").read()
if __name__ == "__main__":
Tor = Tor()
ip = Tor.test()
print ip #The IP address via Tor is displayed.
Recommended Posts