From 0e409d447931a1d5c3816e73431d854dbf81d60b Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 6 Jun 2019 11:44:27 +0200 Subject: [PATCH] Fixes #3740 --- lib/core/settings.py | 2 +- lib/techniques/error/use.py | 2 +- plugins/dbms/oracle/filesystem.py | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 556cb3403..f0bfbacb5 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.6.21" +VERSION = "1.3.6.22" 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/techniques/error/use.py b/lib/techniques/error/use.py index 22c8fd5de..759e52208 100644 --- a/lib/techniques/error/use.py +++ b/lib/techniques/error/use.py @@ -452,7 +452,7 @@ def errorUse(expression, dump=False): value = _errorFields(expression, expressionFields, expressionFieldsList) if value and isListLike(value): - if len(value) == 1 and isinstance(value[0], six.string_types): + if len(value) == 1 and isinstance(value[0], (six.string_types, type(None))): value = unArrayizeValue(value) elif len(value) > 1 and stopLimit == 1: value = [value] diff --git a/plugins/dbms/oracle/filesystem.py b/plugins/dbms/oracle/filesystem.py index 715324445..cdaa5b4e7 100644 --- a/plugins/dbms/oracle/filesystem.py +++ b/plugins/dbms/oracle/filesystem.py @@ -9,6 +9,7 @@ from lib.core.agent import agent from lib.core.common import dataToOutFile from lib.core.common import decodeDbmsHexValue from lib.core.common import getSQLSnippet +from lib.core.common import isNoneValue from lib.core.data import kb from lib.core.data import logger from lib.core.enums import CHARSET_TYPE @@ -38,16 +39,15 @@ class Filesystem(GenericFilesystem): fileContent = inject.getValue("SELECT RAWTOHEX(OSREADFILE('%s')) FROM DUAL" % remoteFile, charsetType=CHARSET_TYPE.HEXADECIMAL) kb.fileReadMode = False - if fileContent is not None: + if not isNoneValue(fileContent): fileContent = decodeDbmsHexValue(fileContent, True) if fileContent: localFilePath = dataToOutFile(remoteFile, fileContent) - localFilePaths.append(localFilePath) - else: - errMsg = "no data retrieved" - logger.error(errMsg) + else: + errMsg = "no data retrieved" + logger.error(errMsg) return localFilePaths