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/