此方式支持firefox,chrome
建立path變量 SSLKEYLOGFILE=c:\ssl.key
重啟firefox chrome,訪問https網站會自動生成ssl session key
linux,mac 使用export建立變量
export SSLKEYLOGFILE=/tmp/ssl.key
打開wireshark,Edit--->Preferences--->Protocols--->ssl
在(pre) -master-secret log filename:這里填入c:\ssl.key
開始抓包,通過chrome或firefox走的https流量會自動解密