26 ms·
`tshark` (from wireshark) sounds like a similar tool with pretty good protocol support (IIRC, it has been a long time since I've used it). By example: $ tsh
by hayst4ck 4y ago
`tshark` (from wireshark) sounds like a similar tool with pretty good protocol support (IIRC, it has been a long time since I've used it).
By example:
$ tshark -i lo -l -q -Y http -T fields -e frame.time -e _ws.col.Info -e http.file_data
Running as user "root" and group "root". This could be dangerous.
Capturing on 'Loopback: lo'
Dec 19, 2022 04:07:12.419196072 UTC GET / HTTP/1.0
Dec 19, 2022 04:07:12.420560079 UTC HTTP/1.1 200 OK (text/plain) Hello World!\n
Dec 19, 2022 04:07:12.504444583 UTC GET /favicon.ico HTTP/1.0
Dec 19, 2022 04:07:12.505691738 UTC HTTP/1.1 404 Not Found
Because -l (flush every line to stdout) and -q (suppress packet counts) you can pipe the command to grep.
$ tshark -i lo -l -q -Y http -T fields -e frame.time -e _ws.col.Info -e http.file_data 2>&1 | grep 404
Dec 19, 2022 04:09:46.361304160 UTC HTTP/1.1 404 Not Found
More examples:
https://hackertarget.com/tshark-tutorial-and-filter-examples/ https://hackertarget.com/tshark-tutorial-and-filter-examples...