Windows Python / Domain Fronting
Author | __Thanat0s__ |
Platform | Windows |
Language | Python |
Technique | Domain Fronting |
Code
import requests
import re
# The actual destination domain requested
destination_domain = "www.youtube.com"
# The fronting domain used in ssl
fronting_domain = "www.google.com"
# Create a session object
session = requests.Session()
# force real destination in the Host header
session.headers["Host"] = destination_domain
# Send the request to the fronting domain
response = session.get("https://" + fronting_domain, headers={'X-Originating-URL': 'https://' + destination_domain})
# Extract the title of the received page
title = re.search("<title>(.*)</title>", response.text)
print(title. Group(1))
Created
January 15, 2023
Last Revised
April 22, 2024