mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-04-25 19:33:48 +03:00
minor update (that default quit in --batch was bothering me - my original idea and it was bad :)
This commit is contained in:
parent
ed4cfbb6d2
commit
8a8b94883b
|
@ -484,9 +484,8 @@ def checkSqlInjection(place, parameter, value):
|
||||||
warnMsg = "user aborted during detection phase"
|
warnMsg = "user aborted during detection phase"
|
||||||
logger.warn(warnMsg)
|
logger.warn(warnMsg)
|
||||||
|
|
||||||
if not conf.batch:
|
|
||||||
message = "How do you want to proceed? [(S)kip current test/(e)nd detection phase/(n)ext parameter/(q)uit]"
|
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")
|
choice = readInput(message, default="S", checkBatch=False)
|
||||||
|
|
||||||
if choice[0] in ("s", "S"):
|
if choice[0] in ("s", "S"):
|
||||||
pass
|
pass
|
||||||
|
@ -496,8 +495,6 @@ def checkSqlInjection(place, parameter, value):
|
||||||
kb.endDetection = True
|
kb.endDetection = True
|
||||||
elif choice[0] in ("q", "Q"):
|
elif choice[0] in ("q", "Q"):
|
||||||
raise sqlmapUserQuitException
|
raise sqlmapUserQuitException
|
||||||
else:
|
|
||||||
kb.endDetection = True
|
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
# Reset forced back-end DBMS value
|
# Reset forced back-end DBMS value
|
||||||
|
|
|
@ -742,7 +742,7 @@ def strToHex(inpStr):
|
||||||
|
|
||||||
return hexStr
|
return hexStr
|
||||||
|
|
||||||
def readInput(message, default=None):
|
def readInput(message, default=None, checkBatch=True):
|
||||||
"""
|
"""
|
||||||
@param message: message to display on terminal.
|
@param message: message to display on terminal.
|
||||||
@type message: C{str}
|
@type message: C{str}
|
||||||
|
@ -758,7 +758,7 @@ def readInput(message, default=None):
|
||||||
|
|
||||||
message = "\r%s" % message
|
message = "\r%s" % message
|
||||||
|
|
||||||
if conf.batch:
|
if checkBatch and conf.batch:
|
||||||
if isinstance(default, (list, tuple, set)):
|
if isinstance(default, (list, tuple, set)):
|
||||||
options = ",".join([getUnicode(opt, UNICODE_ENCODING) for opt in default])
|
options = ",".join([getUnicode(opt, UNICODE_ENCODING) for opt in default])
|
||||||
elif default:
|
elif default:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user