sailei1 / blog

1 stars 0 forks source link

Android9.0配置charles的https抓包 #60

Closed sailei1 closed 5 years ago

sailei1 commented 5 years ago

第一步# 在Proxy Settings - Proxies HTTP Proxy中勾选Enable transparent HTTP proxying

第二步# 手机浏览器打开http://chls.pro/ssl ,下载证书文件,然后将下载到的证书文件发送给电脑

第三步#

// 依次执行以下命令
1.openssl x509 -inform PEM -subject_hash_old -in getssl.crt | head -1
得到类似字符串:f8ccc956
2.cat getssl.crt > f8ccc956.0
3.openssl x509 -inform PEM -text -in getssl.crt -out /dev/null >> f8ccc956.0
4.把生成好的文件放入手机的 /system/etc/security/cacerts 目录下
5 找到文件 输入密码安装

第四步 手机上查看证书文件

用chrome 或者webview 抓包

sailei1 commented 4 years ago
openssl x509 -inform PEM -subject_hash -in charles-proxy-ssl-proxying-certificate.pem | head -1
925d60ef

cat charles-proxy-ssl-proxying-certificate.pem > 925d60ef.0

openssl x509 -inform PEM -text -in charles-proxy-ssl-proxying-certificate.pem -out /dev/null >> 925d60ef.0

925d60ef.0.crt
sailei1 commented 2 years ago

// 必须root 才行 adb push 820571b0.0 /system/etc/security/cacerts/ adb shell cd /system/etc/security/cacerts/ chmod 644 820571b0.0