%PDF- %PDF-
Direktori : /proc/309157/task/309157/root/usr/share/doc/mitmproxy/examples/addons/ |
Current File : //proc/309157/task/309157/root/usr/share/doc/mitmproxy/examples/addons/anatomy.py |
""" Basic skeleton of a mitmproxy addon. Run as follows: mitmproxy -s anatomy.py """ from mitmproxy import ctx class Counter: def __init__(self): self.num = 0 def request(self, flow): self.num = self.num + 1 ctx.log.info("We've seen %d flows" % self.num) addons = [ Counter() ]