mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
Fixes #4549
This commit is contained in:
parent
e5086ef61a
commit
f3e8039145
|
@ -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.35"
|
||||
VERSION = "1.5.1.36"
|
||||
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)
|
||||
|
|
|
@ -25,7 +25,6 @@ from lib.core.enums import DBMS
|
|||
from lib.core.enums import HASHDB_KEYS
|
||||
from lib.core.enums import OS
|
||||
from lib.core.exception import SqlmapNoneDataException
|
||||
from lib.core.exception import SqlmapUnsupportedFeatureException
|
||||
from lib.request import inject
|
||||
|
||||
class Miscellaneous(object):
|
||||
|
@ -83,25 +82,16 @@ class Miscellaneous(object):
|
|||
infoMsg = "detecting back-end DBMS version from its banner"
|
||||
logger.info(infoMsg)
|
||||
|
||||
if Backend.isDbms(DBMS.MYSQL):
|
||||
first, last = 1, 6
|
||||
|
||||
elif Backend.isDbms(DBMS.PGSQL):
|
||||
first, last = 12, 6
|
||||
|
||||
elif Backend.isDbms(DBMS.MSSQL):
|
||||
first, last = 29, 9
|
||||
|
||||
else:
|
||||
raise SqlmapUnsupportedFeatureException("unsupported DBMS")
|
||||
|
||||
query = queries[Backend.getIdentifiedDbms()].substring.query % (queries[Backend.getIdentifiedDbms()].banner.query, first, last)
|
||||
query = queries[Backend.getIdentifiedDbms()].banner.query
|
||||
|
||||
if conf.direct:
|
||||
query = "SELECT %s" % query
|
||||
|
||||
kb.bannerFp["dbmsVersion"] = unArrayizeValue(inject.getValue(query))
|
||||
kb.bannerFp["dbmsVersion"] = (kb.bannerFp["dbmsVersion"] or "").replace(',', "").replace('-', "").replace(' ', "")
|
||||
kb.bannerFp["dbmsVersion"] = unArrayizeValue(inject.getValue(query)) or ""
|
||||
|
||||
match = re.search(r"\d[\d.-]*", kb.bannerFp["dbmsVersion"])
|
||||
if match:
|
||||
kb.bannerFp["dbmsVersion"] = match.group(0)
|
||||
|
||||
def delRemoteFile(self, filename):
|
||||
if not filename:
|
||||
|
|
Loading…
Reference in New Issue
Block a user