mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
Baby steps (2 to 3 at a time)
This commit is contained in:
@@ -1440,7 +1440,7 @@ def identifyWaf():
|
||||
try:
|
||||
logger.debug("checking for WAF/IPS product '%s'" % product)
|
||||
found = function(_)
|
||||
except Exception, ex:
|
||||
except Exception as ex:
|
||||
errMsg = "exception occurred while running "
|
||||
errMsg += "WAF script for '%s' ('%s')" % (product, getSafeExString(ex))
|
||||
logger.critical(errMsg)
|
||||
@@ -1543,11 +1543,11 @@ def checkConnection(suppressOutput=False):
|
||||
except socket.gaierror:
|
||||
errMsg = "host '%s' does not exist" % conf.hostname
|
||||
raise SqlmapConnectionException(errMsg)
|
||||
except socket.error, ex:
|
||||
except socket.error as ex:
|
||||
errMsg = "problem occurred while "
|
||||
errMsg += "resolving a host name '%s' ('%s')" % (conf.hostname, getSafeExString(ex))
|
||||
raise SqlmapConnectionException(errMsg)
|
||||
except UnicodeError, ex:
|
||||
except UnicodeError as ex:
|
||||
errMsg = "problem occurred while "
|
||||
errMsg += "handling a host name '%s' ('%s')" % (conf.hostname, getSafeExString(ex))
|
||||
raise SqlmapDataException(errMsg)
|
||||
@@ -1591,7 +1591,7 @@ def checkConnection(suppressOutput=False):
|
||||
port = match.group(1) if match else 443
|
||||
conf.url = re.sub(r":\d+(/|\Z)", ":%s\g<1>" % port, conf.url)
|
||||
|
||||
except SqlmapConnectionException, ex:
|
||||
except SqlmapConnectionException as ex:
|
||||
if conf.ipv6:
|
||||
warnMsg = "check connection to a provided "
|
||||
warnMsg += "IPv6 address with a tool like ping6 "
|
||||
|
||||
Reference in New Issue
Block a user