mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 11:33:47 +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] == ']':
|
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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user