mtmproxy http在脚本中获取请求

时间:2019-03-08 15:37:11

标签: python mitmproxy

如何在响应中发送http请求(脚本)

class Intercept:
    def response(self, flow: HTTPFlow):
        t_id = flow.request.query.get('task_id')
        if not t_id:
            return

        rsp = requests.get(
            'https://example.com/v1/tasks', {'task_id': t_id})

        data = rsp.json()


addons = [
    Intercept()
]

此代码阻止mitmproxy响应

0 个答案:

没有答案