i am tired of pressing hundred times Ctrl+C in testing phase if --batch is specified

This commit is contained in:
Miroslav Stampar 2011-06-07 22:14:18 +00:00
parent 75c12c5edb
commit 1c633b7351

View File

@ -481,16 +481,19 @@ def checkSqlInjection(place, parameter, value):
warnMsg = "user aborted during detection phase" warnMsg = "user aborted during detection phase"
logger.warn(warnMsg) logger.warn(warnMsg)
message = "How do you want to proceed? [(S)kip current test/(e)nd detection phase/(n)ext parameter/(q)uit]" if not conf.batch:
choice = readInput(message, default="S") message = "How do you want to proceed? [(S)kip current test/(e)nd detection phase/(n)ext parameter/(q)uit]"
choice = readInput(message, default="S")
if not choice or choice[0] in ("s", "S"): if choice[0] in ("s", "S"):
pass pass
elif choice[0] in ("n", "N"): elif choice[0] in ("n", "N"):
return None return None
elif choice[0] in ("e", "E"): elif choice[0] in ("e", "E"):
kb.endDetection = True kb.endDetection = True
elif choice[0] in ("q", "Q"): elif choice[0] in ("q", "Q"):
raise sqlmapUserQuitException
else:
raise sqlmapUserQuitException raise sqlmapUserQuitException
finally: finally: