added active fingerprint for pgsql >= 9.0.3 (reference: http://www.postgresql.org/docs/9.0/static/release-9-0.html)

This commit is contained in:
Miroslav Stampar 2011-04-12 10:22:54 +00:00
parent 7c61931b96
commit 2f1786e65f

View File

@ -107,7 +107,9 @@ class Fingerprint(GenericFingerprint):
infoMsg = "actively fingerprinting %s" % DBMS.PGSQL
logger.info(infoMsg)
if inject.checkBooleanExpression("2=(SELECT DIV(6, 3))"):
if inject.checkBooleanExpression("LENGTH(to_char(1, 'EEEE'))>0"):
Backend.setVersion(">= 9.0.3")
elif inject.checkBooleanExpression("2=(SELECT DIV(6, 3))"):
Backend.setVersion(">= 8.4.0")
elif inject.checkBooleanExpression("EXTRACT(ISODOW FROM CURRENT_TIMESTAMP)<8"):
Backend.setVersionList([">= 8.3.0", "< 8.4"])