Appendix L — TLS Handshakes and Ports Answers
Completed Check
HTTPS commonly uses TCP 443, and TLS handshake messages are exchanged before protected application data. Sockets sit below HTTP, so this project reads and writes bytes directly instead of using a friendly web client.
This works because Heartbleed is below HTTP. The code has to think in sockets and TLS records, while the port table simply helps you recognise where TLS-protected services commonly live.
Computers may be very proper about handshakes, but Python still needs us to choose the right layer. requests.get() is wonderful for web pages; it’s the wrong tool for inspecting raw TLS record behaviour.
References: IANA service names and ports, RFC 5246, and Python socket.