Skip to content

Instantly share code, notes, and snippets.

@yuri1969
yuri1969 / extract-pre-master-secret.py
Last active September 15, 2021 12:52 — forked from tsaarni/extract-pre-master-secret.py
Extract keys to decrypt Java TLS stream
#!/usr/bin/env python3
#
# Extract TLS pre-master secret to decrypt captured TLS stream in Wireshark
#
# Java TLS implementation can be configured to dump information on TLS stream,
# making it possible to extracting TLS key for decrypting the stream for debug
# purposes.
#
# This script is originally by Timothy Basanov
# https://timothybasanov.com/2016/05/26/java-pre-master-secret.html