mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-02-10 07:26:36 +00:00
Proper patch for #6000
This commit is contained in:
@@ -19,7 +19,7 @@ from lib.core.enums import OS
|
||||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.10.1.2"
|
||||
VERSION = "1.10.1.3"
|
||||
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)
|
||||
|
||||
@@ -65,6 +65,7 @@ class HTTPSConnection(_http_client.HTTPSConnection):
|
||||
# https://www.mnot.net/blog/2014/12/27/python_2_and_tls_sni
|
||||
if hasattr(ssl, "SSLContext"):
|
||||
for protocol in (_ for _ in _protocols if _ >= ssl.PROTOCOL_TLSv1):
|
||||
sock = None
|
||||
try:
|
||||
sock = create_sock()
|
||||
if protocol not in _contexts:
|
||||
@@ -94,6 +95,8 @@ class HTTPSConnection(_http_client.HTTPSConnection):
|
||||
sock.close()
|
||||
except (ssl.SSLError, socket.error, _http_client.BadStatusLine, AttributeError) as ex:
|
||||
self._tunnel_host = None
|
||||
if sock:
|
||||
sock.close()
|
||||
logger.debug("SSL connection error occurred for '%s' ('%s')" % (_lut[protocol], getSafeExString(ex)))
|
||||
|
||||
elif hasattr(ssl, "wrap_socket"):
|
||||
|
||||
Reference in New Issue
Block a user