mitmdump replacement pattern construction

佐手、 提交于 2020-01-16 11:39:05

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!