mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
greater flexibility for --batch when default is None
This commit is contained in:
parent
6fa2fd139c
commit
83feb097ef
|
@ -679,11 +679,13 @@ def readInput(message, default=None):
|
|||
elif message[-1] == ']':
|
||||
message += " "
|
||||
|
||||
if conf.batch and default is not None:
|
||||
if conf.batch:
|
||||
if isinstance(default, (list, tuple, set)):
|
||||
options = ",".join([getUnicode(opt, UNICODE_ENCODING) for opt in default])
|
||||
else:
|
||||
elif default:
|
||||
options = getUnicode(default, UNICODE_ENCODING)
|
||||
else:
|
||||
options = unicode()
|
||||
|
||||
infoMsg = "%s%s" % (message, options)
|
||||
logger.info(infoMsg)
|
||||
|
|
|
@ -232,7 +232,7 @@ class Connect:
|
|||
msg += "also on the redirection got from the application\n"
|
||||
|
||||
while True:
|
||||
choice = readInput(msg, default="")
|
||||
choice = readInput(msg, default=None)
|
||||
|
||||
if not choice:
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue
Block a user