Hot on the whole network, Charles packet capture tutorial - auxiliary interface test (1)


foreword

charles is a very good packet capture tool, supported by all platforms, it can be used on mac, windows, linux, it can capture both web-side packets and app-side packets.

The main functions of charles include the following points:
Intercept Http and Https network packets.
Supports resending network requests to facilitate back-end debugging.
Support modifying network request parameters.
Supports the interception and dynamic modification of network requests.
Support for simulating slow networks

The working principle of the proxy server:
the client initiates a request, the request is forwarded to the server through Charles, the server returns a response, and the response is forwarded to the client through Charles.

The role played by charles is equivalent to a messenger, passing information from A to B, and passing the reply from B to A. Because of his work as a messenger, he knows the content of the information (whether it is the original letter or the reply), Because of this, Charles can also tamper with the content of the information, that is, tamper with the request and response.


I won’t say anything about installation , there are a lot of online tutorials

Basic settings
Turn on the proxy (it is turned on by default)

D1

https settings and certificate installation,
first set the proxy

D2

install certificate

D3

D4

D5

D6

Set ssl proxy
Click the menu item "Proxy" -> "SSL Proxy Settings"

D7

Click [Add], and in the pop-up "Edit Location" window, enter an asterisk in the host and port text boxes, as shown in the screenshot below, and click [OK] in the "Edit Location" window

D8

Then in the "SSL Proxy Settings" window, click [OK]

Separate settings for the chrome browser
For https capture on the chrome browser, the following operations need to be performed

Save the charles certificate first, and select binary when saving

D9

D10

Open the settings interface of the chrome browser, search for certificates, and enter the certificate management interface

D11

D12

D13

Q14

D15

D16

Mobile terminal packet capture configuration

Mobile phone connection proxy settings
First, make sure that the mobile phone and the computer where Charles is located are in the same local area network, then set the code connection of the mobile phone, long press the wifi of the mobile phone, open and modify the network

The ip is the ip of the computer where Charles is located, and the port is the port number 8888 seen in the Charles proxy settings.

When connecting to the proxy for the first time, charles will pop up a confirmation box, remember to click allow

D17

Enter chls.pro/ssl in the mobile browser and it will prompt you to download the certificate, just download and install it

The ios mobile phone also needs to trust the certificate in Settings-General-About This Machine-Certificate Trust Settings

The following is the most complete software test engineer learning knowledge architecture system diagram in 2023 that I compiled

1. From entry to mastery of Python programming

Please add a picture description

2. Interface automation project actual combat

Please add a picture description

3. Actual Combat of Web Automation Project

Please add a picture description

4. Actual Combat of App Automation Project

Please add a picture description

5. Resume of first-tier manufacturers

Please add a picture description

6. Test and develop DevOps system

Please add a picture description

7. Commonly used automated testing tools

Please add a picture description

Eight, JMeter performance test

Please add a picture description

9. Summary (little surprise at the end)

Will is like iron, chasing the distance, and struggle is the power to overcome difficulties. Dare to break through, surpass yourself, and write a magnificent chapter of life with hard work. Believe in your potential and embrace challenges. Only by striving can you create a brilliant life and shine your own light!

Fearless challenges, pursuit of excellence, struggle is the power to create dreams. Persevere, go beyond the limit, and create a brilliant chapter with sweat. Believe in your ability, embrace change, make every effort extraordinary, and bloom the endless splendor of life!

Keep faith and work hard, struggle is the power to pursue dreams. Go forward bravely, forge ahead, and water the growing flowers with sweat. Believe in your own strength, surpass yourself, let every step of hard work create brilliance, and bloom the splendid chapter of life!

Guess you like

Origin blog.csdn.net/csdnchengxi/article/details/131981815