如何使用Wireshark抓到报文Radiotap的信息

发表于:2018-4-20 09:54

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:骗人布船长    来源:博客园

  本人希望在不修改内核的情况下获得每个数据报文的RSS的大小,查阅资料后得知可以使用wireshark抓取报文,在报文的radiotap头中会有rssi的信息。但是实际操作后发现获取的报文是这个样子的:
  查阅资料后发现,当无线网卡不支持或者没有设置为monitor mode时,无线网卡的驱动会自动把802.11 frame 转化为Ethernet frame后给kernel。官方解释为:
If you‘re trying to capture network traffic that‘s not being sent to or from
the machine running Wireshark or TShark, i.e. traffic between two or more
other machines on an Ethernet segment, or are interested in 802.11 management
or control packets, or are interested in radio-layer information about
packets, you will probably have to capture in "monitor mode". This is
discussed below.
Without any interaction, capturing on WLAN‘s may capture only user data
packets with "fake" Ethernet headers. In this case, you won‘t see any 802.11
management or control packets at all, and the 802.11 packet headers
are"translated" by the network driver to "fake" Ethernet packet headers.
  使用iwconfig命令后发现:
  此时无线网卡的模式为managed。因此,我试着去打开无线网卡的monitor mode。查阅资料后,使用命令:
sudo ifconfig wlan11 down
sudo iwconfig wlan11 mode monitor
sudo ifconfig wlan11 up
  再次运行iwconfig后发现:
  此时,网卡的模式已经变为Monitor,在使用wireshark进行抓包,发现也有了radiotap header:
上文内容不用于商业目的,如涉及知识产权问题,请权利人联系博为峰小编(021-64471599-8017),我们将立即处理。
《2023软件测试行业现状调查报告》独家发布~

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计 发展历程

法律顾问:上海兰迪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2024
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号