Mac中wireshark如何抓取HTTPS流量?

概述

某些场景下,我们需要分析网站https流量,chrome提供的DevTools工具在页面跳转时无法查看之前的请求。
使用wireshark能够全量抓取整个流程,本文主要是将网上查询到的资料整理,以便日后查阅。

步骤

chrome为例,mac中详细操作如下:

1. 查找浏览器

sudo find / -iname "Google Chrome"

可以找到binary所在路径为/Applications/Google Chrome.app/Contents/MacOS/Google Chrome

2. 运行chrome并指定sslkey logfile

sudo /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --ssl-key-log-file=/Users/`whoami`/sslkeylog.log

3. 启动wireshark,并配置sslkey文件

菜单栏 -> Wireshark -> Preferences -> Protocols -> SSL
(Pre)-Master-Secret log filename填入刚才启动时指定的文件路径,如图
572260-20180120122847193-333957705.png

4. 跟踪ssl stream

访问https站点, 然后在wireshark中过滤栏输入ssl,随便找个包
右键 -> Follow -> SSL Stream
即可看到解密后的http请求。

转载于:https://www.cnblogs.com/rainmote/p/8320369.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值