2016-10-03 102 views
0

我想包含请求一定API端点只捕获数据包,从而尝试使用过滤以下:tshark的数据包捕获过滤

tshark -i 2 -f 'port 80' -T pdml http.request.uri contains "/google/" 

不过,我不断收到以下错误:

tshark: A capture filter was specified both with "-f" and with additional 
command-line arguments. 

尝试删除-f,但这也没有帮助。有什么建议么?

如网址:https://testAPI.com/termsearch/google/application

回答

0

tshark命令不正确。要指定Wireshark显示过滤器,您需要使用-Y选项。

的Windows:

tshark -i 2 -T pdml -Y "http.request.uri contains \"/google/\"" 

的* nix:

tshark -i 2 -T pdml -Y 'http.request.uri contains "/google/"'