Nmap NSE script for writing the scan output into a sqlite3 database
Go to file
2014-05-02 14:08:30 +02:00
LICENSE Initial commit 2014-04-29 14:29:20 -07:00
README.md Update README.md 2014-05-01 01:48:25 +02:00
sqlite-output.nse Update sqlite-output.nse 2014-05-02 14:08:30 +02:00

nmap-sqlite

This nmap script stores the following nmap output into a sqlite3 database: Hostname, IP, port number, protocol (tcp/udp), service and version.

Both, database file name and table name can be passed to the script via arguments (see @args or @example), data will always be appended to an existing table. Non-existant database files or tables are created during the scan. Nmap's regular output (-o) will not be modified in any way.

usage

nmap --script sqlite-output <target>

example

$ nmap -sS -A -F --script sqlite-output --script-args=dbname=scan.sqlite,dbtable=scandata scanme.nmap.org
$ sqlite3 can.sqlite
sqlite> select * from scandata;
scanme.nmap.org|74.207.244.221|22|tcp|ssh|OpenSSH5.3p1 Debian 3ubuntu7.1
scanme.nmap.org|74.207.244.221|80|tcp|http|Apache httpd2.2.14

args

dbname:  name of sqlite database file (default: scan.sqlite)
dbtable: name of database table in which the output will be written (default: scandata)