mitmproxy --ignore ws.sitesupport.net:443 -s script.py
from mitmproxy.script import concurrent
OLD = """var totalExpGems=0;"""
NEW = """var totalExpGems=0;debugger;"""
@concurrent
def response(flow):
if "gem_finder" in flow.request.path:
flow.response.headers["XX"] = "PATCHED"
body = flow.response.content.decode("utf-8")
if OLD in body:
flow.response.content = body.replace(OLD, NEW).encode("utf-8")
flow.response.headers["XXX"] = "PATCHED"
No comments:
Post a Comment