This commit is contained in:
Miroslav Stampar 2019-06-06 11:44:27 +02:00
parent ceb718107f
commit 0e409d4479
3 changed files with 7 additions and 7 deletions

View File

@ -18,7 +18,7 @@ from lib.core.enums import OS
from thirdparty.six import unichr as _unichr from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>) # sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.6.21" VERSION = "1.3.6.22"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} 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) VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View File

@ -452,7 +452,7 @@ def errorUse(expression, dump=False):
value = _errorFields(expression, expressionFields, expressionFieldsList) value = _errorFields(expression, expressionFields, expressionFieldsList)
if value and isListLike(value): 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) value = unArrayizeValue(value)
elif len(value) > 1 and stopLimit == 1: elif len(value) > 1 and stopLimit == 1:
value = [value] value = [value]

View File

@ -9,6 +9,7 @@ from lib.core.agent import agent
from lib.core.common import dataToOutFile from lib.core.common import dataToOutFile
from lib.core.common import decodeDbmsHexValue from lib.core.common import decodeDbmsHexValue
from lib.core.common import getSQLSnippet from lib.core.common import getSQLSnippet
from lib.core.common import isNoneValue
from lib.core.data import kb from lib.core.data import kb
from lib.core.data import logger from lib.core.data import logger
from lib.core.enums import CHARSET_TYPE from lib.core.enums import CHARSET_TYPE
@ -38,12 +39,11 @@ class Filesystem(GenericFilesystem):
fileContent = inject.getValue("SELECT RAWTOHEX(OSREADFILE('%s')) FROM DUAL" % remoteFile, charsetType=CHARSET_TYPE.HEXADECIMAL) fileContent = inject.getValue("SELECT RAWTOHEX(OSREADFILE('%s')) FROM DUAL" % remoteFile, charsetType=CHARSET_TYPE.HEXADECIMAL)
kb.fileReadMode = False kb.fileReadMode = False
if fileContent is not None: if not isNoneValue(fileContent):
fileContent = decodeDbmsHexValue(fileContent, True) fileContent = decodeDbmsHexValue(fileContent, True)
if fileContent: if fileContent:
localFilePath = dataToOutFile(remoteFile, fileContent) localFilePath = dataToOutFile(remoteFile, fileContent)
localFilePaths.append(localFilePath) localFilePaths.append(localFilePath)
else: else:
errMsg = "no data retrieved" errMsg = "no data retrieved"