Wireshark https抓包-macOS
2020-11-20 本文已影响0人
埃尔温薛定谔不养猫
在终端执行命令,打开新的 Chrome 浏览器
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/tmp/chrome --ssl-key-log-file=/tmp/.ssl-key.log
打开 Wireshark ,Wireshark - Perferences - Protocols - TLS ,在 (Pre)-Master-Secret log filename 输入 /tmp/.ssl-key.log
![](https://img.haomeiwen.com/i13520062/56951c131947176d.png)
然后就可以抓到 https 包了。
异常情况我没遇到过.. 先记录
出现 Opening in existing browser session.
解决方式:关闭掉用命令启动的 Chrome,然后重新运行 Chrome 启动命令
$ ps -ef | grep /tmp/.ssl | awk 'NR==1{print $2}' | xargs kill -9
$ /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/tmp/chrome --ssl-key-log-file=/tmp/.ssl-key.log