proper parsing of content in partial union technique

This commit is contained in:
Miroslav Stampar 2012-03-14 11:23:30 +00:00
parent 61ad3b999a
commit cee9ff7885

View File

@ -302,7 +302,9 @@ def unionUse(expression, unpack=True, dump=False):
if output:
if all(map(lambda x: x in output, [kb.chars.start, kb.chars.stop])):
items = extractRegexResult(r'%s(?P<result>.*?)%s' % (kb.chars.start, kb.chars.stop), output, re.DOTALL | re.IGNORECASE).split(kb.chars.delimiter)
#items = extractRegexResult(r'%s(?P<result>.*?)%s' % (kb.chars.start, kb.chars.stop), output, re.DOTALL | re.IGNORECASE).split(kb.chars.delimiter)
items = parseUnionPage(output)
items = items[0] if isinstance(items, list) and len(items) == 1 else items
kb.locks.value.acquire()
threadData.shared.value.append(items[0] if len(items) == 1 else items)
kb.locks.value.release()