added switch --logic-negative

This commit is contained in:
Miroslav Stampar
2011-10-24 00:40:06 +00:00
parent 8bd3cfdc8e
commit 20ae1c2187
4 changed files with 18 additions and 4 deletions

View File

@@ -88,10 +88,13 @@ class Agent:
if where == PAYLOAD.WHERE.ORIGINAL:
value = origValue
elif where == PAYLOAD.WHERE.NEGATIVE:
if newValue.startswith("-"):
value = ""
if not conf.logicNegative:
if newValue.startswith("-"):
value = ""
else:
value = "-%s" % randomInt()
else:
value = "-%s" % randomInt()
value = "%s AND %s=%s" % (origValue, randomInt(2), randomInt(2))
elif where == PAYLOAD.WHERE.REPLACE:
value = ""
else: