diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-09-29 12:46:56 +0200 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-10-03 11:45:54 +0200 |
commit | ba842489103caba2691084a1f32f3c79f8f564d6 (patch) | |
tree | 0f59f5361da6db63a28ca6830101eccf300edfad /examples/filt.py | |
parent | 611dad12a7a94fd90619a2db44cd42aab922b4e2 (diff) | |
download | mitmproxy-ba842489103caba2691084a1f32f3c79f8f564d6.tar.gz mitmproxy-ba842489103caba2691084a1f32f3c79f8f564d6.tar.bz2 mitmproxy-ba842489103caba2691084a1f32f3c79f8f564d6.zip |
rename mitmproxy.filt -> mitmproxy.flowfilter
Diffstat (limited to 'examples/filt.py')
-rw-r--r-- | examples/filt.py | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/examples/filt.py b/examples/filt.py deleted file mode 100644 index 9ccf9fa1..00000000 --- a/examples/filt.py +++ /dev/null @@ -1,20 +0,0 @@ -# This scripts demonstrates how to use mitmproxy's filter pattern in scripts. -# Usage: mitmdump -s "filt.py FILTER" -import sys -from mitmproxy import filt - - -class Filter: - def __init__(self, spec): - self.filter = filt.parse(spec) - - def response(self, flow): - if flow.match(self.filter): - print("Flow matches filter:") - print(flow) - - -def start(): - if len(sys.argv) != 2: - raise ValueError("Usage: -s 'filt.py FILTER'") - return Filter(sys.argv[1]) |