Merge pull request #1792 from Kriechi/mitmdump-filter-help

improve mitmdump filter help
This commit is contained in:
Maximilian Hils 2016-11-28 02:13:39 +01:00 committed by GitHub
commit e64d2ce829
2 changed files with 9 additions and 2 deletions

View File

@ -850,7 +850,14 @@ def mitmdump():
action="count", dest="flow_detail", default=1, action="count", dest="flow_detail", default=1,
help="Increase flow detail display level. Can be passed multiple times." 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 return parser

View File

@ -101,7 +101,7 @@ def mitmdump(args=None): # pragma: no cover
dump_options = dump.Options(**cmdline.get_common_options(args)) dump_options = dump.Options(**cmdline.get_common_options(args))
dump_options.flow_detail = args.flow_detail dump_options.flow_detail = args.flow_detail
dump_options.keepserving = args.keepserving 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) server = process_options(parser, dump_options, args)
master = dump.DumpMaster(dump_options, server) master = dump.DumpMaster(dump_options, server)