From 8e9547041581df13e93f3ae19450a5c0d71008f8 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Wed, 19 Dec 2012 00:46:23 +0000 Subject: [PATCH] minor refactoring --- lib/techniques/error/use.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/techniques/error/use.py b/lib/techniques/error/use.py index 081ec8b25..65863635e 100644 --- a/lib/techniques/error/use.py +++ b/lib/techniques/error/use.py @@ -25,6 +25,7 @@ from lib.core.common import isListLike from lib.core.common import isNumPosStrValue from lib.core.common import listToStrValue from lib.core.common import readInput +from lib.core.convert import hexdecode from lib.core.convert import htmlunescape from lib.core.data import conf from lib.core.data import kb @@ -208,16 +209,17 @@ def _errorReplaceChars(value): def _formatPartialContent(value): """ - Prepares (possibly hex) partial content for safe console output + Prepares (possibly hex-encoded) partial content for safe console output """ if value and isinstance(value, basestring): try: - value = value.decode("hex") + value = hexdecode(value) except: pass finally: value = safecharencode(value) + return value def errorUse(expression, dump=False):