Sometimes a mobile app is very good. If you want to study its HTML5 source code, style sheet, script, or something, the normal method is not good. Generally, Safari can be used to spoof the target website by forging the User-Agent and making the website think that you are a mobile terminal. packet capture on the PC will not be detailed, with the development function provided by Alibaba it, you can easily view the source code and debug scripts without packet capture.
In more cases, we do not know the website. We need to capture packets. It is not very convenient to capture the mobile phone package. We can configure the mobile phone network configuration so that the mobile phone data packets can be forwarded through the PC.
I. Preparations
You need a mobile phone that supports wifi. You need to install Fiddler on your computer. The official website is http://fiddler2.com /.
2. Set WiFi for mobile phones
The Access Point and password settings are omitted, mainly for the HTTP Proxy Server. The IP address is the address of your computer. The default proxy service port of Fiddler is 8888, and the user name and password are not required. IPhone:
3. Set fiddler
Go to tools, Fiddler options, and connections in sequence, and select allow external computer connection.
4. packet capture
After Fiddler is enabled, HTTP data packets are automatically captured by default. To avoid software interference such as 360 and QQ, this function should be disabled. In the lower left corner of the main interface, click capturing to close it. Click again to open it.
Now we can use the app to capture packets on the mobile phone. We can see the data packets on Fiddler.