mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-06-08 07:03:10 +03:00
added Ctrl+C check in detection phase
This commit is contained in:
parent
e355f92f22
commit
03220d34ba
|
@ -77,6 +77,7 @@ def checkSqlInjection(place, parameter, value):
|
|||
kb.testMode = True
|
||||
|
||||
for test in conf.tests:
|
||||
try:
|
||||
title = test.title
|
||||
stype = test.stype
|
||||
clause = test.clause
|
||||
|
@ -407,6 +408,20 @@ def checkSqlInjection(place, parameter, value):
|
|||
# boundaries
|
||||
break
|
||||
|
||||
except KeyboardInterrupt:
|
||||
warnMsg = "Ctrl+C detected in detection mode"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
message = "What do you want to do? [(S)kip current/(a)bort detection/(q)uit]"
|
||||
test = readInput(message, default="S")
|
||||
|
||||
if not test or test[0] in ("s", "S"):
|
||||
pass
|
||||
elif test[0] in ("a", "A"):
|
||||
break
|
||||
elif test[0] in ("q", "Q"):
|
||||
raise sqlmapUserQuitException
|
||||
|
||||
# Flush the flag
|
||||
kb.testMode = False
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user