dnc

CLI tool to check domain names configuration and statistics
Log | Files | Refs | README | LICENSE

commit 9301655030d8d2efcaa5aa50b7e881efeb2185a5
parent 01cb02863f7a0f1210428a12b50ff2797a7d9778
Author: Frederic Cambus <fred@statdns.com>
Date:   Tue, 19 Jan 2021 14:52:28 +0100

Also catch socket.error exceptions in the tls() function.

Diffstat:
Mdnc.py | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dnc.py b/dnc.py @@ -36,7 +36,7 @@ def query(domain: str, rrtype: str) -> str: def tls(domain: str, _: str) -> str: try: cert = ssl.get_server_certificate((domain, 443)) - except socket.timeout: + except (socket.error, socket.timeout) as error: return "No TLS" x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, cert)