From c5b6d377fb4e61b4eabdffb4539c1919f384a3ba Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 25 Mar 2011 12:14:19 +0000 Subject: [PATCH] fix for a bug reported by Kirill Morozov (we haven't expected mixed case/copied results in partial union pages) --- lib/core/common.py | 8 +++++--- lib/core/option.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index d1ad4c2c6..301a45cf8 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1078,8 +1078,7 @@ def parseUnionPage(output, expression, partial=False, condition=None, sort=True) elif outCond2: regExpr = '%s(.*?)%s' % (DUMP_START_MARKER, DUMP_STOP_MARKER) - output = re.findall(regExpr, output, re.S) - + output = re.findall(regExpr, output, re.DOTALL | re.IGNORECASE) if condition is None: condition = ( kb.resumedQueries and conf.url in kb.resumedQueries.keys() @@ -1091,7 +1090,10 @@ def parseUnionPage(output, expression, partial=False, condition=None, sort=True) dataToSessionFile("[%s][%s][%s][%s][%s]\n" % (conf.url, kb.injection.place, conf.parameters[kb.injection.place], expression, logOutput)) if sort: - output = set(output) + dict_ = {} + for entry in output: + dict_[entry.lower()] = entry + output = dict_.values() for entry in output: info = [] diff --git a/lib/core/option.py b/lib/core/option.py index c62442f00..9ce70338e 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1252,7 +1252,7 @@ def __setKnowledgeBaseAttributes(flushAll=True): kb.threadData = {} kb.misc = advancedDict() - kb.misc.delimiter = randomStr(length=6) + kb.misc.delimiter = randomStr(length=6, lowercase=True) kb.misc.start = ":%s:" % randomStr(length=3, lowercase=True) kb.misc.stop = ":%s:" % randomStr(length=3, lowercase=True) kb.misc.space = ":%s:" % randomStr(length=1, lowercase=True)