mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 05:04:11 +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
|
kb.testMode = True
|
||||||
|
|
||||||
for test in conf.tests:
|
for test in conf.tests:
|
||||||
|
try:
|
||||||
title = test.title
|
title = test.title
|
||||||
stype = test.stype
|
stype = test.stype
|
||||||
clause = test.clause
|
clause = test.clause
|
||||||
|
@ -407,6 +408,20 @@ def checkSqlInjection(place, parameter, value):
|
||||||
# boundaries
|
# boundaries
|
||||||
break
|
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
|
# Flush the flag
|
||||||
kb.testMode = False
|
kb.testMode = False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user