Choosing Text, Keylog, or pcapng
Choose by the artifact you need
| Mode | Input from the workload | Local artifact | What a v2 network receiver gets |
|---|---|---|---|
--model text --text-source pcapng (default) | Packets on one interface and TLS secrets | Optional --pcapfile and/or --keylogfile | Decoded TEXT with available metadata |
--model text --text-source hook | TLS library or Go function I/O | Formatted events via --output | TEXT from individual calls |
--model keylog | TLS secrets | Required --keylogfile in NSS Key Log format | KEYLOG with encoded NSS bytes |
--model pcapng | Packets on one interface and TLS secrets | Required --pcapfile, optional --keylogfile | PCAPNG with encoded pcapng bytes |
Every mode also produces runtime logs. In text mode, local --output files contain logs and events as Protobuf v2 JSON Lines. In native modes they contain only logs. Keep native paths and JSON Lines paths distinct. Destination and mode matrix
Examples for the same OpenSSL request
sudo ecapture tls --model text --text-source pcapng --output stdout --output session.jsonl
sudo ecapture tls --model keylog --keylogfile session.keys
sudo ecapture tls --model pcapng --pcapfile session.pcapngChoose a single command and open the connection after starting capture. For Go workloads, change the command to gotls --elfpath /path/to/app. For GnuTLS on Linux, use gnutls and supply --gnutls when the library is outside the searched paths. Set -i if the traffic is on another interface.
Choose the verification method
- For decoded messages, check the request path and response from the same connection. A socket read can split or combine messages, which affects the explicit hook source.
- For a keylog, collect the packets independently during the same connection. Secrets alone cannot show event order, retransmissions or request contents.
- For a pcapng, open the native file in Wireshark. A trace may contain packets for which no matching secret was collected. Verify a known application message in the decrypted stream.
To view a request immediately and retain packets for a later check, add --pcapfile session.pcapng to the first command. In that configuration the network event format remains TEXT. Verify decryption in Wireshark