Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e4ed1c0

Browse files
committed
Minor error message improvement (SSL issues)
1 parent aee47d3 commit e4ed1c0

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/request/httpshandler.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
See the file 'doc/COPYING' for copying permission
66
"""
77

8+
import distutils.version
89
import httplib
910
import socket
1011
import urllib2
@@ -13,6 +14,7 @@
1314
from lib.core.data import kb
1415
from lib.core.data import logger
1516
from lib.core.exception import SqlmapConnectionException
17+
from lib.core.settings import PYVERSION
1618

1719
ssl = None
1820
try:
@@ -84,7 +86,10 @@ def create_sock():
8486
logger.debug("SSL connection error occurred ('%s')" % getSafeExString(ex))
8587

8688
if not success:
87-
raise SqlmapConnectionException("can't establish SSL connection")
89+
errMsg = "can't establish SSL connection"
90+
if distutils.version.LooseVersion(PYVERSION) < distutils.version.LooseVersion("2.7.10"):
91+
errMsg += " (please retry with Python >= 2.7.10)"
92+
raise SqlmapConnectionException(errMsg)
8893

8994
class HTTPSHandler(urllib2.HTTPSHandler):
9095
def https_open(self, req):

0 commit comments

Comments
 (0)