From 5772c52f46ab875f14e28022ee85311d96b2a5d9 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sun, 15 Apr 2012 16:33:47 +0000 Subject: [PATCH] minor refactoring/fix (randQuery is just a part (e.g. abc) of phrase (def:abc:ghi) - phrase should be searched for, not just randQuery); both phrases should be inside the content for it to be full-inband injectable (...UNION ALL SELECT phrase UNION ALL SELECT phrase2....) --- lib/techniques/union/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/techniques/union/test.py b/lib/techniques/union/test.py index a05f8185f..9349d6f1f 100644 --- a/lib/techniques/union/test.py +++ b/lib/techniques/union/test.py @@ -202,7 +202,7 @@ def __unionPosition(comment, place, parameter, prefix, suffix, count, where=PAYL page, headers = Request.queryPage(payload, place=place, content=True, raise404=False) content = "%s%s".lower() % (page or "", listToStrValue(headers.headers if headers else None) or "") - if content and ((randQuery in content and phrase2 not in content) or (randQuery not in content and phrase2 in content)): + if not all(_ in content for _ in (phrase, phrase2)): vector = (position, count, comment, prefix, suffix, kb.uChar, PAYLOAD.WHERE.NEGATIVE) unionErrorCase = kb.errorIsNone and wasLastRequestDBMSError()