From 6969874c02ef3ada70b9806df1c26af376436398 Mon Sep 17 00:00:00 2001 From: stamparm Date: Tue, 19 Mar 2013 10:52:37 +0100 Subject: [PATCH] Switch --no-cast is incompatible with switch --hex (integer values are not being casted in case of --no-cast --hex which is causing unwanted decodings of returned values) --- lib/core/option.py | 4 ++++ lib/request/inject.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/core/option.py b/lib/core/option.py index 9fe9617cd..242eab549 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1998,6 +1998,10 @@ def _basicOptionValidation(): errMsg = "option '--not-string' is incompatible with switch '--null-connection'" raise SqlmapSyntaxException(errMsg) + if conf.noCast and conf.hexConvert: + errMsg = "switch '--no-cast' is incompatible with switch '--hex'" + raise SqlmapSyntaxException(errMsg) + if conf.string and conf.notString: errMsg = "option '--string' is incompatible with switch '--not-string'" raise SqlmapSyntaxException(errMsg) diff --git a/lib/request/inject.py b/lib/request/inject.py index 460a2d8ea..8d7c4e546 100644 --- a/lib/request/inject.py +++ b/lib/request/inject.py @@ -411,7 +411,7 @@ def getValue(expression, blind=True, union=True, error=True, time=True, fromUser if not kb.testMode and value is None and Backend.getDbms() and conf.dbmsHandler: warnMsg = "in case of continuous data retrieval problems you are advised to try " - warnMsg += "a switch '--no-cast' and/or switch '--hex'" + warnMsg += "a switch '--no-cast' or switch '--hex'" singleTimeWarnMessage(warnMsg) return extractExpectedValue(value, expected)