Last active
March 30, 2018 22:51
-
-
Save jviveiros/e51afa4f8f448dca5b5196d3aa5313d0 to your computer and use it in GitHub Desktop.
Python Example
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 os | |
import requests | |
username = os.environ.get('FORWARD_HTTP_PROXY_USERNAME') | |
password = os.environ.get('FORWARD_HTTP_PROXY_PASSWORD') | |
forward_proxy = os.environ.get('FORWARD_HTTP_PROXY_HOST') | |
reverse_proxy = os.environ.get('REVERSE_HTTP_PROXY_HOST') | |
def reveal_via_forward_proxy(tokenized_data): | |
r = requests.post( | |
'https://httpbin.verygoodsecurity.io/post', | |
data=tokenized_data, | |
headers={"Content-type": "application/json", "VGS-Log-Request": "all"}, | |
proxies={ | |
"https": "https://{}:{}@{}".format(username, password, forward_proxy) | |
}, | |
verify='cert.pem' | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment