From cce5c3c0096831d7781e7ed4a6e03138833321c0 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 19 Mar 2012 11:07:03 +0000 Subject: [PATCH] minor changes for version numbers --- plugins/dbms/mysql/fingerprint.py | 3 ++- plugins/dbms/postgresql/fingerprint.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/dbms/mysql/fingerprint.py b/plugins/dbms/mysql/fingerprint.py index d4f2591ce..9fe5915e4 100644 --- a/plugins/dbms/mysql/fingerprint.py +++ b/plugins/dbms/mysql/fingerprint.py @@ -50,7 +50,8 @@ class Fingerprint(GenericFingerprint): (50000, 50092), # MySQL 5.0 (50100, 50156), # MySQL 5.1 (50400, 50404), # MySQL 5.4 - (50500, 50511), # MySQL 5.5 + (50500, 50521), # MySQL 5.5 + (50600, 50604), # MySQL 5.6 (60000, 60014), # MySQL 6.0 ) diff --git a/plugins/dbms/postgresql/fingerprint.py b/plugins/dbms/postgresql/fingerprint.py index b07a93a9e..3c707e2ce 100644 --- a/plugins/dbms/postgresql/fingerprint.py +++ b/plugins/dbms/postgresql/fingerprint.py @@ -65,7 +65,7 @@ class Fingerprint(GenericFingerprint): """ References for fingerprint: - * http://www.postgresql.org/docs/8.4/interactive/release.html (up to 8.4.2) + * http://www.postgresql.org/docs/9.1/interactive/release.html (up to 9.1.3) """ if not conf.extensiveFp and (Backend.isDbmsWithin(PGSQL_ALIASES) or conf.dbms in PGSQL_ALIASES): @@ -103,7 +103,9 @@ class Fingerprint(GenericFingerprint): infoMsg = "actively fingerprinting %s" % DBMS.PGSQL logger.info(infoMsg) - if inject.checkBooleanExpression("LENGTH(TO_CHAR(1, 'EEEE'))>0"): + if inject.checkBooleanExpression("REVERSE('sqlmap')='pamlqs'"): + Backend.setVersion(">= 9.1.0") + elif inject.checkBooleanExpression("LENGTH(TO_CHAR(1, 'EEEE'))>0"): Backend.setVersion(">= 9.0.0") elif inject.checkBooleanExpression("2=(SELECT DIV(6, 3))"): Backend.setVersionList([">= 8.4.0", "< 9.0.0"])