1. IntroductionHello everyone, I am Anguo! Before writing a crawler, we need to capture the target application and analyze it before we can start writing the script. For those who use iPhone, daily packet capture is not too easy. PC tools, such as Charles and Fiddler, are enough; "Stream" is a very powerful network packet capture application on iOS, with a simple interface and powerful functions. But for those who use the higher version of Android system, packet capture is not so convenient! Because the higher version system has improved the security policy, the CA certificate must be placed in the system certificate directory to capture packets normally. The certificate installed by the user defaults to the user certificate, which makes many apps unable to capture packets normally. This article will introduce the steps of packet capture in Android high version system based on common scenarios. 2. Non-Rooted DevicesAndroid also has a powerful network packet capture tool, namely: Little Yellow Bird "HttpCanary" The specific steps are as follows: 2-1 Export HttpCanary root certificateAfter installing the Little Yellow Bird App, go to the settings page and export the HttpCanary root certificate Select "System Trusted(.0)" as the type In this way, the HttpCanary root certificate is saved to the "internal storage path/HttpCanary/cert/...0" directory 2-2 Install APKPure and VMOS Pro appsVMOS PRO download address: https://apkpure.com/cn/vmos-pro/com.vmos.ggp PS: Since the VMOS PRO application format is XAPK, it is recommended to install the XAPK format application through APKPure 2-3 VMOS imports RE application, target application and HttpCanary root certificateOpen the VMOS Pro application, import the Root Explorer application, target application, and HttpCanary root certificate file In this way, VMOS includes the target application, RE file management application, and the HttpCanary root certificate file is saved to "VMOSfiletransferstatio/" by default. 2-4 Import the certificate into the system certificate directoryIn VMOS Pro, use the RE application to move the HttpCanary root certificate file to the system certificate directory. System certificate directory: /system/etc/security/cacerts/ 2-5 Start capturing packetsOpen the Little Yellow Bird App, set the target application to "VMSO", then turn on the packet capture switch on the main interface, and finally operate the target application in VMOS The network requests of the target application will be displayed in the list of the main interface of the little yellow bird. It should be added that the "Parallel Space" is more recommended for packet capture in the Little Yellow Bird HttpCanary application, but in actual use, it was found that there were problems such as flashbacks and plug-in installation, so it is not recommended. 3. Root your deviceIf the phone has been rooted, we only need to move the third-party certificate (such as: Little Yellow Bird, Charles, etc.) to the system certificate directory. Here we use the Yellow Bird App and Charles to explain, Fiddler is similar 3-1 Little Yellow Bird App Packet CaptureThe steps are as follows:
# Grant adb root permissions 3-2 Charles captures the packetThe steps are as follows:
Check the IP address of the PC, keep the phone in the same LAN, set it to manual proxy, and finally capture the packet for testing # Execute with root privileges 4. Final ThoughtsThe above briefly describes the packet capture process in various scenarios of high-version Android systems based on whether the phone is rooted. In addition to the above packet capture methods, there are many other options. For rooted devices, we can install Magisk mask and use movecert module to capture packets; or we can use EdXposed framework + trustmealredy module to capture packets. In actual work, we can choose the method that suits us according to our needs. |
>>: Why should Android phones fully popularize 64-bit applications in 2022?
What should I do if my credit card is overdue and...
Generating traffic is essentially about generatin...
In mid-September 2016, I registered a Toutiao acc...
Recently, NIO disclosed in its prospectus that th...
If you don’t have ten or eight marketing models a...
Author: Huang Xianghong Duan Yuechu In the depths...
If you love milk tea, you must be familiar with t...
Recently, the news that a certain actor is suspec...
The pirate model is often used in product operati...
Expert of this article: Zhao Wei, MD, associate c...
According to foreign media reports recently, Borg...
On December 9, 2021, "space teachers" Z...
After the iPhone 6 and iPhone 6 Plus became hot-s...
recent Harbin has become very popular Cut frozen ...
Resources for parents’ first parent-child financi...