如何使用mitmproxy在请求中编辑protobuf

时间:2019-12-17 21:42:37

标签: python encoding protocol-buffers mitmproxy

我不确定如何使用mitmproxy在请求中更改protobuf数据。我只有几天使用Charles和mitmproxy之类的工具的经验。我只需要更改protobuf数据的一个值即可。我将如何去做?到目前为止我有这个

def request(self, flow: HTTPFlow):
    if flowfilter.match(self.filter, flow):
        ctx.log.alert(flow.request.path)
        # print(assemble_request(flow.request).decode('utf-8'))
        body = assemble_body(flow.request.data.headers, flow.request.data.content)
        print(bytes(body))

        ctx.log.alert('\n')

不太确定我的方向是否正确

0 个答案:

没有答案