This commit is contained in:
Miroslav Stampar 2021-01-03 16:56:35 +01:00
parent e8048a3cf0
commit f5b6b0eb4b
3 changed files with 6 additions and 3 deletions

View File

@ -18,7 +18,7 @@ from lib.core.enums import OS
from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.5.1.2"
VERSION = "1.5.1.3"
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)

View File

@ -38,7 +38,7 @@ class Takeover(GenericTakeover):
banVer = kb.bannerFp["dbmsVersion"]
if distutils.version.LooseVersion(banVer) >= distutils.version.LooseVersion("5.0.67"):
if banVer and distutils.version.LooseVersion(banVer) >= distutils.version.LooseVersion("5.0.67"):
if self.__plugindir is None:
logger.info("retrieving MySQL plugin directory absolute path")
self.__plugindir = unArrayizeValue(inject.getValue("SELECT @@plugin_dir"))

View File

@ -51,7 +51,10 @@ class Takeover(GenericTakeover):
banVer = kb.bannerFp["dbmsVersion"]
if distutils.version.LooseVersion(banVer) >= distutils.version.LooseVersion("10"):
if not banVer:
errMsg = "unsupported feature on unknown version of PostgreSQL"
raise SqlmapUnsupportedFeatureException(errMsg)
elif distutils.version.LooseVersion(banVer) >= distutils.version.LooseVersion("10"):
majorVer = banVer.split('.')[0]
elif distutils.version.LooseVersion(banVer) >= distutils.version.LooseVersion("8.2") and '.' in banVer:
majorVer = '.'.join(banVer.split('.')[:2])