minor fix

This commit is contained in:
Miroslav Stampar 2011-02-20 12:20:44 +00:00
parent 2f9227bcce
commit 0c57f2af0f

View File

@ -386,7 +386,7 @@ def __goInband(expression, expected=None, sort=True, resumeValue=True, unpack=Tr
return data return data
def getValue(expression, blind=True, inband=True, error=True, time=True, fromUser=False, expected=None, batch=False, unpack=True, sort=True, resumeValue=True, charsetType=None, firstChar=None, lastChar=None, dump=False, suppressOutput=False, expectingNone=False): def getValue(expression, blind=True, inband=True, error=True, time=True, fromUser=False, expected=None, batch=False, unpack=True, sort=True, resumeValue=True, charsetType=None, firstChar=None, lastChar=None, dump=False, suppressOutput=None, expectingNone=False):
""" """
Called each time sqlmap inject a SQL query on the SQL injection Called each time sqlmap inject a SQL query on the SQL injection
affected parameter. It can call a function to retrieve the output affected parameter. It can call a function to retrieve the output
@ -394,7 +394,9 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse
(if selected). (if selected).
""" """
getCurrentThreadData().disableStdOut = suppressOutput if suppressOutput is not None:
pushValue(getCurrentThreadData().disableStdOut)
getCurrentThreadData().disableStdOut = suppressOutput
try: try:
if conf.direct: if conf.direct:
@ -471,7 +473,8 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse
raise sqlmapNotVulnerableException, errMsg raise sqlmapNotVulnerableException, errMsg
finally: finally:
getCurrentThreadData().disableStdOut = False if suppressOutput is not None:
getCurrentThreadData().disableStdOut = popValue()
if value and expected == EXPECTED.BOOL: if value and expected == EXPECTED.BOOL:
if isinstance(value, basestring): if isinstance(value, basestring):