nmap-sqlgen.xsl v1

The Reasoning:
The past few weeks I have been doing a network survey at client’s site. Part of the survey has been nmaping the whole network and trying to match the hosts I discover with the physical location of the device. This has been a some what tedious process that has been some what prettified by Benjamin Erb’s nmap.xsl stylesheet. However I still need to visually grep many pages of data to sort switch from server.
The Solution:
During this process I realized that once I get a baseline of what a particular device looks like to nmap it would be nice to be able to search and identify them all quickly. To me a database that I could throw SQL queries at would be easiest to dig through.
The Result:
Armed with the nmap.xsl stylesheet I had inspiration to create another stylesheet to output SQL instead of HTML. The result is posted below. Please be nice, this is my first foray in to XSLT and only my second swing at utilizing XML. If you make improvements, find bugs, have suggestions just drop me a comment here.

nmap-sqlgen.xsl (you will likely need to right-click “save as”)
nmap-sqlgen.sql – database schema that is used by the XSL

Usage:
A database will be needed to fully use the file. Execute the sql file provided against a new database. To use this file you will need an XSL parser. During development I used TestXSLT for OS X. Some other options I have not tested yet are: saxon and xalan. Execute the results of the XSL parser against the database you setup with the nmap-sql.sql file.

Sorry, Comments are Closed.

You'll have to take it up with the author...