From 83fac3f6d929acfa457a287ae8e6877f376d15f1 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 3 May 2011 21:12:51 +0000 Subject: [PATCH] fix for proper MSSQL error chunking in some cases (not screwing output length toward lower values at chunk phase) --- lib/techniques/error/use.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/techniques/error/use.py b/lib/techniques/error/use.py index 8171c9735..ab133a6ef 100644 --- a/lib/techniques/error/use.py +++ b/lib/techniques/error/use.py @@ -104,9 +104,6 @@ def __oneShotErrorUse(expression, field): warnMsg += trimmed logger.warn(warnMsg) - if isinstance(output, basestring): - output = htmlunescape(output).replace("
", "\n") - if any(map(lambda dbms: Backend.isDbms(dbms), [DBMS.MYSQL, DBMS.MSSQL])): if offset == 1: retVal = output @@ -121,6 +118,9 @@ def __oneShotErrorUse(expression, field): retVal = output break + if isinstance(retVal, basestring): + retVal = htmlunescape(retVal).replace("
", "\n") + retVal = __errorReplaceChars(retVal) dataToSessionFile("[%s][%s][%s][%s][%s]\n" % (conf.url, kb.injection.place, conf.parameters[kb.injection.place], expression, replaceNewlineTabs(retVal)))