From e6f71c213078ce032b290d600e0e363a2bdab9d4 Mon Sep 17 00:00:00 2001 From: stamparm Date: Mon, 15 Jul 2013 16:24:49 +0200 Subject: [PATCH] Making 10% less requests in futile higher level/risk runs (using static template payloads for where==NEGATIVE) --- lib/controller/checks.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/controller/checks.py b/lib/controller/checks.py index 9cc427eb8..e3e03173d 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -328,13 +328,14 @@ def checkSqlInjection(place, parameter, value): # Use different page template than the original # one as we are changing parameters value, which # will likely result in a different content + kb.data.setdefault("randomInt", str(randomInt(10))) if conf.invalidLogical: - _ = randomInt(2) + _ = int(kb.data.randomInt[:2]) origValue = "%s AND %s=%s" % (value, _, _ + 1) elif conf.invalidBignum: - origValue = "%d.%d" % (randomInt(6), randomInt(1)) + origValue = "%s.%s" % (kb.data.randomInt[:6], kb.data.randomInt[0]) else: - origValue = "-%s" % randomInt() + origValue = "-%s" % kb.data.randomInt[:4] templatePayload = agent.payload(place, parameter, value="", newValue=origValue, where=where) elif where == PAYLOAD.WHERE.REPLACE: origValue = ""