问题
I'm trying to specify replacements in mitmdump but am having trouble getting the syntax right. What I want to do is replace the entire path in a request with a fixed string.
I've tried -R :~bq:/*:/example.html but that results in "Invalid filter pattern: ~bq"
Any pointers?
回答1:
Try to use ~q
not ~bq
as filter pattern. Because ~bq
needs regex itself like ~bq regex
. The error "Invalid filter pattern" is caused by using ~bq with regex part.
More details https://github.com/mitmproxy/mitmproxy/pull/2589#issuecomment-340426254
来源:https://stackoverflow.com/questions/58933732/mitmdump-replacement-pattern-construction