From 52a71546d0be82c1457bd0c66b82c5e802c77563 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 13 Aug 2013 18:55:23 +0200 Subject: [PATCH] Implementation for an Issue #507 --- lib/controller/controller.py | 8 +++++++- lib/core/option.py | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/controller/controller.py b/lib/controller/controller.py index c1a4f393d..730c1003a 100644 --- a/lib/controller/controller.py +++ b/lib/controller/controller.py @@ -287,7 +287,13 @@ def start(): if paramKey not in kb.testedParams: testSqlInj = True - testSqlInj &= conf.hostname not in kb.vulnHosts + if testSqlInj and conf.hostname in kb.vulnHosts: + if kb.skipVulnHost is None: + message = "vulnerability has already been detected " + message += "against '%s'. Do you want to skip " % conf.hostname + message += "further tests involving it? [Y/n]" + kb.skipVulnHost = readInput(message, default="Y").upper() != 'N' + testSqlInj = not kb.skipVulnHost if not testSqlInj: infoMsg = "skipping '%s'" % targetUrl diff --git a/lib/core/option.py b/lib/core/option.py index 3d9d571c6..87c25b79d 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1673,6 +1673,7 @@ def _setKnowledgeBaseAttributes(flushAll=True): kb.resumeValues = True kb.safeCharEncode = False kb.singleLogFlags = set() + kb.skipVulnHost = None kb.reduceTests = None kb.stickyDBMS = False kb.stickyLevel = None