added end detection phase choice into Ctrl+C list

This commit is contained in:
Miroslav Stampar 2010-12-20 23:34:00 +00:00
parent 03b275ce33
commit e10670d9ac

View File

@ -73,10 +73,14 @@ def checkSqlInjection(place, parameter, value):
# successfully inject # successfully inject
injection = injectionDict() injection = injectionDict()
# Clear cookies after each query page attempt # Set the flag for sql injection test mode
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
if not kb.testMode:
break
try: try:
title = test.title title = test.title
stype = test.stype stype = test.stype
@ -402,13 +406,16 @@ def checkSqlInjection(place, parameter, value):
warnMsg = "Ctrl+C detected in detection phase" warnMsg = "Ctrl+C detected in detection phase"
logger.warn(warnMsg) logger.warn(warnMsg)
message = "How do you want to proceed? [(S)kip test/(n)ext parameter/(q)uit]" message = "How do you want to proceed? [(S)kip test/(e)nd detection phase/(n)ext parameter/(q)uit]"
test = readInput(message, default="S") test = readInput(message, default="S")
if not test or test[0] in ("s", "S"): if not test or test[0] in ("s", "S"):
pass pass
elif test[0] in ("n", "N"): elif test[0] in ("n", "N"):
break break
elif test[0] in ("e", "E"):
kb.testMode = False
break
elif test[0] in ("q", "Q"): elif test[0] in ("q", "Q"):
raise sqlmapUserQuitException raise sqlmapUserQuitException