Improve CertificateInfo.py - URLs no longer need to be the base URL of the site.

This commit is contained in:
AccentuSoft
2022-04-14 10:55:00 +03:00
parent 40a9f8befb
commit 94d8506e8e

View File

@@ -22,7 +22,7 @@ class CertificateInfo:
websiteURL = entity['URL']
if not websiteURL.startswith('https'):
continue # Ignore non-https sites
addressWithoutHttps = websiteURL[8:]
addressWithoutHttps = websiteURL[8:].split('/')[0]
with sslContext.wrap_socket(socket.socket(), server_hostname=addressWithoutHttps) as s:
try: