Nmap Development mailing list archives

Re: [NSE] Proposal for adding a target.add_host() function


From: Patrick Donnelly <batrick () batbytes com>
Date: Tue, 31 May 2011 19:48:30 -0400

On Tue, May 31, 2011 at 1:17 PM, Djalal Harouni <tixxdz () opendz org> wrote:
On 2011-05-27 17:52:50 +0200, Gorjan Petrovski wrote:
Hi,
Hi Gorjan,

It would be really great if we could add a whole host structure as a
target in NSE through the target library. Recently I needed such an
option specifically for passing the MAC address to another script, but
it should benefit script testing purposes too. David mentioned that it
would be useful for linking IPv4 and IPv6 addresses too in a recent
meeting.
I can also think of the ports, services that will be discovered during
a prerule scan (broadcast scripts), this list can be used to populate the
different fields of the host Target structure like the 'PostList'.

The problem is the mac_addr field cannot be determined by scanning the
host. The mac address is discovered by scanning a router which returns
the IP and mac address of various interfaces. Contrast this with ports
which can be scanned after the target is added. Additionally, it may
not be desirable to set the port state of a host we add since we may
not want to scan those ports at all (in the script scan stage).


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


Current thread: