-
-
Save pilgrim2go/dd6dc65a2855bd966f306ae6f92c1969 to your computer and use it in GitHub Desktop.
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
sudo apt-get install tor | |
# check tor service running on port 9050 (ss -aln | grep 9050) | |
# change ip after every 10 sec | |
edit vi /etc/tor/torrc and add MaxCircuitDirtiness 10 | |
# use tor proxy in python request | |
install requests==2.10.0 (pip install requests==2.10.0) (currently 2.11 giving error) | |
install pysocks (pip install pysocks) | |
import requests | |
proxy={'http': 'socks5://localhost:9050'} | |
print requests.get('http://icanhazip.com', proxies=proxy).text | |
############### | |
##export all_proxy=socks://127.0.0.1:9050 | |
##export ALL_PROXY=http://127.0.0.1:9050 | |
##export http_proxy=socks://127.0.0.1:9050 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment