Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f5b6b0e

Browse files
committed
Fixes #4504
1 parent e8048a3 commit f5b6b0e

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.5.1.2"
21+
VERSION = "1.5.1.3"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

plugins/dbms/mysql/takeover.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def udfSetRemotePath(self):
3838

3939
banVer = kb.bannerFp["dbmsVersion"]
4040

41-
if distutils.version.LooseVersion(banVer) >= distutils.version.LooseVersion("5.0.67"):
41+
if banVer and distutils.version.LooseVersion(banVer) >= distutils.version.LooseVersion("5.0.67"):
4242
if self.__plugindir is None:
4343
logger.info("retrieving MySQL plugin directory absolute path")
4444
self.__plugindir = unArrayizeValue(inject.getValue("SELECT @@plugin_dir"))

plugins/dbms/postgresql/takeover.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ def udfSetLocalPaths(self):
5151

5252
banVer = kb.bannerFp["dbmsVersion"]
5353

54-
if distutils.version.LooseVersion(banVer) >= distutils.version.LooseVersion("10"):
54+
if not banVer:
55+
errMsg = "unsupported feature on unknown version of PostgreSQL"
56+
raise SqlmapUnsupportedFeatureException(errMsg)
57+
elif distutils.version.LooseVersion(banVer) >= distutils.version.LooseVersion("10"):
5558
majorVer = banVer.split('.')[0]
5659
elif distutils.version.LooseVersion(banVer) >= distutils.version.LooseVersion("8.2") and '.' in banVer:
5760
majorVer = '.'.join(banVer.split('.')[:2])

0 commit comments

Comments
 (0)