I tried my best to learn Charles

Time:2021-10-20

brief introduction

Charles is a commonly used network packet interception tool on the PC side. When doing mobile development, we often need to intercept network packets for analysis in order to debug the network communication protocol with the server side. In addition to debugging ports in mobile development, Charles can also be used to analyze communication protocols for third party applications. With Charles’ SSL function, Charles can also analyze the HTTPS protocol.

Charles set himself as the network access proxy server of the system, so that all network access requests can be completed through it, so as to realize the interception and analysis of network packets.

Charles’s main functions include:

  • Intercept HTTP and HTTPS network packets.
  • Support retransmission of network requests to facilitate back-end debugging.
  • Support modifying network request parameters.
  • Support the interception and dynamic modification of network requests.
  • Support analog slow network.

There are also famous tools of the same typeFidder

Use background

Colleagues on the app side of the companyDebug interfaceSometimes, there may be some very serious problemsbe rather bafflingProblems. Sometimes it may be difficult to locate where the problem belongsFront end display bug Or interfaceData exception

Usually at this time, the back-end may need to go to the serverjournalThen conduct troubleshooting in combination with log data. However, limited to complex situations such as tool network, this method is really inefficient.

At this time, we need such a tool to see the return of the interface running the app in real time. Combined with the front-end view display, the cause of the problem can be found in a very short time. In this way, the problem can be repaired quickly.

Download and crack

Download address on the official website.address

Charles is a paid software that can be tried for 30 days for free. After the trial period, unpaid users can still continue to use it, but each use time can not exceed 30 minutes, and there will be a 10 second delay when starting. Therefore, the payment scheme is quite friendly to the majority of users. Even if you don’t pay for a long time, you can use the complete software functions.

However, I choose to crack. I use Charles to improve the time for troubleshooting. As a result, I can’t stand you making these things for me…. It’s easy to crack. Ha ha ha ha

Crack website

Select your current version and download a jar package.

Charles configuration

After Charles is installed, you can grab the HTTP package at this time, but the interfaces we provide for the app are generally HTTPS. So we need to install the certificate.

Installation certificate

Help -> SSL Proxying ->Install Charles Root Certificate

I tried my best to learn Charles

After the certificate is installed, you need to trust it. That’s it

HTTPS crawl configuration

I tried my best to learn Charles

I tried my best to learn Charles

IPhone capture configuration

Why is the iPhone capture configuration here, mainly because the Android capture configuration is too troublesome. Then the iPhone just needs a simple installation certificate.

I tried my best to learn Charles

As shown in the figure above, clickInstall Charles Root Certificate on a Mobile Device Or Remote Browser

I tried my best to learn Charles

Click 192.168.1.106:8888 in the prompt box after that to set the address of the network agent for the mobile phone. Chls.pro/ssl is the mobile phone download certificate address.

Confirm that the mobile phone and computer are on the same network, visit chls.pro/ssl to download and install the certificate. Then trust the certificate.

Installation certificate

I tried my best to learn Charles

Trust certificate

Settings – General – about native – certificate trust settings – check the installed certificate

I tried my best to learn Charles

Mobile phone configuration agent

After configuring the WiFi agent to 192.168.1.106, you can successfully grab the HTTPS package of the mobile phone.

I tried my best to learn Charles

After completing the appeal settings, the iPhone can capture the package.

Chrome capture configuration

The configuration of chrome packet capture is similar to that of mobile phones. You also need to install plug-ins and configure agents.

Configure the agent in settings – Advanced – agent configuration. Configured as Charles agent.

Function introduction

Repeat

Repeat the executed request.

Application scenarios,Server stress test

Compose

Temporarily modify some request parameters. Click execute to send the modified request.

<img style=”zoom:50%;” />

Rewrite

The rewrite function is suitable for some regular replacement of a certain type of network request to modify the result

<img style=”zoom:50%;” />

Map Remote Config

The address is directed from to proxy the request to access server a to server B

<img style=”zoom:50%;” />

Map Local Config

Replaces the response to the specified request with a local file

<img style=”zoom:50%;” />

This paper is based on the operation tool platform of blog group sending one article and multiple sendingOpenWriterelease