当前位置:网站首页>Use Charles to capture the package of the applet through the mobile agent

Use Charles to capture the package of the applet through the mobile agent

2022-06-24 03:06:00 cailynyu

Background introduction

stay PC End Use Charles It can capture packets of applet interface , For subsequent use Jmeter Tools for interface pressure measurement and use Grafana Prepare for tool visual interface pressure test results .

however , For small programs that the computer does not support access for the time being , You can only capture packets through a mobile agent . This article mainly demonstrates how to use Charles adopt Mobile agent Capture packets for small programs .

Charles To configure

One 、 Configure the root certificate on the computer side

  1. open Charles, Install root certificate

2. After successful installation, the key chain access interface will pop up , Here's the picture :

3. Double click the certificate , The certificate details interface pops up , Click on 「 trust 」 Options , Configured to always trust , Pictured :

Two 、 Configure the root certificate on the mobile terminal

  1. Choose to install the certificate of the mobile terminal on the computer

2. Display after selection IP And port number , For mobile phone settings http agent

3. The network of the mobile phone is set to that of the computer http agent PS: At this time, it must be ensured that the mobile phone and the computer are on the same network , And the mobile phone can access the computer ip And port ( It is recommended that the computer and mobile phone be connected to the same hotspot /WiFi)

4. When you access the network after setting up , The server will pop up a prompt , Click on Allow( Agree to connect )

5. Mobile phone installed Charles Of https certificate Method 1 : Mobile browser access chls.pro/ssl Download the certificate Method 2 : Save the certificate on the computer and import it into the mobile phone , After successful import, you can directly install the certificate on the mobile phone

3、 ... and 、 Configure the computer side capture rules

  1. Get into Charles Of SSL Agent settings :

2. Tick start SSL agent , And add a crawl rule , For example, here we add a grab all https(443 port ) Request :

3. At this time, the phone opens https Application requested , You can see the normal https The requested data is missing :

summary

This article mainly introduces how to use Charles adopt Mobile agent Capture packets for small programs . For example, there are other problems in the process of capturing packets , Welcome to comment on .

Reference resources :https://www.jianshu.com/p/adcbc085fcae

原网站

版权声明
本文为[cailynyu]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/10/20211019173626113k.html