Charles配置证书抓取盒子HTTPS方法
Charles配置
-
首先进入Charles页面,在帮助栏选择SSL Proxying,点击另存为本地; -
获取 Charles 证书放置在系统安装证书目录的文件名(使用下面的命令获取的字符串,加上.0就是文件名称;完整文件名如:f4c3e66ec.0);
openssl x509 -inform PEM -subject_hash_old -in charles-ssl-proxying-certificate.pem | head -1
- 连接盒子,并且remount;
adb connect <ip>
adb root
adb remount
- 将Charles证书放置于系统安装证书目录;
adb push charles-ssl-proxying-certificate.pem /system/etc/security/cacerts/f4c3e66e.0
- 修改Charles证书权限;
chmod 644 /system/etc/security/cacerts/f4c3e66e.0
使用Charles获取电视机顶盒的请求
Charles通过代理命令让盒子走代理
备注:Android9.0设置代理之前需把机顶盒里的/data/system/users/0/settings_global.xml 文件pull到本地,当需要删除代理时,直接拿本地文件替换掉机顶盒里的这个文件就OK了
adb shell settings put global http_proxy <本机ip + 端口>
删除设置的代理
进入shell,且已获取盒子roo权限&&remount权限
支持android 4.x
adb shell
sqlite3 /data/data/com.android.providers.settings/databases/settings.db
select * from global;
delete from global where name="global_http_proxy_host";
delete from global where name="global_http_proxy_port";
delete from global where name="http_proxy";
|