PCs use Wireshark to directly view Tcpdump captured packets on Android phones

Source: Internet
Author: User
Tags command line port number

Tcpdump and Wireshark are essential tools for network analysis, as are web analytics on mobile phones. Before that, I used the tcpdump grab package on my phone to save it as a. pacp file and then use Wireshark on my PC to analyze it. After seeing the contents of the reference site, I found that there are more simple methods, through the ADB foward function, you can directly on the phone tcpdump bag results via USB sent to the computer, the computer can be directly used Wireshark to view. The specific steps include a

Documents required for download include

Tcpdump-arm: tcpdump files that can be run on a mobile phone

Nc.exe:netcapture

Second, send the compiled tcpdump file to the mobile phone

Open command line cmd, enter the computer to save the Tcpdump-arm directory, run the following command

ADB push Tcpdump-arm/data

adb shell "chmod 777/data/tcpdump-arm"

Third, save the Nc.exe to the Wireshark installation directory

Four, run the following command on the command line with Administrator privileges

CD C:\Program Files\wireshark 
start adb root   
adb shell "./data/tcpdump-arm-n-S 0-w-|  Nc-l-P 7100 "
adb forward tcp:6100 tcp:7100 && NC 127.0.0.1 6100 | wireshark-k-s-i-   
#注意 NC port number should and ADB Forward the initial port number is consistent

Five, you can save the above three lines of code as a. bat file, you can run the. bat file directly in the future if needed.

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/extra/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.