fix for a bug reported by Kirill Morozov (we haven't expected mixed case/copied results in partial union pages)

This commit is contained in:
Miroslav Stampar 2011-03-25 12:14:19 +00:00
parent af5342c495
commit c5b6d377fb
2 changed files with 6 additions and 4 deletions

View File

@ -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 = []

View File

@ -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)