Video Content
- Welcome to the mitmproxy tutorial. In this lesson we cover the interception of requests.
- We first need to configure mitmproxy to intercept requests.
- Press
ito prepopulate mitmproxy’s command prompt withset intercept ''.
- We use the flow filter expression
~u <regex>to only intercept specific URLs.
- Additionally, we use the filter
~qto only intercept requests, but not responses.
- We combine both flow filters using
&.
- Enter
~u /Dunedin & ~qbetween the quotes of theset interceptcommand and pressENTER.
- The bottom bar shows that the interception has been configured.
- Let’s generate a request using
curlin a separate terminal.
- You see a new line in in the list of flows.
- The new flow is displayed in red to indicate that it has been intercepted.
- Put the focus (
>>) on the intercepted flow. This is already the case in our example.
- Press
ato resume this flow without making any changes.
- Submit another request and focus its flow.
- Press
Xto kill this flow, i.e., discard it without forwarding it to its final destinationwttr.in.
- In the next lesson you will learn to modify intercepted flows.