mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 05:01:30 +00:00
greater flexibility for --batch when default is None
This commit is contained in:
@@ -679,11 +679,13 @@ def readInput(message, default=None):
|
|||||||
elif message[-1] == ']':
|
elif message[-1] == ']':
|
||||||
message += " "
|
message += " "
|
||||||
|
|
||||||
if conf.batch and default is not None:
|
if 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])
|
||||||
else:
|
elif default:
|
||||||
options = getUnicode(default, UNICODE_ENCODING)
|
options = getUnicode(default, UNICODE_ENCODING)
|
||||||
|
else:
|
||||||
|
options = unicode()
|
||||||
|
|
||||||
infoMsg = "%s%s" % (message, options)
|
infoMsg = "%s%s" % (message, options)
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ class Connect:
|
|||||||
msg += "also on the redirection got from the application\n"
|
msg += "also on the redirection got from the application\n"
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
choice = readInput(msg, default="")
|
choice = readInput(msg, default=None)
|
||||||
|
|
||||||
if not choice:
|
if not choice:
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user