From 6da2e491004370715f1553d30b95af90f009140b Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 4 Nov 2016 15:04:38 +0100 Subject: [PATCH] Fixes #2261 --- lib/core/settings.py | 2 +- lib/request/httpshandler.py | 3 ++- txt/checksum.md5 | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index eee136a98..049e5034a 100755 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME from lib.core.enums import OS # sqlmap version (...) -VERSION = "1.0.11.0" +VERSION = "1.0.11.2" 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 21fcb0ba3..a27ede7bd 100644 --- a/lib/request/httpshandler.py +++ b/lib/request/httpshandler.py @@ -7,6 +7,7 @@ See the file 'doc/COPYING' for copying permission import distutils.version import httplib +import re import socket import urllib2 @@ -47,7 +48,7 @@ class HTTPSConnection(httplib.HTTPSConnection): # Reference(s): https://docs.python.org/2/library/ssl.html#ssl.SSLContext # https://www.mnot.net/blog/2014/12/27/python_2_and_tls_sni - if kb.tlsSNI.get(self.host) != False and hasattr(ssl, "SSLContext"): + if re.search(r"\A[\d.]+\Z", self.host) is None and kb.tlsSNI.get(self.host) != False and hasattr(ssl, "SSLContext"): for protocol in filter(lambda _: _ >= ssl.PROTOCOL_TLSv1, _protocols): try: sock = create_sock() diff --git a/txt/checksum.md5 b/txt/checksum.md5 index d26094786..268fc2113 100644 --- a/txt/checksum.md5 +++ b/txt/checksum.md5 @@ -45,7 +45,7 @@ e60456db5380840a586654344003d4e6 lib/core/readlineng.py 5ef56abb8671c2ca6ceecb208258e360 lib/core/replication.py 99a2b496b9d5b546b335653ca801153f lib/core/revision.py 7c15dd2777af4dac2c89cab6df17462e lib/core/session.py -c956b2508dd6a0b390b5ed3467f8009f lib/core/settings.py +e4a80a2ccebb066cefb26a187696d4bc lib/core/settings.py 7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py 23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py c3ace7874a536d801f308cf1fd03df99 lib/core/target.py @@ -70,7 +70,7 @@ c48285682a61d49982cb508351013cb4 lib/request/comparison.py 9bff6fe291805380c6a74d0cda6684a5 lib/request/connect.py d4d52c1073c75a6eecd2ebb98b670b96 lib/request/direct.py 4ae7f4570fb859045f0487cc0b055a8e lib/request/dns.py -70ceefe39980611494d4f99afb96f652 lib/request/httpshandler.py +58f63132eb56ad41ae6af4fe61933a2d lib/request/httpshandler.py cc9c82cfffd8ee9b25ba3af6284f057e lib/request/__init__.py 62aff2a7bdd43f6e4d33385f57ec3e4c lib/request/inject.py 3fc323d525beddd14cd4d4dca4934fa8 lib/request/methodrequest.py