adding WHERE enum for payloads

This commit is contained in:
Miroslav Stampar
2011-02-02 13:34:09 +00:00
parent d6c9515f78
commit 8134c2154a
6 changed files with 22 additions and 16 deletions

View File

@@ -253,15 +253,15 @@ def checkSqlInjection(place, parameter, value):
# Threat the parameter original value according to the
# test's <where> tag
if where == 1:
if where == PAYLOAD.WHERE.ORIGINAL:
origValue = value
elif where == 2:
elif where == PAYLOAD.WHERE.NEGATIVE:
# Use different page template than the original
# one as we are changing parameters value, which
# will likely result in a different content
origValue = "-%s" % randomInt()
templatePayload = agent.payload(place, parameter, newValue=origValue, where=where)
elif where == 3:
elif where == PAYLOAD.WHERE.REPLACE:
origValue = ""
kb.pageTemplate, kb.errorIsNone = getPageTemplate(templatePayload, place)