From b427f6c03eaf85091eb137a915ce93d527cb1d0b Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 8 Jan 2016 10:52:02 +0100 Subject: [PATCH] Minor bug fix --- lib/techniques/error/use.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/techniques/error/use.py b/lib/techniques/error/use.py index 3ddcf91c4..cef689f21 100644 --- a/lib/techniques/error/use.py +++ b/lib/techniques/error/use.py @@ -197,6 +197,11 @@ def _oneShotErrorUse(expression, field=None, chunkTest=False): _ = "%s(?P.*?)%s" % (kb.chars.start, kb.chars.stop) retVal = extractRegexResult(_, retVal, re.DOTALL | re.IGNORECASE) or retVal + try: + retVal = re.sub(r"&#x([^;]+);", lambda match: chr(int(match.group(1), 16)), retVal) + except ValueError: + pass + return safecharencode(retVal) if kb.safeCharEncode else retVal def _errorFields(expression, expressionFields, expressionFieldsList, num=None, emptyFields=None, suppressOutput=False):