firefox,chrome會將 TLS 會話中使用的對稱密鑰保存在外部文件中。linux
1.創建環境變量chrome
linux,mac 使用export創建變量:export SSLKEYLOGFILE=/tmp/ssl.keyfirefox
2.打開wireshark>>>Edit>>>Preferences>>>Protocols>>>ssl>>>填入路徑blog
3.開始抓包,經過chrome或firefox走的https流量會自動解密ssl