From aee47d32c5b21ac71483a558f9bff520ec04947a Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 15 Dec 2015 12:13:03 +0100 Subject: [PATCH] Patch for #1601 --- lib/core/common.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/core/common.py b/lib/core/common.py index 0159c53a0..ff981fc77 100755 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -86,6 +86,7 @@ from lib.core.exception import SqlmapSilentQuitException from lib.core.exception import SqlmapSyntaxException from lib.core.exception import SqlmapSystemException from lib.core.exception import SqlmapUserQuitException +from lib.core.exception import SqlmapValueException from lib.core.log import LOGGER_HANDLER from lib.core.optiondict import optDict from lib.core.settings import BANNER @@ -1638,7 +1639,9 @@ def safeStringFormat(format_, params): match = re.search(r"(\A|[^A-Za-z0-9])(%s)([^A-Za-z0-9]|\Z)", retVal) if match: if count >= len(params): - raise Exception("wrong number of parameters during string formatting") + warnMsg = "wrong number of parameters during string formatting. " + warnMsg += "Please report by e-mail content \"%r | %r | %r\" to 'dev@sqlmap.org'" % (format_, params, retVal) + raise SqlmapValueException(warnMsg) else: retVal = re.sub(r"(\A|[^A-Za-z0-9])(%s)([^A-Za-z0-9]|\Z)", r"\g<1>%s\g<3>" % params[count], retVal, 1) count += 1