I used Charles to grab the bag, but I never summed it up, and today we talk about how Charles grabbed the packet, modified the request, and modified the return value.
I. INTRODUCTION of Charles
Charles is a cross-platform grab kit that can be used under Windows,mac.linux, and the main function is as follows:
1, check out the request sent
2, positioning problems, location analysis is the server side of the problem or the client's problem
3, help to simulate some of the service side return abnormal situation
4, mobile phone grab bag, need attention:
(1) must ensure that the mobile phone and the computer is in the same LAN.
(2) Get to the computer IP address, look at the port number of Charles, the default port number is 8888, the user can set their own.
Second, check out the request sent
Open Charles, if you want to see 58 of the same city request, on the left side of the structure found 58 of the same city domain name, here is mainly the domain name as a node display, click/,
Looking at the right window, the request and the returned results are shown here in detail.
Note: Many sites now use HTTPS, many times can not catch the package, where the use of HTTP, it is easy to catch.
Iii. changes to the request made
In the package that was caught in the previous step, select 58.com, click Proxy->enable breakpoints, empty the captured data, and re-enter 58.com in the browser as follows:
Click Execute to execute after the modification.
Iv. Modification of Reponse
Modified to:
The result is:
Five, mobile phone grab bag
1. Check your computer's IP
Look at the Charles Proxy port as follows:
2, on the phone set the manual proxy IP for the computer IP, the port is 8888, can be saved.
Charles crawls HTTP requests in detail