minor fix

This commit is contained in:
Miroslav Stampar 2012-02-07 11:16:03 +00:00
parent f7bf1fbe94
commit 11af0b1bbc
2 changed files with 4 additions and 3 deletions

View File

@ -981,6 +981,9 @@ def checkConnection(suppressOutput=False):
logger.critical(errMsg)
if any(code in kb.httpErrorCodes for code in (httplib.NOT_FOUND, )):
if conf.multipleTargets:
return False
msg = "it is not recommended to continue in this kind of cases. Do you want to quit and make sure that everything is set up properly? [Y/n] "
if readInput(msg, default="Y") not in ("n", "N"):
raise sqlmapSilentQuitException

View File

@ -960,8 +960,6 @@ def readInput(message, default=None, checkBatch=True):
elif message[-1] == ']':
message += " "
message = "\r%s" % message
if checkBatch and conf.batch:
if isinstance(default, (list, tuple, set)):
options = ",".join(getUnicode(opt, UNICODE_ENCODING) for opt in default)
@ -979,7 +977,7 @@ def readInput(message, default=None, checkBatch=True):
data = default
else:
logging._acquireLock()
dataToStdout(message, True)
dataToStdout("\r%s" % message, True)
data = raw_input()
#data = raw_input(message.encode(sys.stdout.encoding or UNICODE_ENCODING))
logging._releaseLock()