fix for proper MSSQL error chunking in some cases (not screwing output length toward lower values at chunk phase)

This commit is contained in:
Miroslav Stampar 2011-05-03 21:12:51 +00:00
parent e6f010734e
commit 83fac3f6d9

View File

@ -104,9 +104,6 @@ def __oneShotErrorUse(expression, field):
warnMsg += trimmed warnMsg += trimmed
logger.warn(warnMsg) logger.warn(warnMsg)
if isinstance(output, basestring):
output = htmlunescape(output).replace("<br>", "\n")
if any(map(lambda dbms: Backend.isDbms(dbms), [DBMS.MYSQL, DBMS.MSSQL])): if any(map(lambda dbms: Backend.isDbms(dbms), [DBMS.MYSQL, DBMS.MSSQL])):
if offset == 1: if offset == 1:
retVal = output retVal = output
@ -121,6 +118,9 @@ def __oneShotErrorUse(expression, field):
retVal = output retVal = output
break break
if isinstance(retVal, basestring):
retVal = htmlunescape(retVal).replace("<br>", "\n")
retVal = __errorReplaceChars(retVal) retVal = __errorReplaceChars(retVal)
dataToSessionFile("[%s][%s][%s][%s][%s]\n" % (conf.url, kb.injection.place, conf.parameters[kb.injection.place], expression, replaceNewlineTabs(retVal))) dataToSessionFile("[%s][%s][%s][%s][%s]\n" % (conf.url, kb.injection.place, conf.parameters[kb.injection.place], expression, replaceNewlineTabs(retVal)))