mitmproxy/examples/addons/internet-in-mirror.py
Maximilian Hils 805aed4f6a docs++
2021-02-13 00:13:37 +01:00

15 lines
352 B
Python

"""
Mirror all web pages.
Useful if you are living down under.
"""
from mitmproxy import http
def response(flow: http.HTTPFlow) -> None:
if flow.response and flow.response.content:
flow.response.content = flow.response.content.replace(
b"</head>",
b"<style>body {transform: scaleX(-1);}</style></head>"
)