blob: f59cc30083d36c57cee5f1d1a6f5fba1408d4953 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
"""
Usage:
mitmproxy
-p 443
-s dns_spoofing.py
-R http://localhost:8000
"""
def request(flow):
flow.request.scheme = "http"
sni = flow.client_conn.connection.get_servername()
if sni == b"ws.audioscrobbler.com":
flow.request.port = 3001
else:
flow.request.port = 8000
|