From 9479a68eb51fb4b50beadaba5a67aeb096cfa24a Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 22 Mar 2011 12:21:56 +0000 Subject: [PATCH] minor fix regarding last commit --- lib/techniques/error/use.py | 3 ++- lib/techniques/inband/union/use.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/techniques/error/use.py b/lib/techniques/error/use.py index 7559b34c7..b50f2f263 100644 --- a/lib/techniques/error/use.py +++ b/lib/techniques/error/use.py @@ -78,7 +78,8 @@ def __oneShotErrorUse(expression, field): if threadData.lastRedirectMsg and threadData.lastRedirectMsg[0] == \ threadData.lastRequestUID else None, re.DOTALL | re.IGNORECASE) - output = getUnicode(output, kb.pageEncoding) + if output: + output = getUnicode(output, kb.pageEncoding) if isinstance(output, basestring): output = htmlunescape(output).replace("
", "\n") diff --git a/lib/techniques/inband/union/use.py b/lib/techniques/inband/union/use.py index 81bde9fe6..6004b4f1d 100644 --- a/lib/techniques/inband/union/use.py +++ b/lib/techniques/inband/union/use.py @@ -65,7 +65,8 @@ def __oneShotUnionUse(expression, unpack=True): or extractRegexResult(check, removeReflectiveValues(listToStrValue(headers.headers \ if headers else None), payload), re.DOTALL | re.IGNORECASE) - output = getUnicode(output, kb.pageEncoding) + if output: + output = getUnicode(output, kb.pageEncoding) return output