Skip to content

Instantly share code, notes, and snippets.

@Integralist
Created September 4, 2017 15:13
Show Gist options
  • Save Integralist/2718a4eb51b00a7a4138fd182566c53b to your computer and use it in GitHub Desktop.
Save Integralist/2718a4eb51b00a7a4138fd182566c53b to your computer and use it in GitHub Desktop.
[Check TLS version using by Python] #python #tls #ssl
# 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
@5j9
Copy link

5j9 commented Apr 4, 2018

The quotation mark at the last line is a syntax error and should be removed. Otherwise works. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment