From cf7022b0a0e7d6519019732dbc0dbf19a1be3a58 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 27 Dec 2019 18:18:32 +0100 Subject: [PATCH] Minor patch (empty input without newline) --- lib/core/common.py | 5 ++++- lib/core/settings.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index e88975f7f..377d135fa 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1104,7 +1104,10 @@ def readInput(message, default=None, checkBatch=True, boolean=False): dataToStdout("%s" % message, forceOutput=not kb.wizardMode, bold=True) kb.prependFlag = False - retVal = _input().strip() or default + retVal = _input() + if not retVal: # Note: Python doesn't print newline on empty input + dataToStdout("\n") + retVal = retVal.strip() or default retVal = getUnicode(retVal, encoding=sys.stdin.encoding) if retVal else retVal except: try: diff --git a/lib/core/settings.py b/lib/core/settings.py index 2fcd63fca..c57bd2851 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.3.12.32" +VERSION = "1.3.12.33" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)