Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 212035e

Browse files
committed
user can now choose if he wants to skip non-heuristic based DBMS tests
1 parent ded9798 commit 212035e

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

lib/controller/checks.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,21 @@ def checkSqlInjection(place, parameter, value):
139139

140140
continue
141141

142+
if kb.htmlFp and kb.htmlFp[-1] and kb.htmlFp[-1] != dbms\
143+
and kb.skipTests is None:
144+
message = "heuristic test showed that the back-end DBMS could be '%s'." % kb.htmlFp[-1]
145+
message += " do you want to skip test payloads specific for other DBMSes? [Y/n]"
146+
kb.skipTests = conf.realTest or readInput(message, default="Y") not in ("n", "N")
147+
148+
if kb.skipTests:
149+
debugMsg = "skipping test '%s' because " % title
150+
debugMsg += "the heuristic test showed that "
151+
debugMsg += "the back-end DBMS could be "
152+
debugMsg += "%s" % kb.htmlFp[-1]
153+
logger.debug(debugMsg)
154+
155+
continue
156+
142157
# Skip test if it is the same SQL injection type already
143158
# identified by another test
144159
if injection.data and stype in injection.data:

lib/core/option.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,6 +1190,7 @@ def __setKnowledgeBaseAttributes(flushAll=True):
11901190
kb.responseTimes = []
11911191
kb.resumedQueries = {}
11921192
kb.retriesCount = 0
1193+
kb.skipTests = None
11931194
kb.technique = None
11941195
kb.testMode = False
11951196
kb.testQueryCount = 0

0 commit comments

Comments
 (0)