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
i
to 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
~q
to only intercept requests, but not responses.
- We combine both flow filters using
&
.
- Enter
~u /Dunedin & ~q
between the quotes of theset intercept
command and pressENTER
.
- The bottom bar shows that the interception has been configured.
- Let’s generate a request using
curl
in 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
a
to resume this flow without making any changes.
- Submit another request and focus its flow.
- Press
X
to 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.