[转] Android利用tcpdump抓包
http://source.android.com/porting/tcpdump.html
Source Code and Documents
http://www.tcpdump.org/
Compiled Binary Download
http://www.strazzere.com/android/tcpdump
数据包分析工具Wireshark
http://www.wireshark.org/download.html
Installing tcpdump
Pushing the binary to an existing device
Download tcpdump from http://www.tcpdump.org/, then execute:
- adb root
- adb remount
- adb push /wherever/you/put/tcpdump /system/xbin/tcpdump
- adb shell chmod 6755 /data/local/tmp/tcpdump
Running tcpdump
You need to have root access on your device.
Batch mode capture
The typical procedure is to capture packets to a file and then examine the file on the desktop, as illustrated below:
- adb shell tcpdump -i any -p -s 0 -w /sdcard/capture.pcap
- # "-i any": listen on any network interface
- # "-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 .
- sudo apt-get install wireshark # or ethereal, if you're still on dapper
- wireshark capture.pcap # or ethereal
- ... look at your packets and be wise ...
You can run tcpdump in the background from an interactive shell or from Terminal. By default, tcpdump captures all traffic without filtering. If you prefer, add an expression like port 80 to the tcpdump command line.
Real time packet monitoring
Execute the following if you would like to watch packets go by rather than capturing them to a file (-n skips DNS lookups. -s 0 captures the entire packet rather than just the header):
- adb shell tcpdump -n -s 0
Typical tcpdump options apply. For example, if you want to see HTTP traffic:
- adb shell tcpdump -X -n -s 0 port 80
[转] Android利用tcpdump抓包的更多相关文章
- Android利用tcpdump抓包,用wireshark分析包。
1.前言 主要介绍在android手机上如何利用tcpdump抓包,用wireshark分析包. android tcpdump官网: http://www.androidtcpdump.com/ t ...
- Android手机tcpdump抓包
在开发过程中遇到问题时,无法非常方便的获取到数据包,导致分析解决问题比较麻烦.这里介绍如何在Android手机上实现tcpdump抓包. 1.root机器 在用tcpdump抓包过程中,需要使用 ...
- linux下利用tcpdump抓包工具排查nginx获取客户端真实IP实例
一.nginx后端负载服务器的API在获取客户端IP时始终只能获取nginx的代理服务器IP,排查nginx配置如下 upstream sms-resp { server ; server ; } s ...
- android下tcpdump抓包
tcpdump是最快捷方便的抓包方式,还可以加深对网络协议的理解.android下可以通过如下方式抓包: 1 Android上启动tcpdump Android设备可以把tcpdump的可执行文件上传 ...
- Android通过tcpdump抓包(wifi, 2g, 3g都可以)
http://blog.csdn.net/deng529828/article/details/20646197 1. 手机要有root权限 2. 下载tcpdump http://www.str ...
- Android使用tcpdump抓包
AllJoyn中有个问题:Server切换到Client后,重新加入其他Server时join session会失败,原因是timeout(join session是异步的,在指定时间内没有收到回应) ...
- 利用tcpdump抓包工具监控TCP连接的三次握手和断开连接的四次挥手
TCP传输控制协议是面向连接的可靠的传输层协议,在进行数据传输之前,需要在传输数据的两端(客户端和服务器端)创建一个连接,这个连接由一对插口地址唯一标识,即是在IP报文首部的源IP地址.目的IP地址, ...
- Android通过tcpdump抓包
1. 手机要有root权限 2. 下载tcpdump http://www.strazzere.com/android/tcpdump 3. adb push c:\wherever_you_pu ...
- 转:android root tcpdump抓包强烈推荐
转:http://www.cnblogs.com/findyou/p/3491035.html 写的相当详细且完整,业界良心. adb push d:\tcpdump /data/local/ adb ...
随机推荐
- [原] Android 自定义View 密码框 例子
遵从准则 暴露您view中所有影响可见外观的属性或者行为. 通过XML添加和设置样式 通过元素的属性来控制其外观和行为,支持和重要事件交流的事件监听器 详细步骤见:Android 自定义View步骤 ...
- 统计学 nested_design 嵌套设计
nested_design 嵌套设计 li_volleyball ,邓邦良 2016年3月6日 嵌套设计 一.基本概念 嵌套设计(nested design)又称为窝设计和套设计,与析因设计的处理不同 ...
- OC第一节 —— 类和对象
一.类和对象的概念 1.1类 自己的定义: 具有相同或相似性质对象的抽象. 1.2 对象 自己的定义: 对象是人们要进行研究的任何物体,从最简单的整数到复杂的飞机 等均可以看做是对象. 举例说明: 类 ...
- Jetty安装
下载jetty http://www.eclipse.org/jetty/ 看好jdk 版本 安装 解压压缩包到指定目录,且将其目录路径定义为${JETTY_HOME} 进入${JETTY_HOME ...
- 在lua脚本中使用我们自定义的精灵类
首先创建cocos2dx-lua项目,然后在项目中添加我们的自定义精灵类:这里Himi类名为:HSprite // // HSprite.h // cocos2dx_lua_tests_by_Himi ...
- RDS记录
rdsafbnr32uzayn.mysql.rds.aliyuncs.com r7fysfqs90r74cm6
- javascript高级程序设计---NodeList和HTMLCollection
节点对象都是单个节点,但是有时会需要一种数据结构,能够容纳多个节点.DOM提供两种接口,用于部署这种节点的集合分别是NodeList和HTMLCollection MDN上的定义: NodeList: ...
- 元素间距属性(scrollLeft,scrollWidth,clientWidth,offsetWidth,padding,margin)
scrollHeight: 获取对象的滚动高度.scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端 ...
- iOS企业级开发初级课程-UIView与控件(20集)
UIView与控件向大家介绍了视图和控件之间的关系以及应用画面的建构层次.然后是对标签.按钮.文本框.文本视图.开关.滑块.分段控件.网页控件.屏幕滚动控件.等待控件.进度条.警告.动作选单.工具栏. ...
- BZOJ1367——[Baltic2004]sequence
1.题目大意:给一个序列t,然后求一个序列z,使得$|z1-t1|+|z2-t2|+...+|zn-tn|$的值最小,我们只需要求出这个值就可以了,并且z序列是递增的 2.分析:这道题z序列是递增的, ...