R
R
Rozello2020-09-03 14:56:51
Python
Rozello, 2020-09-03 14:56:51

How to repeat the request by the addon for mitmproxy if the response to the request received a 404 code?

There is a set of servers behind a load balancer (which works according to the round-robin algorithm).
All servers except one always respond to a 404 request.

Therefore, I would like to write a script for mitmproxy that would repeat this request until a response other than 404 is received, but no more than 10 times, or repeat the request if the response matches the regular expression.

While trying to implement this, I came across this thread on github , tried to make a code similar to the one indicated in the last message, but the result does not work, saying that the duplicate_flow method is missing.
If there are other options as it would be possible to solve this problem - write too.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question