mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-10-21 03:03:50 +00:00
Proper patch for #6000
This commit is contained in:
parent
ec123bafb1
commit
8c9e70496b
3 changed files with 7 additions and 4 deletions
|
|
@ -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"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue