Skip to content

Instantly share code, notes, and snippets.

@mniak
Created January 19, 2022 17:36
Show Gist options
  • Save mniak/41fc963cce53ce3e6ffbc6aad4ea65e0 to your computer and use it in GitHub Desktop.
Save mniak/41fc963cce53ce3e6ffbc6aad4ea65e0 to your computer and use it in GitHub Desktop.
import json
def modify(content):
content["Injected"] = "Luidna"
return content
def request(flow):
if flow.request and flow.request.content:
content = json.loads(flow.request.content)
new_content = modify(content)
flow.request.content = json.dumps(new_content).encode()
#!/bin/bash
mitmproxy -s change-request.py --listen-port 8081 --mode reverse:http://localhost:55002
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment