diff --git a/lib/request/inject.py b/lib/request/inject.py index 6126117c6..ec2c1ef1a 100644 --- a/lib/request/inject.py +++ b/lib/request/inject.py @@ -291,16 +291,18 @@ def __goInferenceProxy(expression, fromUser=False, expected=None, batch=False, r stopLimit = 1 elif (not count or int(count) == 0): - warnMsg = "the SQL query provided does not " - warnMsg += "return any output" - logger.warn(warnMsg) + if not count: + warnMsg = "the SQL query provided does not " + warnMsg += "return any output" + logger.warn(warnMsg) return None elif (not count or int(count) == 0) and (not stopLimit or stopLimit == 0): - warnMsg = "the SQL query provided does not " - warnMsg += "return any output" - logger.warn(warnMsg) + if not count: + warnMsg = "the SQL query provided does not " + warnMsg += "return any output" + logger.warn(warnMsg) return None diff --git a/lib/techniques/error/use.py b/lib/techniques/error/use.py index 13291a148..3589f2622 100644 --- a/lib/techniques/error/use.py +++ b/lib/techniques/error/use.py @@ -320,9 +320,10 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False): stopLimit = 1 elif (not count or int(count) == 0): - warnMsg = "the SQL query provided does not " - warnMsg += "return any output" - logger.warn(warnMsg) + if not count: + warnMsg = "the SQL query provided does not " + warnMsg += "return any output" + logger.warn(warnMsg) return outputs diff --git a/lib/techniques/union/use.py b/lib/techniques/union/use.py index 8178c6422..0462cd078 100644 --- a/lib/techniques/union/use.py +++ b/lib/techniques/union/use.py @@ -261,9 +261,10 @@ def unionUse(expression, unpack=True, dump=False): stopLimit = 1 elif (not count or int(count) == 0): - warnMsg = "the SQL query provided does not " - warnMsg += "return any output" - logger.warn(warnMsg) + if not count: + warnMsg = "the SQL query provided does not " + warnMsg += "return any output" + logger.warn(warnMsg) return value diff --git a/lib/utils/hash.py b/lib/utils/hash.py index 9a9d137be..573f86266 100644 --- a/lib/utils/hash.py +++ b/lib/utils/hash.py @@ -315,13 +315,16 @@ def attackCachedUsersPasswords(): def attackDumpedTable(): if kb.data.dumpedTable: - infoMsg = "analyzing table dump for possible password hashes" - logger.info(infoMsg) - table = kb.data.dumpedTable columns = table.keys() count = table["__infos__"]["count"] + if not count: + return + + infoMsg = "analyzing table dump for possible password hashes" + logger.info(infoMsg) + found = False colUser = '' colPasswords = set()