Bug fix related to properly identify and parse the version from the banner (used for --stacked-test and other matters on MySQL/PgSQL)

This commit is contained in:
Bernardo Damele 2010-11-12 11:33:11 +00:00
parent 8cec75656c
commit a34c1b287c
2 changed files with 2 additions and 6 deletions

View File

@ -919,11 +919,10 @@ def getDelayQuery(andCond=False):
if not kb.data.banner: if not kb.data.banner:
conf.dbmsHandler.getVersionFromBanner() conf.dbmsHandler.getVersionFromBanner()
banVer = kb.bannerFp["dbmsVersion"] banVer = kb.bannerFp["dbmsVersion"] if 'dbmsVersion' in kb.bannerFp else None
if (kb.dbms == DBMS.MYSQL and banVer >= "5.0.12") or (kb.dbms == DBMS.POSTGRESQL and banVer >= "8.2"): if banVer is None or (kb.dbms == DBMS.MYSQL and banVer >= "5.0.12") or (kb.dbms == DBMS.POSTGRESQL and banVer >= "8.2"):
query = queries[kb.dbms].timedelay.query % conf.timeSec query = queries[kb.dbms].timedelay.query % conf.timeSec
else: else:
query = queries[kb.dbms].timedelay.query2 % conf.timeSec query = queries[kb.dbms].timedelay.query2 % conf.timeSec
elif kb.dbms == DBMS.FIREBIRD: elif kb.dbms == DBMS.FIREBIRD:

View File

@ -88,9 +88,6 @@ class Enumeration:
kb.data.banner = inject.getValue(query) kb.data.banner = inject.getValue(query)
bannerParser(kb.data.banner) bannerParser(kb.data.banner)
if kb.data.banner:
kb.bannerFp["dbmsVersion"] = kb.data.banner.replace(",", "").replace("-", "").replace(" ", "")
if conf.os and conf.os == "windows": if conf.os and conf.os == "windows":
kb.bannerFp["type"] = set([ "Windows" ]) kb.bannerFp["type"] = set([ "Windows" ])