mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-10 09:49:06 +00:00
Update related to the last commit
This commit is contained in:
@@ -770,8 +770,8 @@ def _bruteProcessVariantA(attack_info, hash_regex, suffix, retVal, proc_id, proc
|
||||
except (UnicodeEncodeError, UnicodeDecodeError):
|
||||
pass # ignore possible encoding problems caused by some words in custom dictionaries
|
||||
|
||||
except Exception, e:
|
||||
warnMsg = "there was a problem while hashing entry: %s (%s). " % (repr(word), e)
|
||||
except Exception as ex:
|
||||
warnMsg = "there was a problem while hashing entry: %s ('%s'). " % (repr(word), getSafeExString(ex))
|
||||
warnMsg += "Please report by e-mail to '%s'" % DEV_EMAIL_ADDRESS
|
||||
logger.critical(warnMsg)
|
||||
|
||||
@@ -847,8 +847,8 @@ def _bruteProcessVariantB(user, hash_, kwargs, hash_regex, suffix, retVal, found
|
||||
except (UnicodeEncodeError, UnicodeDecodeError):
|
||||
pass # ignore possible encoding problems caused by some words in custom dictionaries
|
||||
|
||||
except Exception, e:
|
||||
warnMsg = "there was a problem while hashing entry: %s (%s). " % (repr(word), e)
|
||||
except Exception as ex:
|
||||
warnMsg = "there was a problem while hashing entry: %s ('%s'). " % (repr(word), getSafeExString(ex))
|
||||
warnMsg += "Please report by e-mail to '%s'" % DEV_EMAIL_ADDRESS
|
||||
logger.critical(warnMsg)
|
||||
|
||||
|
||||
@@ -76,8 +76,8 @@ class SQLAlchemy(GenericConnector):
|
||||
raise
|
||||
except SqlmapFilePathException:
|
||||
raise
|
||||
except Exception, msg:
|
||||
raise SqlmapConnectionException("SQLAlchemy connection issue ('%s')" % msg[0])
|
||||
except Exception as ex:
|
||||
raise SqlmapConnectionException("SQLAlchemy connection issue ('%s')" % ex[0])
|
||||
|
||||
self.printConnected()
|
||||
else:
|
||||
@@ -89,17 +89,17 @@ class SQLAlchemy(GenericConnector):
|
||||
for row in self.cursor.fetchall():
|
||||
retVal.append(tuple(row))
|
||||
return retVal
|
||||
except _sqlalchemy.exc.ProgrammingError, msg:
|
||||
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % msg.message if hasattr(msg, "message") else msg)
|
||||
except _sqlalchemy.exc.ProgrammingError as ex:
|
||||
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % ex.message if hasattr(ex, "message") else ex)
|
||||
return None
|
||||
|
||||
def execute(self, query):
|
||||
try:
|
||||
self.cursor = self.connector.execute(query)
|
||||
except (_sqlalchemy.exc.OperationalError, _sqlalchemy.exc.ProgrammingError), msg:
|
||||
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % msg.message if hasattr(msg, "message") else msg)
|
||||
except _sqlalchemy.exc.InternalError, msg:
|
||||
raise SqlmapConnectionException(msg[1])
|
||||
except (_sqlalchemy.exc.OperationalError, _sqlalchemy.exc.ProgrammingError) as ex:
|
||||
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % ex.message if hasattr(ex, "message") else ex)
|
||||
except _sqlalchemy.exc.InternalError as ex:
|
||||
raise SqlmapConnectionException(ex[1])
|
||||
|
||||
def select(self, query):
|
||||
self.execute(query)
|
||||
|
||||
@@ -22,8 +22,8 @@ def timeout(func, args=(), kwargs={}, duration=1, default=None):
|
||||
try:
|
||||
self.result = func(*args, **kwargs)
|
||||
self.timeout_state = TIMEOUT_STATE.NORMAL
|
||||
except Exception, msg:
|
||||
logger.log(CUSTOM_LOGGING.TRAFFIC_IN, msg)
|
||||
except Exception as ex:
|
||||
logger.log(CUSTOM_LOGGING.TRAFFIC_IN, ex)
|
||||
self.result = default
|
||||
self.timeout_state = TIMEOUT_STATE.EXCEPTION
|
||||
|
||||
|
||||
Reference in New Issue
Block a user