mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 04:31:30 +00:00
Switching to the getSafeExString (where it can be used)
This commit is contained in:
@@ -9,6 +9,7 @@ import httplib
|
||||
import socket
|
||||
import urllib2
|
||||
|
||||
from lib.core.common import getSafeExString
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
from lib.core.exception import SqlmapConnectionException
|
||||
@@ -57,7 +58,7 @@ class HTTPSConnection(httplib.HTTPSConnection):
|
||||
sock.close()
|
||||
except (ssl.SSLError, socket.error, httplib.BadStatusLine), ex:
|
||||
self._tunnel_host = None
|
||||
logger.debug("SSL connection error occurred ('%s')" % ex.message)
|
||||
logger.debug("SSL connection error occurred ('%s')" % getSafeExString(ex))
|
||||
|
||||
# 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
|
||||
@@ -77,7 +78,7 @@ class HTTPSConnection(httplib.HTTPSConnection):
|
||||
sock.close()
|
||||
except (ssl.SSLError, socket.error, httplib.BadStatusLine), ex:
|
||||
self._tunnel_host = None
|
||||
logger.debug("SSL connection error occurred ('%s')" % ex.message)
|
||||
logger.debug("SSL connection error occurred ('%s')" % getSafeExString(ex))
|
||||
|
||||
if not success:
|
||||
raise SqlmapConnectionException("can't establish SSL connection")
|
||||
|
||||
Reference in New Issue
Block a user