From 6f94e8538f76523a864dbd54f667b0f709945b64 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 15 Apr 2020 11:33:26 +0530 Subject: [PATCH 1/2] add message to mitmdump --- mitmproxy/tools/_main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mitmproxy/tools/_main.py b/mitmproxy/tools/_main.py index c1dd61795..e0424adb0 100644 --- a/mitmproxy/tools/_main.py +++ b/mitmproxy/tools/_main.py @@ -154,6 +154,7 @@ def mitmdump(args=None) -> typing.Optional[int]: # pragma: no cover def extra(args): if args.filter_args: v = " ".join(args.filter_args) + print(f"Only processing flows that match {v!r}") return dict( save_stream_filter=v, readfile_filter=v, From d8eec07c5e72646432bb1fd2ddcca8a05728a8f8 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 16 Apr 2020 11:23:01 +0530 Subject: [PATCH 2/2] add message to log --- mitmproxy/tools/_main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mitmproxy/tools/_main.py b/mitmproxy/tools/_main.py index e0424adb0..23eb39f00 100644 --- a/mitmproxy/tools/_main.py +++ b/mitmproxy/tools/_main.py @@ -110,6 +110,8 @@ def run( master.commands.dump() sys.exit(0) if extra: + if(args.filter_args): + master.log.info(f"Only processing flows that match \"{' & '.join(args.filter_args)}\"") opts.update(**extra(args)) loop = asyncio.get_event_loop() @@ -154,7 +156,6 @@ def mitmdump(args=None) -> typing.Optional[int]: # pragma: no cover def extra(args): if args.filter_args: v = " ".join(args.filter_args) - print(f"Only processing flows that match {v!r}") return dict( save_stream_filter=v, readfile_filter=v,