mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-07-04 20:03:10 +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
|
kb.testMode = True
|
||||||
|
|
||||||
for test in conf.tests:
|
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:
|
try:
|
||||||
title = test.title
|
title = test.title
|
||||||
stype = test.stype
|
stype = test.stype
|
||||||
|
@ -416,7 +411,7 @@ def checkSqlInjection(place, parameter, value):
|
||||||
elif test[0] in ("n", "N"):
|
elif test[0] in ("n", "N"):
|
||||||
break
|
break
|
||||||
elif test[0] in ("e", "E"):
|
elif test[0] in ("e", "E"):
|
||||||
kb.testMode = False
|
kb.endDetection = True
|
||||||
break
|
break
|
||||||
elif test[0] in ("q", "Q"):
|
elif test[0] in ("q", "Q"):
|
||||||
raise sqlmapUserQuitException
|
raise sqlmapUserQuitException
|
||||||
|
|
|
@ -351,6 +351,12 @@ def start():
|
||||||
|
|
||||||
injection = checkSqlInjection(place, parameter, value)
|
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:
|
if injection is not None and injection.place is not None:
|
||||||
kb.injections.append(injection)
|
kb.injections.append(injection)
|
||||||
|
|
||||||
|
|
|
@ -1158,6 +1158,7 @@ def __setKnowledgeBaseAttributes(flushAll=True):
|
||||||
kb.dep = None
|
kb.dep = None
|
||||||
kb.docRoot = None
|
kb.docRoot = None
|
||||||
kb.dynamicMarkings = []
|
kb.dynamicMarkings = []
|
||||||
|
kb.endDetection = False
|
||||||
kb.formNames = []
|
kb.formNames = []
|
||||||
kb.headersCount = 0
|
kb.headersCount = 0
|
||||||
kb.headersFp = {}
|
kb.headersFp = {}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user