Mitmproxy 常用response/request 方法参数
针对http,常用的API addons-examples: https://docs.mitmproxy.org/stable/addons-examples/ http/https劫持脚本开发: https://www.cnblogs.com/-wenli/p/13940591.html http.HTTPFlow 实例 flow flow.request.headers #获取所有头信息,包含Host、User-Agent、Content-type等字段 flow.request.headers[’myvalue’] = ‘value’ # 此设置在chrome调试里面看不到,<span style="color: #ff0000;">实际上是成功了的</span>! flow.request.url #完整的请求地址,包含域名及请求参数,但是不包含放在body里面的请求参数 flow.request.pretty_url #同flow.request.url目前没看出什么差别 flow.request.host #域名 flow.request.method #请求方式。POST、GET等 flow.request.scheme #什么请求 ,如https flow.request.path # 请求的路径,url除域名之外的内容 flow.request.get_text() #请求中body内容,有一些http会把请求参数放在body里面,那么可通过此方法获取,返回字典类型 flow.request.query #返回MultiDictView类型的数据,url直接带的键值参数 flow.request.query.get(’wd’) #取得请求参数wd的值 flow.request.query.keys() #取得所有请求参数 flow.request.query.set_all(key,[value]) #修改请求参数 flow.request.get_content()#bytes,结果如flow.request.get_text() flow.request.raw_content #bytes,结果如flow.request.get_content() flow.request.urlencoded_form #MultiDictView,content-type:application/x-www-form-urlencoded时的请求参数,不包含url直接带的键值参数 flow.request.multipart_form… Read More »