From cfc1f2b70b9a27bf79d71aaf7fe04c8e404393b8 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 22 Aug 2011 22:43:14 +0000 Subject: [PATCH] minor update --- lib/techniques/union/test.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/techniques/union/test.py b/lib/techniques/union/test.py index 7cc28a9dc..cf5b466f9 100644 --- a/lib/techniques/union/test.py +++ b/lib/techniques/union/test.py @@ -112,11 +112,10 @@ def __findUnionCharCount(comment, place, parameter, value, prefix, suffix, where page, headers = Request.queryPage(payload, place=place, content=True, raise404=False) if kb.uChar: pages[count] = page - else: - ratio = comparison(page, headers, getRatioValue=True) or MIN_RATIO - ratios.append(ratio) - min_, max_ = min(min_, ratio), max(max_, ratio) - items.append((count, ratio)) + ratio = comparison(page, headers, getRatioValue=True) or MIN_RATIO + ratios.append(ratio) + min_, max_ = min(min_, ratio), max(max_, ratio) + items.append((count, ratio)) if kb.uChar: for regex in (kb.uChar, r'>\s*%s\s*<' % kb.uChar): @@ -125,7 +124,7 @@ def __findUnionCharCount(comment, place, parameter, value, prefix, suffix, where retVal = filter(lambda x: x[1], contains)[0][0] break - else: + if not retVal: ratios.pop(ratios.index(min_)) ratios.pop(ratios.index(max_))