From b5daafb5187144252e0a21a895b0afbca916ba74 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Fri, 25 Nov 2016 21:59:13 +0100 Subject: [PATCH] improve mitmdump filter help --- mitmproxy/tools/cmdline.py | 9 ++++++++- mitmproxy/tools/main.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/mitmproxy/tools/cmdline.py b/mitmproxy/tools/cmdline.py index 947a522cc..f8246199c 100644 --- a/mitmproxy/tools/cmdline.py +++ b/mitmproxy/tools/cmdline.py @@ -850,7 +850,14 @@ def mitmdump(): action="count", dest="flow_detail", default=1, help="Increase flow detail display level. Can be passed multiple times." ) - parser.add_argument('args', nargs="...") + parser.add_argument( + 'filter', + nargs="...", + help=""" + Filter view expression, used to only show flows that match a certain filter. + See help in mitmproxy for filter expression syntax. + """ + ) return parser diff --git a/mitmproxy/tools/main.py b/mitmproxy/tools/main.py index d276944d9..c3b1e3a9e 100644 --- a/mitmproxy/tools/main.py +++ b/mitmproxy/tools/main.py @@ -101,7 +101,7 @@ def mitmdump(args=None): # pragma: no cover dump_options = dump.Options(**cmdline.get_common_options(args)) dump_options.flow_detail = args.flow_detail dump_options.keepserving = args.keepserving - dump_options.filtstr = " ".join(args.args) if args.args else None + dump_options.filtstr = " ".join(args.filter) if args.filter else None server = process_options(parser, dump_options, args) master = dump.DumpMaster(dump_options, server)