android 抓包工具 和 抓包方法

使用TCPdump工具,抓TCP数据包。
将数据包上传到PC,通过Wireshark查看数据包

常用命令:

*  上传 tcpdump 到 目录 /data/local/tcpdump 

adb push d:\tcpdump /data/local/tcpdump                                    

 

*  设置权限

adb shell chmod 6755 /data/local/tcpdump                               

 

* 启动监听程序 并将监听的数据包存放在/sdcard/capture.pcap

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

 

  *  下载监听的数据包capture.pcap到PC的当前目录     
adb pull /sdcard/capture.pcap   .                                                                                            

TCPdump下载地址http://www.strazzere.com/android/tcpdump

Wireshark下载地址
http://www.wireshark.org/download.html

猜你喜欢

转载自xiaxingwork.iteye.com/blog/1672506
今日推荐