diff options
| author | Aldo Cortesi <aldo@corte.si> | 2016-10-04 08:13:19 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-04 08:13:19 +1100 |
| commit | b0add569b988e9f1e319b9577fbd8e076ac5bd23 (patch) | |
| tree | 285120283d1e78f5d4477eaa9bb9fd630babbd05 /examples | |
| parent | 13fb384c1996e74fa836c5ef572e740f5717c54a (diff) | |
| parent | 36c04f1631c79ca79712873e151c7f5267cafd46 (diff) | |
| download | mitmproxy-b0add569b988e9f1e319b9577fbd8e076ac5bd23.tar.gz mitmproxy-b0add569b988e9f1e319b9577fbd8e076ac5bd23.tar.bz2 mitmproxy-b0add569b988e9f1e319b9577fbd8e076ac5bd23.zip | |
Merge pull request #1587 from Kriechi/rename-filt
rename mitmproxy.filt -> mitmproxy.flowfilter
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/flowfilter.py (renamed from examples/filt.py) | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/filt.py b/examples/flowfilter.py index 9ccf9fa1..80a153da 100644 --- a/examples/filt.py +++ b/examples/flowfilter.py @@ -1,15 +1,16 @@ # This scripts demonstrates how to use mitmproxy's filter pattern in scripts. -# Usage: mitmdump -s "filt.py FILTER" +# Usage: mitmdump -s "flowfilter.py FILTER" + import sys -from mitmproxy import filt +from mitmproxy import flowfilter class Filter: def __init__(self, spec): - self.filter = filt.parse(spec) + self.filter = flowfilter.parse(spec) def response(self, flow): - if flow.match(self.filter): + if flowfilter.match(flow, self.filter): print("Flow matches filter:") print(flow) |
