From 61ad3b999aa948fbede2069c4c1a60d24cc08eec Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 14 Mar 2012 10:31:24 +0000 Subject: [PATCH] fix for a crash with partial union and --hex --- lib/core/common.py | 8 ++++++-- lib/takeover/web.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 22e908042..2ef100c41 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1245,7 +1245,6 @@ def parseUnionPage(output, unique=True): for entry in output: entry = entry.group(1) - entry = decodeHexValue(entry) if conf.hexConvert else entry if unique: key = entry.lower() @@ -1256,9 +1255,14 @@ def parseUnionPage(output, unique=True): else: continue - entry = safecharencode(entry) if kb.safeCharEncode else entry entry = entry.split(kb.chars.delimiter) + if conf.hexConvert: + entry = applyFunctionRecursively(entry, decodeHexValue) + + if kb.safeCharEncode: + entry = applyFunctionRecursively(entry, safecharencode) + data.append(entry[0] if len(entry) == 1 else entry) else: data = output diff --git a/lib/takeover/web.py b/lib/takeover/web.py index 2aa3b56b3..4b05a436b 100644 --- a/lib/takeover/web.py +++ b/lib/takeover/web.py @@ -136,7 +136,7 @@ class Web: logger.info(infoMsg) default = None - choices = ['asp', 'aspx', 'php', 'jsp'] + choices = ('asp', 'aspx', 'php', 'jsp') for ext in choices: if conf.url.endswith(ext):