diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-09-06 01:37:15 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-09-06 01:37:15 +0200 |
commit | 853cd810757a02252402da22ae77cab77c5a3fb6 (patch) | |
tree | 8b6b3c0985b8bf3fa1b3f4dd65ea1a53838a4bea /docs/features/filters.rst | |
parent | 23e8260a99cc757ce0f66c044d832b138217e8e5 (diff) | |
download | mitmproxy-853cd810757a02252402da22ae77cab77c5a3fb6.tar.gz mitmproxy-853cd810757a02252402da22ae77cab77c5a3fb6.tar.bz2 mitmproxy-853cd810757a02252402da22ae77cab77c5a3fb6.zip |
docs++
Diffstat (limited to 'docs/features/filters.rst')
-rw-r--r-- | docs/features/filters.rst | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/docs/features/filters.rst b/docs/features/filters.rst new file mode 100644 index 00000000..5b22376c --- /dev/null +++ b/docs/features/filters.rst @@ -0,0 +1,38 @@ +.. _filters: + +Filter expressions +================== + +Many commands in :program:`mitmproxy` and :program:`mitmdump` take a filter expression. +Filter expressions consist of the following operators: + +.. documentedlist:: + :listobject: libmproxy.filt.help + +- Regexes are Python-style +- Regexes can be specified as quoted strings +- Header matching (~h, ~hq, ~hs) is against a string of the form "name: value". +- Strings with no operators are matched against the request URL. +- The default binary operator is &. + +Examples +-------- + +URL containing "google.com": + +.. code-block:: none + + google\.com + +Requests whose body contains the string "test": + +.. code-block:: none + + ~q ~b test + +Anything but requests with a text/html content type: + +.. code-block:: none + + !(~q & ~t "text/html") + |