diff --git a/lib/core/common.py b/lib/core/common.py index 669c791fc..241e4d75a 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -3161,24 +3161,28 @@ def isTechniqueAvailable(technique): else: return getTechniqueData(technique) is not None -def isHeavyQueryBased(): +def isHeavyQueryBased(technique=None): """ - Returns True whether time-based or stacked payloads are based on heavy queries + Returns True whether current (kb.)technique is heavy-query based >>> pushValue(kb.injection.data) - >>> kb.injection.data[PAYLOAD.TECHNIQUE.STACKED] = [test for test in getSortedInjectionTests() if "heavy" in test["title"].lower()][0] + >>> pushValue(kb.technique) + >>> kb.technique = PAYLOAD.TECHNIQUE.STACKED + >>> kb.injection.data[kb.technique] = [test for test in getSortedInjectionTests() if "heavy" in test["title"].lower()][0] >>> isHeavyQueryBased() True + >>> kb.technique = popValue() >>> kb.injection.data = popValue() """ retVal = False - for technique in getPublicTypeMembers(PAYLOAD.TECHNIQUE, True): + technique = technique or kb.technique + + if isTechniqueAvailable(technique): data = getTechniqueData(technique) if data and "heavy query" in data["title"].lower(): retVal = True - break return retVal diff --git a/lib/core/settings.py b/lib/core/settings.py index 8546f20cd..83e860baf 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty import six # sqlmap version (...) -VERSION = "1.3.5.77" +VERSION = "1.3.5.78" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)