展会信息港展会大全

Android-TCPDump for Android(抓TCP数据包工具)
来源:互联网   发布日期:2016-01-14 13:01:43   浏览:2772次  

导读:如果要抓TCP数据包,我们可以使用TCPdump工具,类似于windows/linux下使用的这个工具一样具体方法下载tcpdump, 还有个地址是http://www.strazzere.com/android/tcpdump,不知道具体版本。详细使用请参考http:/......

如果要抓TCP数据包,我们可以使用TCPdump工具,类似于windows/linux下使用的这个工具一样

具体方法

下载tcpdump,还有个地址是http://www.strazzere.com/android/tcpdump,不知道具体版本。

详细使用请参考http://www.tcpdump.org/里面的文档

你需要root权限,

adb push c:wherever_you_puttcpdump /data/local/tcpdump

adb shell chmod 6755 /data/local/tcpdump

抓包很简单

adb shell tcpdump -p -vv -s 0 -w /sdcard/capture.pcap

# "-p": disable promiscuous mode (doesn't work anyway)

# "-s 0": capture the entire packet

# "-w": write packets to a file (rather than printing to stdout)

... do whatever you want to capture, then ^C to stop it ...

导出

adb pull /sdcard/capture.pcap .

下载wireshark查看数据包,地址是http://www.wireshark.org/download.html,打开这个数据包,就可以查看数据包内容了。

赞助本站

人工智能实验室

相关热词: 数据包 TCP

AiLab云推荐
推荐内容
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港