Switching to the getSafeExString (where it can be used)

This commit is contained in:
Miroslav Stampar
2015-09-10 15:51:33 +02:00
parent 7a261ef447
commit f494004f44
15 changed files with 66 additions and 39 deletions

View File

@@ -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")