mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-06-29 17:33:11 +03:00
quick fix of a fix
This commit is contained in:
parent
7cfeb5447b
commit
c1c525aaea
|
@ -1134,10 +1134,10 @@ def __setKnowledgeBaseAttributes():
|
||||||
kb.data = advancedDict()
|
kb.data = advancedDict()
|
||||||
|
|
||||||
# Injection types
|
# Injection types
|
||||||
kb.booleanTest = property(lambda self: isTechniqueAvailable(PAYLOAD.TECHNIQUE.BOOLEAN))
|
kb.booleanTest = None
|
||||||
kb.errorTest = property(lambda self: isTechniqueAvailable(PAYLOAD.TECHNIQUE.ERROR))
|
kb.errorTest = None
|
||||||
kb.stackedTest = property(lambda self: isTechniqueAvailable(PAYLOAD.TECHNIQUE.STACKED))
|
kb.stackedTest = None
|
||||||
kb.timeTest = property(lambda self: isTechniqueAvailable(PAYLOAD.TECHNIQUE.TIME))
|
kb.timeTest = None
|
||||||
kb.unionTest = None
|
kb.unionTest = None
|
||||||
|
|
||||||
# Basic back-end DBMS fingerprint
|
# Basic back-end DBMS fingerprint
|
||||||
|
|
|
@ -16,6 +16,8 @@ from lib.core.common import cleanQuery
|
||||||
from lib.core.common import dataToSessionFile
|
from lib.core.common import dataToSessionFile
|
||||||
from lib.core.common import dataToStdout
|
from lib.core.common import dataToStdout
|
||||||
from lib.core.common import expandAsteriskForColumns
|
from lib.core.common import expandAsteriskForColumns
|
||||||
|
from lib.core.common import getPublicTypeMembers
|
||||||
|
from lib.core.common import isTechniqueAvailable
|
||||||
from lib.core.common import parseUnionPage
|
from lib.core.common import parseUnionPage
|
||||||
from lib.core.common import popValue
|
from lib.core.common import popValue
|
||||||
from lib.core.common import pushValue
|
from lib.core.common import pushValue
|
||||||
|
@ -399,7 +401,7 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse
|
||||||
try:
|
try:
|
||||||
if conf.direct:
|
if conf.direct:
|
||||||
value = direct(expression)
|
value = direct(expression)
|
||||||
elif any(test is not None for test in [kb.booleanTest, kb.errorTest, kb.unionTest, kb.timeTest, kb.stackedTest]):
|
elif any(test is not None for test in map(isTechniqueAvailable, getPublicTypeMembers(PAYLOAD.TECHNIQUE, onlyValues=True))) or kb.unionTest:
|
||||||
query = cleanQuery(expression)
|
query = cleanQuery(expression)
|
||||||
query = expandAsteriskForColumns(query)
|
query = expandAsteriskForColumns(query)
|
||||||
value = None
|
value = None
|
||||||
|
@ -427,7 +429,7 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse
|
||||||
oldParamNegative = kb.unionNegative
|
oldParamNegative = kb.unionNegative
|
||||||
kb.unionNegative = False
|
kb.unionNegative = False
|
||||||
|
|
||||||
if error and kb.errorTest and not found:
|
if error and isTechniqueAvailable(PAYLOAD.TECHNIQUE.ERROR) and not found:
|
||||||
kb.technique = PAYLOAD.TECHNIQUE.ERROR
|
kb.technique = PAYLOAD.TECHNIQUE.ERROR
|
||||||
|
|
||||||
if expected == EXPECTED.BOOL:
|
if expected == EXPECTED.BOOL:
|
||||||
|
@ -437,7 +439,7 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse
|
||||||
|
|
||||||
found = value or (value is None and expectingNone)
|
found = value or (value is None and expectingNone)
|
||||||
|
|
||||||
if blind and kb.booleanTest and not found:
|
if blind and isTechniqueAvailable(PAYLOAD.TECHNIQUE.BOOLEAN) and not found:
|
||||||
kb.technique = PAYLOAD.TECHNIQUE.BOOLEAN
|
kb.technique = PAYLOAD.TECHNIQUE.BOOLEAN
|
||||||
|
|
||||||
if expected == EXPECTED.BOOL:
|
if expected == EXPECTED.BOOL:
|
||||||
|
@ -447,10 +449,10 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse
|
||||||
|
|
||||||
found = value or (value is None and expectingNone)
|
found = value or (value is None and expectingNone)
|
||||||
|
|
||||||
if time and (kb.timeTest or kb.stackedTest) and not found:
|
if time and (isTechniqueAvailable(PAYLOAD.TECHNIQUE.TIME) or isTechniqueAvailable(PAYLOAD.TECHNIQUE.STACKED)) and not found:
|
||||||
if kb.timeTest:
|
if isTechniqueAvailable(PAYLOAD.TECHNIQUE.TIME):
|
||||||
kb.technique = PAYLOAD.TECHNIQUE.TIME
|
kb.technique = PAYLOAD.TECHNIQUE.TIME
|
||||||
elif kb.stackedTest:
|
else:
|
||||||
kb.technique = PAYLOAD.TECHNIQUE.STACKED
|
kb.technique = PAYLOAD.TECHNIQUE.STACKED
|
||||||
|
|
||||||
if expected == EXPECTED.BOOL:
|
if expected == EXPECTED.BOOL:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user