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:
@@ -556,11 +556,11 @@ class Connect(object):
|
||||
if hasattr(conn.fp, '_sock'):
|
||||
conn.fp._sock.close()
|
||||
conn.close()
|
||||
except Exception, ex:
|
||||
except Exception as ex:
|
||||
warnMsg = "problem occurred during connection closing ('%s')" % getSafeExString(ex)
|
||||
logger.warn(warnMsg)
|
||||
|
||||
except SqlmapConnectionException, ex:
|
||||
except SqlmapConnectionException as ex:
|
||||
if conf.proxyList and not kb.threadException:
|
||||
warnMsg = "unable to connect to the target URL ('%s')" % ex
|
||||
logger.critical(warnMsg)
|
||||
@@ -569,7 +569,7 @@ class Connect(object):
|
||||
else:
|
||||
raise
|
||||
|
||||
except urllib2.HTTPError, ex:
|
||||
except urllib2.HTTPError as ex:
|
||||
page = None
|
||||
responseHeaders = None
|
||||
|
||||
@@ -834,7 +834,7 @@ class Connect(object):
|
||||
|
||||
try:
|
||||
payload = function(payload=payload, headers=auxHeaders, delimiter=delimiter, hints=hints)
|
||||
except Exception, ex:
|
||||
except Exception as ex:
|
||||
errMsg = "error occurred while running tamper "
|
||||
errMsg += "function '%s' ('%s')" % (function.func_name, getSafeExString(ex))
|
||||
raise SqlmapGenericException(errMsg)
|
||||
@@ -1097,7 +1097,7 @@ class Connect(object):
|
||||
while True:
|
||||
try:
|
||||
compiler.parse(unicodeencode(conf.evalCode.replace(';', '\n')))
|
||||
except SyntaxError, ex:
|
||||
except SyntaxError as ex:
|
||||
if ex.text:
|
||||
original = replacement = ex.text.strip()
|
||||
if '=' in original:
|
||||
|
||||
Reference in New Issue
Block a user