tools: improve sslsniff (send buffer & filtering)
authorSlava Bacherikov <slava@bacher09.org>
Sun, 21 Nov 2021 13:31:49 +0000 (15:31 +0200)
committeryonghong-song <ys114321@gmail.com>
Tue, 23 Nov 2021 22:35:12 +0000 (14:35 -0800)
commit91a79837aac50232c7dd424667e6e20ab2a5ee38
treeb1e0800703a2520eac871dddd8276ded03a87b73
parent2cffe363b3ab1c2157e9fbe0d2c33de5cfa6b7a8
tools: improve sslsniff (send buffer & filtering)

This makes few improvements:
    * This can send much larger data payload and also adds
      --max-buffer-size CLI option which allow changing this param.
    * Fixes dealing with non ASCII protocols, previously struct was
      defined as array of chars which made python ctypes treat it as
      NULL terminated string and it prevents from displaying any data
      past the null byte (which is very common for http2).
    * Adds more filtering and displaying options (--print-uid,
      --print-tid, --uid <uid>)

This also deals correctly with rare cases when bpf_probe_read_user fails
(so buffer should be empty and should not be displayed).
man/man8/sslsniff.8
tools/sslsniff.py
tools/sslsniff_example.txt