Created
November 5, 2020 05:25
-
-
Save tacahiroy/9747823051490e45381bc92f8daa9858 to your computer and use it in GitHub Desktop.
Get something using HTTPS with Basic auth via SOCKS5 proxy in Python 3.x
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
import sys | |
import requests | |
if __name__ == "__main__": | |
res = requests.get( | |
"https://foo.local/", | |
auth=("user", "password"), | |
proxies={ | |
"http": "socks5h://host:port", | |
"https": "socks5h://host:port", | |
}, | |
) | |
print(res.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment