Nmap Development mailing list archives

Re: PostgreSQL match lines


From: David Fifield <david () bamsoftware com>
Date: Fri, 12 Feb 2010 18:20:33 -0700

On Sun, Feb 07, 2010 at 11:16:27AM +0100, Patrik Karlsson wrote:
I went through the source code for all PostgreSQL versions found here
and updated the match lines:
http://ftp2.ua.freebsd.org/pub/FreeBSD/distfiles/postgresql/

The other match lines were based on actual responses, but the output
from grep matched the lines I've already collected. There's one or two
new additions, but I've mainly just updated the version to be 'wider'
eg. 8.2.6 - 8.2.15, where the line returning the error was identical.
In short, this is what I did:

grep -nr "PG_PROTOCOL_MINOR(PG_PROTOCOL_LATEST))));" postgresql*

postgresql-7.4.19/src/backend/postmaster/postmaster.c:1293:                   
PG_PROTOCOL_MINOR(PG_PROTOCOL_LATEST))));
postgresql-7.4.21/src/backend/postmaster/postmaster.c:1293:                   
PG_PROTOCOL_MINOR(PG_PROTOCOL_LATEST))));
postgresql-7.4.23/src/backend/postmaster/postmaster.c:1293:                   
PG_PROTOCOL_MINOR(PG_PROTOCOL_LATEST))));
postgresql-7.4.24/src/backend/postmaster/postmaster.c:1293:                   
PG_PROTOCOL_MINOR(PG_PROTOCOL_LATEST))));
postgresql-7.4.25/src/backend/postmaster/postmaster.c:1293:                   
PG_PROTOCOL_MINOR(PG_PROTOCOL_LATEST))));

There are still some versions missing, which I might add later on.

This is a great idea! You can commit the patch right away.

I saw two cases where the comments didn't match the match line:

+# FreeBSD 8.3.0 - 8.3.7
+match postgresql 
m|^E\0\0\0\x84SFATAL\0C0A000\0Munsupported\x20frontend\x20protocol\x2065363\.19778:\x20server\x20supports\x201\.0\x20to\x203\.0\0Fpostmaster\.c\0L1497\0RProcessStartupPacket\0\0$|
 p/PostgreSQL DB/ v/8.3.7/
+
+# FreeBSD 8.3.9
+match postgresql 
m|^E\0\0\0\x84SFATAL\0C0A000\0Munsupported\x20frontend\x20protocol\x2065363\.19778:\x20server\x20supports\x201\.0\x20to\x203\.0\0Fpostmaster\.c\0L1507\0RProcessStartupPacket\0\0$|
 p/PostgreSQL DB/ v/8.3.7/

Are those just typos?

David Fifield
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: