mitmdump替换模式构造 [英] mitmdump replacement pattern construction

查看:149
本文介绍了mitmdump替换模式构造的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在mitmdump中指定替换项,但是在正确使用语法时遇到了麻烦.我想做的是用固定的字符串替换请求中的整个路径.

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.

我尝试了-R:〜bq:/*:/example.html,但结果为无效的过滤器模式:〜bq"

I've tried -R :~bq:/*:/example.html but that results in "Invalid filter pattern: ~bq"

有指针吗?

推荐答案

尝试使用~q而不是~bq作为过滤器模式.因为~bq需要像~bq regex这样的正则表达式本身.错误无效的过滤器模式"是由于在正则表达式部分使用〜bq引起的.

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.

更多详细信息 https://github.com/mitmproxy/mitmproxy/pull/2589#issuecomment-340426254

这篇关于mitmdump替换模式构造的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆