aboutsummaryrefslogtreecommitdiffstats
path: root/examples/sslstrip.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sslstrip.py')
-rw-r--r--examples/sslstrip.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/sslstrip.py b/examples/sslstrip.py
index b5e46397..9a090c0c 100644
--- a/examples/sslstrip.py
+++ b/examples/sslstrip.py
@@ -17,6 +17,11 @@ def request(flow):
flow.request.scheme = 'https'
flow.request.port = 443
+ # We need to update the request destination to whatever is specified in the host header:
+ # Having no TLS Server Name Indication from the client and just an IP address as request.host
+ # in transparent mode, TLS server name certificate validation would fail.
+ flow.request.host = flow.request.pretty_host
+
def response(flow):
flow.response.headers.pop('Strict-Transport-Security', None)