[转] 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 ...
随机推荐
- C#反射机制(转)
一:反射的定义 审查元数据并收集关于它的类型信息的能力.元数据(编译以后的最基本数据单元)就是一大堆的表,当编译程序集或者模块时,编译器会创建一个类定义表,一个字段定义表,和一个方法定义表等. Sys ...
- 新手使用R的注意事项
1.最好先设置工作目录 如: setwd(“D:/DataDig”) 注意不是”\”,是”/” 再读取数据,如: datafile = read.csv("./test.csv") ...
- “北航Clubs”功能规格说明书
1.项目目标说明: 北航Clubs的初衷是服务社团,服务学生,满足社团与学生的信息互通的需求.社团管理运营方便的需求. 建设网站的目的是使学生可以在一个权威可信的网站上获取到社团实时的动态,社团活动的 ...
- Java VisualVM使用:堆OOM
背景 近期遇到了一个java.lang.OutOfMemoryError: Java heap space的问题,排除了堆设置过小的问题,代码走查没有头绪,所以使用VisualVM工具分析堆内存情况. ...
- C/C++开发者必不可少的15款编译器+IDE
1)Best IDE for C/C++ – kDevelop(http://kdevelop.org/) Kdevelop是一个专为C/C++及其他语言的开源扩展插件IDE.它基于KDevPlat ...
- CSS3圆角边框的使用-遁地龙卷风
0.快速入门 border-radius:50px; 1.border-radius详解 border-radius:50px; 上右下左,水平和垂直距离都是50px border-radius:50 ...
- hiberante学习笔记
1.配置文件(hibernate映射文件): 让hibernate知道该怎么样去load,store持久化对象: 1.1 数据库忌讳的字段名 1) User 2) index 2.数据库表中一对多,多 ...
- php的Excel相关操作
1.需求 把数据库的数据输出excel格式 2.解决方案 利用phpexcel中的examples的01和07,对excel文件的读写 3.操作流程 a.https://github.com/PHPO ...
- Python验证Url地址的正则表达式
如下是django中做url验证的正则表达式: regex = re.compile( r'^(?:http|ftp)s?://' # http:// or https:// r'(?:(?:[A-Z ...
- Cocos2d-x 3.0 Json用法 Cocos2d-x xml解析
Cocos2d-x 3.0 加入了rapidjson库用于json解析.位于external/json下. rapidjson 项目地址:http://code.google.com/p/rapidj ...