ROS抓包分析

ROS配置步骤:

1.WinBox登录ROS,打开Tools-Packet Sniffer

General,这里的interface接口要选择对,先择所有会丢包。

streaming,这里选择开启前的勾上,填 上你的PC机IP.点应用。

 

 在你的PC机上开启Wireshark,网卡选择你通讯的网口,有流量的那个即可,点开始。保存后通过过滤,得到想要的数据。

实用wireshark 过滤器规则

过滤 IP
ip.src eq 192.168.1.1 or ip.dst eq 192.168.1.1
ip.addr eq 192.168.1.1 // 都能显示来源 IP 和目标 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
udp.port eq 15000过滤端口范围
tcp.port >= 1 and tcp.port <= 80

过滤协议
Tcp,udp,arp,icmp,http,smtp,ftp,dns,msnms,ip,ssl,oicq,bootp排除 arp 包,如!arp 或者 not arp

过滤 MAC
太以网头过滤

eth.dst == A0:00:00:05:5:85 // 过滤目标mac
eth.src eq A0:00:00:05:5:85 // 过滤来源mac
eth.dst==A0:00:00:05:5:85
eth.dst==A0:00:00:05:5:85
eth.addr eq A0:00:00:05:5:85 // 过滤来源MAC和目标MAC都等于A0:00:00:04:C5:84的
less than 小于 < lt 
小于等于 le
等于 eq
大于 gt
大于等于 ge
不等 ne


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: "
一定包含如下
Content-Type:

DNS过滤

dns.qry.name == www.baidu.com
 

猜你喜欢

转载自blog.csdn.net/weixin_48750761/article/details/131739143
今日推荐