mac_Charles抓包_02_https

注意:如果mac上的apple id 登录时提示:连接apple id服务器时出错,那么请退出抓包工具=====================

首先下载Charles V4.0

然后就是免费注册(如果免费注册过程中,即charles.jar进行包内覆盖时,出现了程序损坏,说要扔进垃圾箱时,先按住ctrl,再打开程序即可)

免费注册后,效果如下:


打开抓包时,发现许多网站打不开,说是https连接提示证书不信任,关掉Charles又可以正常访问

这时候,就需要打开应用,找到Help菜单,如图所示



根据官网的提示安装即可安装证书:

https://www.charlesproxy.com/documentation/using-charles/ssl-certificates/

https://www.charlesproxy.com/documentation/proxying/ssl-proxying/

具体步骤摘抄如下:

SSL Certificates

Charles generates its own certificates for sites, which it signs using a Charles Root Certificate, which is uniquely generated for your installation of Charles (as of v3.10). You will see a warning in your browser, or other application, when it receives that certificate because the Charles Root Certificate is not in your list of trusted root certificates. See SSL Proxying.

You can choose to permanently trust each site's certificate as you encounter it, in which case you do not need to trust the Charles Root Certificate. If you would like to automatically trust every certificate issued by Charles, continue with these instructions.

The following instructions are for different browsers and applications to help you trust your Charles Root Certificate so you no longer see certificate warnings.

Note that the Charles Root Certificate approach changed with version 3.10 of Charles, so if you have already followed this procedure for an older version of Charles you will need to do it again.


Mozilla Firefox

First ensure that Firefox is connected to Charles. You should see browsing from Firefox being recorded in Charles.

Visit https://chls.pro/ssl in Firefox. You will be presented with a certificate import dialog. Tick the option "Trust this CA to identify websites" and complete the import.
macOS

In Charles go to the Help menu and choose "SSL Proxying > Install Charles Root Certificate". Keychain Access will open. Find the "Charles Proxy..." entry, and double-click to get info on it. Expand the "Trust" section, and beside "When using this certificate" change it from "Use System Defaults" to "Always Trust". Then close the certificate info window, and you will be prompted for your Administrator password to update the system trust settings.

You may need to quit and reopen Safari to see the change.
iOS devices  真机设备请注意:
第1步,使用代理 第2步手机下载证书:https://chls.pro/ssl,第3步:千万记得要打开开关:通用->关于->证书信任设置(最底部)->Charles Proxy CA(打开开关)
    Set your iOS device to use Charles as its HTTP proxy in the Settings app > Wifi settings.
    Open Safari and browse to https://chls.pro/ssl. Safari will prompt you to install the SSL certificate.
    If you are on iOS 10.3 or later, open the Settings.app and navigate to General > About > Certificate Trust Settings, and find the Charles Proxy certificate, and switch it on to enable full trust for it (More information about this change in iOS 10).
    Now you should be able to access SSL websites with Charles using SSL Proxying.

Charles supports App Transport Security (ATS) as of the 3.11.4 release.
iOS Simulators

Quit your iOS Simulator. Launch Charles and go to the Help menu. Choose the "SSL Proxying > Install Charles Root Certificate in iOS Simulators" item. This will install your Charles Root Certificate into all of your iOS Simulators. Now when you start the iOS Simulator, you should be able to access SSL websites with Charles using SSL Proxying.



Google Chrome

On macOS, please follow the instructions for macOS above. These instructions only apply on Windows.

In Charles go to the Help menu and choose "SSL Proxying > Save Charles Root Certificate". Save the root certificate as a Binary Certificate (.cer) to your desktop, or somewhere where you can easily access it in the next step.

In Chrome, open the Settings. At the bottom of the settings page, click "Advanced" to open the advanced section, then click the "Manage certificates…" button.

Go to the "Trusted Root Certification Authorities" tab and click "Import…".

Find the certificate file you saved from Charles in the previous step, then click Next and Finish, leaving the default options, until you complete the import. Chrome will now always trust certificates signed by Charles.

After importing you can delete the certificate file that you saved.




Python

Python's requests module will fail with an error when you try to use it with SSL Proxying in Charles:

 requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate
 verify failed (_ssl.c:590)

You can configure requests to trust your Charles Root Certificate. First save your certificate as a .pem file using the Help > SSL Proxying > Save Charles Root Certificate menu. Then configure your Session as follows:

from requests import Session

session = Session()
session.verify = "charles-ssl-proxying-certificate.pem"





### 回答1: Mac Charles是一款流行的抓包工具,可以用于HTTP和HTTPS协议的抓包。对于HTTPS协议,Mac Charles可以通过中间人攻击的方式,将客户端和服务器之间的通信流量拦截下来,从而实现抓包。但是需要注意的是,这种方式可能会引起安全问题,因此在使用时需要谨慎。 ### 回答2: Mac Charles是一款强大的抓包工具,可以用于分析网络流量。其中,HTTPS是一种安全的HTTP协议,采用了SSL或TLS加密技术,可以保护数据的安全性。在HTTPS通讯中,传输数据是通过加密的通道传输的,因此在通讯过程中很难对数据进行篡改或者窃听。 然而,我们仍然可以使用Mac CharlesHTTPS通讯进行抓包。具体步骤如下: 1. 安装证书。首先需要安装Mac Charles的证书,以便Mac Charles可以拦截和分析HTTPS请求。可以打开Mac Charles的Proxy菜单,选择SSL Proxy Settings,在这里可以生成和安装证书。 2. 配置代理。在Mac Charles的Proxy菜单中,选择Proxy Settings,在这里可以配置浏览器和其他应用程序的代理设置。在这里可以设置代理服务器和端口号。 3. 开始抓包。现在可以使用浏览器访问HTTPS网站,Mac Charles会自动拦截和分析请求,显示请求和响应的内容。在这里可以查看请求和响应的头部和主体信息,可以对数据进行修改和重放。可以使用Mac Charles的过滤器,筛选出感兴趣的请求和响应。 需要注意的是,在使用Mac Charles抓包时,不要泄露敏感信息,不要对他人的HTTPS请求进行窃听和篡改。 ### 回答3: Mac Charles 是一款非常实用的抓包工具,具有很好的协议支持和功能完善的优点。当我们想要抓取 HTTPS 请求时,Mac Charles 也可以做到。下面我将为大家详细介绍一下 Mac Charles 抓包 HTTPS 的方法。 首先,我们需要在 Mac 中安装并打开 Mac Charles 抓包工具。接着,在工具的菜单栏里点击“Proxy”,然后选择“SSL Proxying Setting...”进入 SSL 代理设置界面。在该界面中,我们需要勾选上“Enable SSL Proxying”的选项,然后点击“Add/Edit”按钮,添加需要抓包HTTPS 请求域名,如“*.google.com”。此外,对于需要用户授权的 HTTPS 请求,我们还需要在 SSL Proxying Setting 界面中点击“SSL Proxying”标签,然后勾选上“Enable SSL Proxying”。这样就可以实现对 HTTPS 请求的抓包了。 在进行实际操作时,我们需要在 Mac Charles 工具的主界面点击“Record”按钮,开始录制 HTTPS 请求。在此过程中,如果出现 SSL Proxying 请求时,Mac Charles 工具会提示用户要进行证书安装,用户需要在弹出的对话框中点击“Install”按钮来安装证书。证书安装过程中会提示要输入 Mac 的管理员密码,用户需要根据提示输入密码,完成证书安装即可。安装完成后,我们就可以重新发起 HTTPS 请求,此时 Mac Charles 就可以抓包 HTTPS 请求了。 总之,通过上述方法,我们可以使用 Mac Charles 工具抓包 HTTPS 请求,实现对 HTTPS 请求的数据抓取和分析。这对于我们了解网络通信过程中的数据传输和数据处理起到了非常重要的帮助作用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值