From 6aaf7d3960142c9ddfe54e2963ed7d9210c499f1 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 22 Nov 2022 00:28:20 +0100 Subject: [PATCH] Fixes #5240 --- lib/core/settings.py | 2 +- lib/request/httpshandler.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 6aaf6d599..609b5c18a 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -20,7 +20,7 @@ from thirdparty import six from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.6.11.6" +VERSION = "1.6.11.7" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) diff --git a/lib/request/httpshandler.py b/lib/request/httpshandler.py index 15bb41ff4..3bac276d5 100644 --- a/lib/request/httpshandler.py +++ b/lib/request/httpshandler.py @@ -69,7 +69,7 @@ class HTTPSConnection(_http_client.HTTPSConnection): sock = create_sock() if protocol not in _contexts: _contexts[protocol] = ssl.SSLContext(protocol) - if self.cert_file and self.key_file: + if getattr(self, "cert_file") and getattr(self, "key_file"): _contexts[protocol].load_cert_chain(certfile=self.cert_file, keyfile=self.key_file) try: # Reference(s): https://askubuntu.com/a/1263098 @@ -94,7 +94,7 @@ class HTTPSConnection(_http_client.HTTPSConnection): for protocol in _protocols: try: sock = create_sock() - _ = ssl.wrap_socket(sock, keyfile=self.key_file, certfile=self.cert_file, ssl_version=protocol) + _ = ssl.wrap_socket(sock, keyfile=getattr(self, "key_file"), certfile=getattr(self, "cert_file"), ssl_version=protocol) if _: success = True self.sock = _