0

I need to modify all outgoing HTTP requests from my browser on fly.

1) Is there some python package I can use for the same? I am able to capture the outgoing requests using scapy, but not able to modify on the fly.

2) Can I modify the outgoing HTTP request in chrome extension? Do Chrome provide some API that can help?

tarun14110
  • 940
  • 5
  • 26
  • 57
  • 1
    Checking this [SO post](https://stackoverflow.com/questions/3274144/can-i-modify-outgoing-request-headers-with-a-chrome-extension), it is mentioned in the answer that this was supported. You can visit the documentation for [chrome.webRequest](https://developer.chrome.com/extensions/webRequest). – MαπμQμαπkγVπ.0 Jun 08 '18 at 09:50

1 Answers1

2

You can set your browser's proxy to mitmproxy and use mitmproxy scripting to modify the output traffic.

You do not need Chrome extension to achieve that. You can load your own script.py like this:

mitmdump -s your_script.py

There are lots of examples your can check from mitmproxy GitHub page.

einverne
  • 6,454
  • 6
  • 45
  • 91