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

@@ -80,14 +80,14 @@ class Agent:
origValue = origValue[origValue.rfind('/') + 1:]
if value is None:
if where == 1:
if where == PAYLOAD.WHERE.ORIGINAL:
value = origValue
elif where == 2:
elif where == PAYLOAD.WHERE.NEGATIVE:
if newValue.startswith("-"):
value = ""
else:
value = "-%s" % randomInt()
elif where == 3:
elif where == PAYLOAD.WHERE.REPLACE:
value = ""
else:
value = origValue
@@ -144,7 +144,7 @@ class Agent:
# If we are replacing (<where>) the parameter original value with
# our payload do not prepend with the prefix
if where == 3:
if where == PAYLOAD.WHERE.REPLACE:
query = ""
# If the technique is stacked queries (<stype>) do not put a space
@@ -185,7 +185,7 @@ class Agent:
# If we are replacing (<where>) the parameter original value with
# our payload do not append the suffix
if where == 3:
if where == PAYLOAD.WHERE.REPLACE:
pass
elif kb.injection.suffix is not None: