mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
minor fix for end phase (Ctrl+C)
This commit is contained in:
parent
fb75d0636b
commit
d974a966b8
|
@ -78,11 +78,6 @@ def checkSqlInjection(place, parameter, value):
|
|||
kb.testMode = True
|
||||
|
||||
for test in conf.tests:
|
||||
# Check if there were any premature detection cancellation request
|
||||
# from the user (Ctrl+C)
|
||||
if not kb.testMode:
|
||||
break
|
||||
|
||||
try:
|
||||
title = test.title
|
||||
stype = test.stype
|
||||
|
@ -416,7 +411,7 @@ def checkSqlInjection(place, parameter, value):
|
|||
elif test[0] in ("n", "N"):
|
||||
break
|
||||
elif test[0] in ("e", "E"):
|
||||
kb.testMode = False
|
||||
kb.endDetection = True
|
||||
break
|
||||
elif test[0] in ("q", "Q"):
|
||||
raise sqlmapUserQuitException
|
||||
|
|
|
@ -351,6 +351,12 @@ def start():
|
|||
|
||||
injection = checkSqlInjection(place, parameter, value)
|
||||
|
||||
proceed = not kb.endDetection
|
||||
|
||||
# In case when user wants to end detection phase (Ctrl+C)
|
||||
if not proceed:
|
||||
break
|
||||
|
||||
if injection is not None and injection.place is not None:
|
||||
kb.injections.append(injection)
|
||||
|
||||
|
|
|
@ -1158,6 +1158,7 @@ def __setKnowledgeBaseAttributes(flushAll=True):
|
|||
kb.dep = None
|
||||
kb.docRoot = None
|
||||
kb.dynamicMarkings = []
|
||||
kb.endDetection = False
|
||||
kb.formNames = []
|
||||
kb.headersCount = 0
|
||||
kb.headersFp = {}
|
||||
|
|
Loading…
Reference in New Issue
Block a user