• 技术文章 >常见问题

    wireshark过滤规则有哪些

    coldplay.xixicoldplay.xixi2020-12-14 16:31:07原创9547

    wireshark过滤规则:1、IP过滤,包括来源IP或者目标IP等于某个IP;2、端口过滤;3、协议过滤tcp;4、包长度过滤;5、http模式过滤。

    wireshark过滤规则:

    一、IP过滤:包括来源IP或者目标IP等于某个IP

    比如:ip.src addr==192.168.0.208 or ip.src addr eq 192.168.0.208 显示来源IP

    ip.dst addr==192.168.0.208 or ip.dst addr eq 192.168.0.208 显示目标IP

    二、端口过滤:

    比如:tcp.port eq 80 // 不管端口是来源的还是目标的都显示

    tcp.port == 80

    tcp.port eq 2722

    tcp.port eq 80 or udp.port eq 80

    tcp.dstport == 80 // 只显tcp协议的目标端口80

    tcp.srcport == 80 // 只显tcp协议的来源端口80

    过滤端口范围

    tcp.port >= 1 and tcp.port <= 80

    三、协议过滤:tcp

    udp

    arp

    icmp

    http

    smtp

    ftp

    dns

    msnms

    ip

    ssl

    等等

    排除ssl包,如!ssl 或者 not ssl

    四、包长度过滤:

    比如:

    udp.length == 26 这个长度是指udp本身固定长度8加上udp下面那块数据包之和

    tcp.len >= 7 指的是ip数据包(tcp下面那块数据),不包括tcp本身

    ip.len == 94 除了以太网头固定长度14,其它都算是ip.len,即从ip本身到最后

    frame.len == 119 整个数据包长度,从eth开始到最后

    五、http模式过滤:

    例子:

    http.request.method == “GET”
    http.request.method == “POST”
    http.request.uri == “/img/logo-edu.gif”
    http contains “GET”
    http contains “HTTP/1.”
    // GET包包含某头字段
    http.request.method == “GET” && http contains “Host: ”
    http.request.method == “GET” && http contains “User-Agent: ”
    // POST包包含某头字段
    http.request.method == “POST” && http contains “Host: ”
    http.request.method == “POST” && http contains “User-Agent: ”
    // 响应包包含某头字段
    http contains “HTTP/1.1 200 OK” && http contains “Content-Type: ”
    http contains “HTTP/1.0 200 OK” && http contains “Content-Type: ”

    六、连接符 and / or

    七、表达式:!(arp.src==192.168.1.1) and !(arp.dst.proto_ipv4==192.168.1.243)

    八、expert.message是用来对info信息过滤,主要配合contains来使用

    相关免费学习推荐:php编程(视频)

    以上就是wireshark过滤规则有哪些的详细内容,更多请关注php中文网其它相关文章!

    声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。
    专题推荐:wireshark
    上一篇:演示文稿幻灯片有哪四种视图模式? 下一篇:wps文字是专门用来处理什么的软件?

    相关文章推荐

    • wireshark抓包分析 PHP 中文乱码解决办法总结分析• wireshark是如何抓取本地数据包的?• wireshark数据包抓取之捕获过滤器的使用• wireshark工具的显示过滤器的使用

    全部评论我要评论

  • 取消发布评论发送
  • 1/1

    PHP中文网