From 68d5faa2875ab953d2943315eda9e49b6c9844c0 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 23 Oct 2012 10:46:17 +0200 Subject: [PATCH] Minor update --- lib/core/common.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 9c0f08b72..2de33772d 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -77,6 +77,7 @@ from lib.core.exception import sqlmapNoneDataException from lib.core.exception import sqlmapMissingDependence from lib.core.exception import sqlmapSilentQuitException from lib.core.exception import sqlmapSyntaxException +from lib.core.exception import sqlmapUserQuitException from lib.core.log import FORMATTER from lib.core.log import LOGGER_HANDLER from lib.core.optiondict import optDict @@ -781,9 +782,12 @@ def readInput(message, default=None, checkBatch=True): logging._acquireLock() dataToStdout("\r%s" % message, forceOutput=True, bold=True) kb.prependFlag = False - data = raw_input() or default - #data = raw_input(message.encode(sys.stdout.encoding or UNICODE_ENCODING)) - logging._releaseLock() + try: + data = raw_input() or default + except: + raise sqlmapUserQuitException + finally: + logging._releaseLock() return data