aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/bpftools/Makefile
Commit message (Expand)AuthorAgeFilesLines
* treewide: replace PKG_USE_MIPS16:=0 with PKG_BUILD_FLAGS:=no-mips16Andre Heider2023-03-211-1/+1
* binutils: Update to version 2.40Hauke Mehrtens2023-03-051-1/+1
* bpftool: Update to version 7.1.0Hauke Mehrtens2023-03-051-7/+7
* bpftools: fix library path on 64 bit systemsFelix Fietkau2022-03-191-3/+3
* bpftools: update to standalone bpftools + libbpf, use the latest versionFelix Fietkau2022-03-191-46/+26
* bpftools: update to v5.11.16, simplify makeTony Ambardar2021-04-241-5/+7
* bpftools: fix feature override for masking clangTony Ambardar2021-04-241-1/+1
* bpftools: drop unneeded libintl linking for NLSTony Ambardar2021-04-031-5/+1
* bpftools: fix libbpf pkgconfig fileTony Ambardar2021-03-071-0/+4
* bpftools: update to latest stable 5.11.2Tony Ambardar2021-03-011-2/+2
* build: reorder more BuildPackages lines to deal with ABI_VERSIONFelix Fietkau2021-02-161-1/+1
* bpftools: update to 5.10.10Tony Ambardar2021-01-251-2/+2
* bpftools: support NLS, fix ppc build and update to 5.8.9Tony Ambardar2020-09-181-5/+10
* bpftools: add utility and library packages supporting eBPF usageTony Ambardar2020-08-311-0/+162
; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
---
title: "Filter expressions"
menu:
    concepts:
        weight: 4
---

# Filter expressions

Many commands in the mitmproxy tool make use of filter expressions. Filter
expressions consist of the following operators:

{{< readfile file="/generated/filters.html" >}}

- 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 &.


## View flow selectors

In interactive contexts, mitmproxy has a set of convenient flow selectors that
operate on the current view:

<table class="table filtertable"><tbody>
<tr><th>@all</th><td>All flows</td></tr>
<tr><th>@focus</th><td>The currently focused flow</td></tr>
<tr><th>@shown</th><td>All flows currently shown</td></tr>
<tr><th>@hidden</th><td>All flows currently hidden</td></tr>
<tr><th>@marked</th><td>All marked flows</td></tr>
<tr><th>@unmarked</th><td>All unmarked flows</td></tr>
</tbody></table>

These are frequently used in commands and key bindings.


## Examples

URL containing "google.com":

    google\.com

Requests whose body contains the string "test":

    ~q ~b test

Anything but requests with a text/html content type:

    !(~q & ~t "text/html")

Replace entire GET string in a request (quotes required to make it work):

   ":~q ~m GET:.*:/replacement.html"