Nmap NSE script for writing the scan output into a sqlite3 database
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Michael Clemens b87285b803 Update README.md 6 years ago
LICENSE Initial commit 6 years ago
README.md Update README.md 6 years ago
sqlite-output.nse Added "port state" 6 years ago



This nmap script stores the following nmap output into a sqlite3 database: Hostname, IP, port number, protocol (tcp/udp), state, 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.


nmap --script sqlite-output <target>


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


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