Nmap Development mailing list archives

Re: [NSE] Script for HTML generator meta tag


From: Daniel Miller <bonsaiviking () gmail com>
Date: Tue, 10 Jan 2012 09:33:22 -0600

On 01/10/2012 07:03 AM, Michael Kohl wrote:
Hi,

as an exercise for getting started with NSE, I wrote a little script
to extract the contents of the generator meta tag if there is one:

PORT    STATE SERVICE
21/tcp  open  ftp
22/tcp  open  ssh
25/tcp  open  smtp
80/tcp  open  http
|_generator: TYPO3 4.2 CMS
111/tcp open  rpcbind
199/tcp open  smux
443/tcp open  https
|_generator: TYPO3 4.2 CMS

The script can be found here, maybe it's useful enough for others to
include in the distribution:

https://gist.github.com/903f268b5ebfe932f4dc

BTW: sorry if this is the wrong place for submitting it, I didn't
really find another place that seemed sensible.

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

Michael,

This looks like a great script, and one that I would use frequently. As far as the code goes, I could see tightening up the regex in line 40 to use [^"]* instead of .*, since if you had more than one tag with attributes on the same line, it would greedily take more than you wanted. I look forward to seeing this one in the main distribution!

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


Current thread: