Skip to content

Instantly share code, notes, and snippets.

@jviveiros
Last active March 30, 2018 22:51
Show Gist options
  • Save jviveiros/e51afa4f8f448dca5b5196d3aa5313d0 to your computer and use it in GitHub Desktop.
Save jviveiros/e51afa4f8f448dca5b5196d3aa5313d0 to your computer and use it in GitHub Desktop.
Python Example
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