diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-11-09 13:11:31 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-11-09 13:11:31 +0100 |
commit | 2a2387fb3293bb5cd08c4e18f1d8153619c7ef3b (patch) | |
tree | 87d0c0f263438c8c98f55f3a360953815f671bcd /examples | |
parent | dc44465c9216a241246c290222ccf4aa17e9d407 (diff) | |
download | mitmproxy-2a2387fb3293bb5cd08c4e18f1d8153619c7ef3b.tar.gz mitmproxy-2a2387fb3293bb5cd08c4e18f1d8153619c7ef3b.tar.bz2 mitmproxy-2a2387fb3293bb5cd08c4e18f1d8153619c7ef3b.zip |
explain host=pretty_host assignment
Diffstat (limited to 'examples')
-rw-r--r-- | examples/sslstrip.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/sslstrip.py b/examples/sslstrip.py index 5e1eb56f..9a090c0c 100644 --- a/examples/sslstrip.py +++ b/examples/sslstrip.py @@ -16,6 +16,10 @@ def request(flow): if flow.request.pretty_host in secure_hosts: 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 |