diff --git a/lib/core/agent.py b/lib/core/agent.py index d591d6bbd..a435e2e1c 100644 --- a/lib/core/agent.py +++ b/lib/core/agent.py @@ -451,7 +451,7 @@ class Agent(object): else: nulledCastedField = rootQuery.isnull.query % nulledCastedField - kb.binaryField = conf.binaryFields and field in conf.binaryFields.split(',') + kb.binaryField = conf.binaryFields and field in conf.binaryFields if conf.hexConvert or kb.binaryField: nulledCastedField = self.hexConvertField(nulledCastedField) diff --git a/lib/core/option.py b/lib/core/option.py index e48c0b656..94d274f74 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1744,7 +1744,8 @@ def _cleanupOptions(): conf.exclude = r"\A%s\Z" % '|'.join(re.escape(_) for _ in conf.exclude.split(',')) if conf.binaryFields: - conf.binaryFields = re.sub(r"\s*,\s*", ',', conf.binaryFields) + conf.binaryFields = conf.binaryFields.replace(" ", "") + conf.binaryFields = re.split(PARAMETER_SPLITTING_REGEX, conf.binaryFields) if any((conf.proxy, conf.proxyFile, conf.tor)): conf.disablePrecon = True diff --git a/lib/core/settings.py b/lib/core/settings.py index b591437e5..2e27f3d83 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.11.65" +VERSION = "1.3.11.66" 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) diff --git a/lib/request/direct.py b/lib/request/direct.py index 07654c1ec..755291efa 100644 --- a/lib/request/direct.py +++ b/lib/request/direct.py @@ -48,7 +48,7 @@ def direct(query, content=True): if not query.upper().startswith("SELECT "): query = "SELECT %s" % query if conf.binaryFields: - for field in conf.binaryFields.split(','): + for field in conf.binaryFields: field = field.strip() if re.search(r"\b%s\b" % re.escape(field), query): query = re.sub(r"\b%s\b" % re.escape(field), agent.hexConvertField(field), query) diff --git a/lib/request/inject.py b/lib/request/inject.py index a475eae9e..8b17a3941 100644 --- a/lib/request/inject.py +++ b/lib/request/inject.py @@ -110,7 +110,7 @@ def _goInference(payload, expression, charsetType=None, firstChar=None, lastChar if Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.PGSQL): expression += " AS %s" % randomStr(lowercase=True, seed=hash(expression)) - if field and conf.hexConvert or conf.binaryFields and field in conf.binaryFields.split(','): + if field and conf.hexConvert or conf.binaryFields and field in conf.binaryFields: nulledCastedField = agent.nullAndCastField(field) injExpression = expression.replace(field, nulledCastedField, 1) else: diff --git a/lib/utils/hash.py b/lib/utils/hash.py index 6d491b9f3..32afff4e2 100644 --- a/lib/utils/hash.py +++ b/lib/utils/hash.py @@ -680,6 +680,9 @@ def attackDumpedTable(): if len(table[column]["values"]) <= i: continue + if conf.binaryFields and column in conf.binaryFields: + continue + value = table[column]["values"][i] if column in binary_fields and re.search(HASH_BINARY_COLUMNS_REGEX, column) is not None: