Skip to content

Commit 5772c52

Browse files
committed
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....)
1 parent ae8c70e commit 5772c52

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/techniques/union/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def __unionPosition(comment, place, parameter, prefix, suffix, count, where=PAYL
202202
page, headers = Request.queryPage(payload, place=place, content=True, raise404=False)
203203
content = "%s%s".lower() % (page or "", listToStrValue(headers.headers if headers else None) or "")
204204

205-
if content and ((randQuery in content and phrase2 not in content) or (randQuery not in content and phrase2 in content)):
205+
if not all(_ in content for _ in (phrase, phrase2)):
206206
vector = (position, count, comment, prefix, suffix, kb.uChar, PAYLOAD.WHERE.NEGATIVE)
207207

208208
unionErrorCase = kb.errorIsNone and wasLastRequestDBMSError()

0 commit comments

Comments
 (0)