首页 > 编程知识 正文

wireshark过滤命令,wireshark过滤规则

时间:2023-05-04 14:20:56 阅读:212047 作者:1944

Wireshark filter: Protocol = “HTTP” 显示过滤http数据包

List item

利用wireshark 工具内置的filter
直接点击"Filter", 打开"display Filter"对话框,选择"HTTP",然后点击"Expression",使用工具已经识别到的那些过滤条件表达式。

2. http 关键词过滤

只访问某指定域名:http.host==“域名”访问包含了指定字符串的 : http.[host] contains “内容”只显示Referer头部内容为 http://www.packtpub.com的请求 : http.referer == “http://www.packtpub.com”

HTTP请求方法的显示过滤器

显示所有HTTP请求包: http.request 或 http.request == 1GET请求的所有HTTP包: http.request.method == GETPOST请求的所有HTTP包: http.request.method==POST过滤请求的uri: http.request.uri==”/upload” //取值是域名后的部分过滤整个uri:http.request.full_uri==“http://task.browser.360.cn/upload”http.request.version == “HTTP/1.1”

HTTP响应数据包 :

http.response 或者 http.response == 1

包含错误码的HTTP响应包:http.response.code >=400

显示包含HTTP客户端错误状态码的HTTP响应包: http.response.code >=400 and http.response.code <=499

显示包含HTTP服务端错误状态码的HTTP响应包: http.response.code >=500 and http.response.code <=599

过滤http响应中的phrase http.response.phrase == “OK”

内容关键词

http.server contains “snapshot” //过滤http头中server字段含有指定字符

http.content_type == “text/html” //过滤content_type是text/html的http响应、post包,即根据文件类型过滤http数据包
http.content_encoding == “gzip” //过滤content_encoding是gzip的http包
http.transfer_encoding == “chunked” //根据transfer_encoding过滤

http.content_length == 279
http.content_length_header == “279” //根据content_length的数值过滤

http.server //过滤所有含有http头中含有server字段的数据包

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。