Consolidate logger messages for --*-test switches

This commit is contained in:
Bernardo Damele
2010-10-31 16:58:38 +00:00
parent 46be570463
commit 486a113560
8 changed files with 62 additions and 68 deletions

View File

@@ -29,7 +29,7 @@ from lib.core.settings import ERROR_EMPTY_CHAR
from lib.core.settings import ERROR_START_CHAR
from lib.core.settings import ERROR_END_CHAR
def errorUse(expression):
def errorUse(expression, returnPayload=False):
"""
Retrieve the output of a SQL query taking advantage of an error SQL
injection vulnerability on the affected parameter.
@@ -79,4 +79,7 @@ def errorUse(expression):
infoMsg = "retrieved: %s" % replaceNewlineTabs(output, stdout=True)
logger.info(infoMsg)
return output
if returnPayload:
return output, payload
else:
return output