Created
March 4, 2021 22:50
-
-
Save charleswhchan/f3228181d5d943b1a5d52751940a9605 to your computer and use it in GitHub Desktop.
Check TLS version used by Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import urllib.request | |
with urllib.request.urlopen('http://www.howsmyssl.com/a/check') as response: | |
response = response.read() | |
data = json.loads(response.decode()) | |
tls_version = data["tls_version"] | |
print(tls_version) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment