Today, there is no hanging matter, to write an article on how to crawl the Android app packet? Work to do its thing, its prerequisite, internet Google a bit, found an artifact: Fiddler, this seems to be all software developers must be an artifact! This tool can not only crawl the PC on the development of the web when the packet, and can crawl the mobile side (Android,iphone,windowphone, etc.), too powerful, before the web, know that there is a call HttpWatch tool, Can crawl the Web request packet, but compared with this artifact to compare, it is weak explosion! Blowing to the present is useless, let's look at the example below! Start getting excited!
What is the use of intercepting the HTTP packets sent by your smartphone?Utility One: The mobile phone software programmer uses fiddler, can intercept the handset sends the HTTP packet, thus the debugging program usefulness two: The software tester uses to test the software on the smart phone. Use three: can be used in the App Store to brush ranking usefulness four: After intercepting the Http/https, you do what you want to do, such as modify request, or response.
First step: Download artifact fiddler, download Link:http://fiddler2.com/get-fiddler
After the download is complete, the idiot installs it!
Step Two: Set fiddler
Open Fiddler, tools-> Fiddler Options (remember to restart Fiddler after configuration)
With "Decrpt HTTPS Traffic" selected, fiddler can intercept HTTPS requests
Select Allow remote computers to connect. is to allow other machines to send HTTP/HTTPS requests to fiddler.
Remember this port number is: 8888
Step three: Set up your Android phone
First get the IP address of the PC: command line input: ipconfig, get IP address
Okay, so I got the IP address and port number.
Next to the Android phone proxy settings, I am using the Samsung G4:
Make sure your phone and PC are connected to the same LAN
Enter the phone settings, click enter Wi-Fi settings, select the wireless network connected to, long press the pop-up options box::
Select Modify Network configuration:
Select Show advanced Options, set the proxy to manual , fill in the IP address and port number obtained above, and click Save. This will make our phone set up successfully.
Here we set all the values, the following to test, first install the NetEase news app.
Below open fiddler, then open the phone in the NetEase news App,fiddler grabbed the package as follows:
This is to crawl the Android mobile data packet success, this for our network data request after the debugging has a lot of help, we can use this method to determine whether we request the network is successful!
Note: This method only adapts to crawling http.
The biggest advantage of this approach is that HTTP can be intercepted or received , and HTTP request and response data can be modified . Therefore, this method can be used to simulate some special scenarios (such as packet not responding, simulating some difficult error codes, etc.).
fidder--realizes the clutch of the handset