From 2f1786e65fa361bcf8327dde5f4eb8db27ec37d6 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 12 Apr 2011 10:22:54 +0000 Subject: [PATCH] added active fingerprint for pgsql >= 9.0.3 (reference: http://www.postgresql.org/docs/9.0/static/release-9-0.html) --- plugins/dbms/postgresql/fingerprint.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/dbms/postgresql/fingerprint.py b/plugins/dbms/postgresql/fingerprint.py index 29d0af462..ed090c985 100644 --- a/plugins/dbms/postgresql/fingerprint.py +++ b/plugins/dbms/postgresql/fingerprint.py @@ -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"])