Nmap Development mailing list archives

Re: Remove script ids, just use file names?


From: David Fifield <david () bamsoftware com>
Date: Tue, 4 Nov 2008 18:15:06 -0700

On Mon, Nov 03, 2008 at 10:43:34PM -0700, David Fifield wrote:
Fyodor had the idea of getting rid of script ids and just identifying
them by their file name instead. A script id is what is stored in the id
field in a script. It's also what gets prefixed to each chunk of NSE
output.

Thanks for your input on this. I haven't been able to get in touch with
Fyodor about this discussion. He mentioned wanting this in time to be
included in the book, so I have made the changes in r10909. Anyway you
can try out this version and compare it to the output with ids.

I removed ids from the scripts themselves and updated the documentation.
Some of the scripts used id in diagnostic messages; I changed them to
use filename instead. SSH-hostkey.nse used id as a key in the nmap
registry, so I made it use "sshhostkey" in imitation of other scripts.
whois.nse and ASN.nse used id as an object for a mutex, so I converted
them to constant strings.

Here's a sample of the output.

# nmap -T4 --script=all scanme.nmap.org

Starting Nmap 4.76 ( http://nmap.org ) at 2008-11-04 18:10 MST
Interesting ports on scanme.nmap.org (64.13.134.52):
Not shown: 994 filtered ports
PORT    STATE  SERVICE
22/tcp  open   ssh
|  SSH-hostkey: 1024 03:5f:d3:9d:95:74:8a:d0:8d:70:17:9a:bf:93:84:13 (DSA)
|_ 2048 fa:af:76:4c:b0:f4:4b:83:a4:6e:70:9f:a1:ec:51:0c (RSA)
25/tcp  closed smtp
53/tcp  open   domain
70/tcp  closed gopher
80/tcp  open   http
|_ showHTMLTitle: Go ahead and ScanMe!
113/tcp closed auth

Host script results:
|  ASN:
|  BGP: 64.13.128.0/21 and 64.13.128.0/18 | Country: US
|    Origin AS: 10565 - SVCOLO-AS - Silicon Valley Colocation, Inc.
|_     Peer AS: 3561 6461
|  whois: Record found at whois.arin.net
|  netrange: 64.13.134.0 - 64.13.134.63
|  netname: NET-64-13-143-0-26
|  orgname: Titan Networks
|  orgid: INSEC
|_ country: US stateprov: CA

Nmap done: 1 IP address (1 host up) scanned in 15.62 seconds

David Fifield

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


Current thread: