Skip to content

Instantly share code, notes, and snippets.

@tlansec
Created March 13, 2023 13:58
Show Gist options
  • Save tlansec/ed05d8f3c6a620d11fde33b435a7598c to your computer and use it in GitHub Desktop.
Save tlansec/ed05d8f3c6a620d11fde33b435a7598c to your computer and use it in GitHub Desktop.
Domain fronting example
import requests
r = {
'url':'https://pypi.python.org',
'method' : "GET",
"headers" : {
"Host" : "totally-python.org",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36"
},
"verify" : True
}
r = requests.request(**r)
print(r.content)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment