mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-07-11 19:13:12 +00:00
Switching to the getSafeExString (where it can be used)
This commit is contained in:
parent
7a261ef447
commit
f494004f44
15 changed files with 66 additions and 39 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue