SslMasterKey
Retrieve the Master Key and Client Random from an ssl.SSLSocket
Install / Use
/learn @joernheissler/SslMasterKeyREADME
SslMasterKey
Python module to retrieve the Master Key and Client Random from an ssl.SSLSocket.
This can be used to decrypt TLS traffic with WireShark. See https://wiki.wireshark.org/SSL#Using_the_.28Pre.29-Master-Secret for more details.
Deprecated
For python >= 3.8 use https://docs.python.org/3/library/ssl.html#ssl.SSLContext.keylog_filename instead!
Requirements
- cpython
- libssl1.1
Usage
- Dump your encrypted traffic into a pcap file.
- Use
get_ssl_master_keyon yourssl.SSLSocket. - Write its output (
CLIENT_RANDOM .....) into a text file. - In WireShark in the protocol preferences for SSL, set the "(Pre)-Master-Secret log filename" to this file.
- Load the pcap file.
Help wanted
The code is ugly. Please improve it, e.g.:
- Port it to cffi
- Add support for other OpenSSL versions
- Add support for PyPy
Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
