Created
September 4, 2017 15:13
-
-
Save Integralist/2718a4eb51b00a7a4138fd182566c53b to your computer and use it in GitHub Desktop.
[Check TLS version using by Python] #python #tls #ssl
This file contains hidden or 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
# Python 3.5.2-slim | |
import json | |
from tornado.httpclient import HTTPClient | |
response = HTTPClient().fetch("https://www.howsmyssl.com/a/check").body.decode() | |
data = json.loads(response) | |
tls_version = data["tls_version"] | |
print(tls_version)" # TLS 1.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The quotation mark at the last line is a syntax error and should be removed. Otherwise works. Thanks!