diff options
| -rw-r--r-- | dns_spoofing.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/dns_spoofing.py b/dns_spoofing.py new file mode 100644 index 0000000..f59cc30 --- /dev/null +++ b/dns_spoofing.py @@ -0,0 +1,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 + |
