iOS开发辅助工具-抓包工具-charles青花瓷
https://www.jianshu.com/p/ead1605c6445
https://www.jianshu.com/p/5539599c7a25
十分钟学会Charles抓包(iOS的http/https请求)
Roy_Liang关注赞赏支持
十分钟学会Charles抓包(iOS的http/https请求)
Roy_Liang关注
72016.09.08 18:59:23字数 533阅读 233,961
Charles安装
HTTP抓包
HTTPS抓包

1. Charles安装
官网下载安装Charles:
https://www.charlesproxy.com/download/
2. HTTP抓包
(1)查看电脑IP地址

(2)设置手机HTTP代理
手机连上电脑,点击“设置->无线局域网->连接的WiFi”,设置HTTP代理:
服务器为电脑IP地址:如192.168.1.169
端口:8888

设置代理后,需要在电脑上打开Charles才能上网
(3)电脑上打开Charles进行HTTP抓包
手机上打开某个App或者浏览器什么的,如果不能上网,检查前面步骤是否正确

点击“Allow”允许,出现手机的HTTP请求列表

�HTTP抓包
3. HTTPS抓包
HTTPS的抓包需要在HTTP抓包基础上再进行设置
设置前抓包HTTPS是这样的

设置后抓包HTTPS长这样


以下为在HTTP抓包基础上进行HTTP抓包的进一步设置步骤:
(1)安装SSL证书到手机设备
点击 Help -> SSL Proxying -> Install Charles Root Certificate on a Mobile Device

出现弹窗得到地址 chls.pro/ssl

手机安装SSL证书的地址
在手机Safari浏览器输入地址 chls.pro/ssl,出现证书安装页面,点击安装
手机设置有密码的输入密码进行安装

�安装证书
注意1:有兄弟姐妹说Safari浏览器输入这个网址chls.pro/ssl安装不了证书的情况,
亲测要(1)设置好手机HTTP代理 (2)电脑上Charles要开着
注意2:iOS 10.3系统,需要在 设置→通用→关于本机→证书信任设置 里面启用完全信任Charles证书
(这里感谢@13002171223的提出这点 ,之前没升级10.3哈)
(2)�Charles设置Proxy
Proxy -> SSL Proxying Settings...

勾选Enable SSL Proxying,点击Add

Host设置要抓取的https接口,比如想抓这个

Host填写:https://api.weibo.cn
Port填写:443

(3)进行HTTPS抓包
让手机重新发送https请求,可看到抓包

HTTPS抓包
注意:不抓包请关闭手机HTTP代理,否则断开与电脑连接后会连不上网
----愿您有所收获~ end
478人点赞
iOS
"小礼物走一走,来关注我"
赞赏支持
共3人赞赏
Roy_Liang也有故事,也有酒。
总资产9 (约0.77元)共写了6090字获得613个赞共253个粉丝
关注
被以下专题收入,发现更多相似内容
收入我的专题
iOS 每天一读iOS开发专题iOS程序猿iOS学习笔记iOS网络相关电脑相关iOS收藏
展开更多
推荐阅读更多精彩内容
十分钟学会Charles抓包(iOS的http/https请求)
十分钟学会Charles抓包(iOS的http/https请求)
上官小五阅读 199评论 0赞 1
Charles抓包 (iOS的http/https请求)
文章出处:http://www.jianshu.com/p/5539599c7a25作者:Roy_Liang Ch...
whiteking阅读 1,031评论 0赞 5

Wireshark 抓包理解 HTTPS 请求流程
目录 准备 分析2.1. 三次握手2.2. 创建 HTTP 代理(非必要)2.3. TLS/SSL 握手2.4. ...
DestinLee阅读 21,303评论 12赞 91

Charles详解抓包http,https
原文地址: http://blog.devtang.com/2015/11/14/charles-introduc...
影er阅读 4,546评论 0赞 5

Charles抓包HTTP、HTTPS
抓包分析数据在移动开发中十分重要,可以帮助我们更快的了解数据构成,提高开发效率。但是在苹果要求上线的App必须使用...
梧雨北辰阅读 8,598评论 22赞 32

Roy_Liang
关注
总资产9 (约0.77元)
UIProgressView动画从小到大
阅读 4,292
iOS无线下载安装测试版本APP
阅读 2,348
推荐阅读
idea永久破解激活码
阅读 19,572
iPhone手机如何一步解决掉签问题?
阅读 2,424
iOS 逆向 Apple Configurator 2下载ipa包
阅读 423
【JS逆向】当乐网登录RSA | 每日JS
阅读 438
Bettertouchtool for Mac(触摸板增强工具) v3.225
阅读 133
评论178
赞478