Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 48c20a6

Browse files
committed
minor nag fix
1 parent 40971ac commit 48c20a6

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

lib/techniques/inband/union/test.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,6 @@ def __unionPosition(comment, place, parameter, value, prefix, suffix, count, whe
131131
removeReflectiveValues(listToStrValue(headers.headers if headers else None), \
132132
payload, True) or "")
133133

134-
unionErrorCase = kb.errorIsNone and wasLastRequestDBMSError()
135-
136-
if unionErrorCase:
137-
warnMsg = "combined UNION/ERROR SQL injection case found on "
138-
warnMsg += "column %d. sqlmap will try to find another " % (position + 1)
139-
warnMsg += "column with better characteristics"
140-
logger.warn(warnMsg)
141-
142134
if content and phrase in content:
143135
validPayload = payload
144136
vector = (position, count, comment, prefix, suffix, kb.uChar, where)
@@ -161,7 +153,14 @@ def __unionPosition(comment, place, parameter, value, prefix, suffix, count, whe
161153
if content and ((phrase in content and phrase2 not in content) or (phrase not in content and phrase2 in content)):
162154
vector = (position, count, comment, prefix, suffix, kb.uChar, PAYLOAD.WHERE.NEGATIVE)
163155

164-
if not unionErrorCase:
156+
unionErrorCase = kb.errorIsNone and wasLastRequestDBMSError()
157+
158+
if unionErrorCase:
159+
warnMsg = "combined UNION/ERROR SQL injection case found on "
160+
warnMsg += "column %d. sqlmap will try to find another " % (position + 1)
161+
warnMsg += "column with better characteristics"
162+
logger.warn(warnMsg)
163+
else:
165164
break
166165

167166
return validPayload, vector

0 commit comments

Comments
 (0)