diff options
author | Aldo Cortesi <aldo@corte.si> | 2016-06-14 16:29:15 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-14 16:29:15 +1200 |
commit | 93276d45be68790b5f4aeb4577c380ca1608efb3 (patch) | |
tree | 9553d0f45e705da04bfa4be8dd5e39d09fcd112f /examples/filt.py | |
parent | 4c292b0197d820e9e108aa05b10927107a0503c3 (diff) | |
parent | d8ae2f156203a81a8e6d325f5c460c351cfbfc5c (diff) | |
download | mitmproxy-93276d45be68790b5f4aeb4577c380ca1608efb3.tar.gz mitmproxy-93276d45be68790b5f4aeb4577c380ca1608efb3.tar.bz2 mitmproxy-93276d45be68790b5f4aeb4577c380ca1608efb3.zip |
Merge branch 'master' into netlibrace
Diffstat (limited to 'examples/filt.py')
-rw-r--r-- | examples/filt.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/filt.py b/examples/filt.py index f99b675c..1a423845 100644 --- a/examples/filt.py +++ b/examples/filt.py @@ -1,13 +1,13 @@ # This scripts demonstrates how to use mitmproxy's filter pattern in inline scripts. # Usage: mitmdump -s "filt.py FILTER" - +import sys from mitmproxy import filt -def start(context, argv): - if len(argv) != 2: +def start(context): + if len(sys.argv) != 2: raise ValueError("Usage: -s 'filt.py FILTER'") - context.filter = filt.parse(argv[1]) + context.filter = filt.parse(sys.argv[1]) def response(context, flow): |