4、过滤HTTP请求:
# tshark 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' -R 'http.request.method == "GET" || http.request.method == "HEAD"'
输出:
Running as user "root" and group "root". This could be dangerous.
Capturing on eth0
0.000000 123.126.68.27 -> 173.255.196.50 HTTP GET /grep.html HTTP/1.1
12.066470 123.126.68.27 -> 173.255.196.50 HTTP GET /pro_lang.html HTTP/1.1
4摘自:http://www.berlinix.com/net/tshark.php