Home page logo
/

nmap-dev logo Nmap Development mailing list archives

nmap PostgreSQL patch
From: Bradley Kite <bradley () deathsgate demon co uk>
Date: Sun, 30 Jun 2002 22:24:32 +0100

Hi there.

I've just finished writing a patch to nmap so that it logs to
a PostgreSQL database.

The patch has been tested on nmap-2.54BETA36 with postgresql-7.2.1_1
running on FreeBSD 4.6-STABLE.

To apply the patch:
tar -xvzf nmap-2.54BETA36.tgz
gunzip nmap-2.54BETA36-postgres.patch.gz
patch < nmap-2.54BETA36-postgres.patch

To compile:

cd nmap-2.54BETA36
autoconf
./configure --with-postgres[=DIR]
make && make install

where DIR is something like '/usr/local/pgsql'

Usage:

nmap --pg_log --pg_dbname [DB_NAME] --pg_user [USERNAME] --pg_pass [PASSWORD]
     --pg_host [HOST] --pg_port [PORT] [Target]

where:  --pg_log turns on postgresql logging (boolean)
        --pg_dbname is the name of the postgres database (this must already exist!)
        --pg_user   is the postgres username
        --pg_pass   is the postgres password
        --pg_host   is the address of the machine that postgres is running on
        --pg_port   is the port number
        [Target]    is the address(es) of the machines you want to scan.

Provided that the database already exists, it will automatically create the required tables.

It will also flag network changes if data already exists in the database, log os-version,
and tcp banner info on open ports.

Thanks go to rich () annexia org and azazel () azazel net for helping me with the autoconf stuff.

Comments/Suggestions are welcome

-- 
Software Developer/Data Management Specialist
Alchemetics Ltd, http://www.alchemetrics.co.uk
pgp key: http://www.deathsgate.demon.co.uk/bradley.key.asc


Attachment: nmap-2.54BETA36-postgres.patch.gz
Description:

Attachment: _bin
Description:


  By Date           By Thread  

Current thread:
  • nmap PostgreSQL patch Bradley Kite (Jun 30)
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]