i want to intercept requests using mitmproxy, but response is encode with grpc, this is my current code :
from mitmproxy import http
from mitmproxy import ctx
class TestProxy:
following = "Search"
def response(self, flow: http.HTTPFlow) -> None:
if (self.following in flow.request.pretty_url):
print(flow.request.pretty_url)
#bytes.fromhex(flow.response.content).decode('utf-8')
pass
addons = [TestProxy()]
i want to decode the flow.response.content
, i tried using bytes.fromhex and more, without success.
How i can decode grpc response ?