Created
October 1, 2018 05:20
-
-
Save hyuunnn/20519e551971afbf417791111b950121 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
# root$ tor | |
# Oct 01 13:57:48.308 [notice] Opening Socks listener on 127.0.0.1:9050 | |
import requests | |
proxies = { | |
'http': 'socks5h://localhost:9050', | |
'https': 'socks5h://localhost:9050' | |
} | |
def main(): | |
url = 'http://httpbin.org/ip' | |
response = requests.get(url, proxies=proxies) | |
print(response.text) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment