Created
October 29, 2016 16:32
-
-
Save iammehrabalam/f0bd251b653f0b80c0e162ee5f9d1ec5 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
Thanks
We can use
privoxy
as stated https://gist.github.com/ifnull/9026823