Nmap Development mailing list archives
Re: Refactoring changes to target parsing
From: Daniel Miller <bonsaiviking () gmail com>
Date: Tue, 22 Jan 2013 15:30:52 -0600
On 01/22/2013 03:05 PM, David Fifield wrote:
I think another appropriate direction would be to extend the "targets" NSE library to allow the creation of these NetBlock subclasses, so that scripts that have "newtargets" functionality can add net blocks, not just individual addresses. If both our ideas get implemented, then we're in the beautiful world where NSE scripts can be used to quickly implement and test functionality to be imported into core Nmap at a later time.In r30539 I merged some changes to how targets are parsed. The main change is the breaking up of one class, TargetGroup, which knew what type of target it contained and had data members for each possible type, into several subclasses of a new class NetBlock, which have mostly common methods but their own data members. This is part of a larger project to simplify how target handling works, with the concrete goal of doing automatic multicast host discovery of locally connected IPv6 networks. Now there is a specific type (NetBlockIPv6Netmask) that represents an IPv6 target specification with a netmask, before being broken into its individual addresses. While IPv6 multicast discovery is not yet implemented in Nmap in C++ yet, an instance of such a type can in principle be passed to a function doing multicast discovery, with the resulting up hosts being passed to later phases for scanning. I did not make as much progress on this task as I hoped, as the code surrounding target parsing and host discovery is quite complex. I hope to be able to revisit this; alternatively, beginning to port the various targets-ipv6-multicast scripts to a single C++ IPv6 multicast discovery function would be a nice thing for someone to work on. David Fifield _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Dan _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Refactoring changes to target parsing David Fifield (Jan 22)
- Re: Refactoring changes to target parsing Daniel Miller (Jan 22)
- Re: Refactoring changes to target parsing David Fifield (Jan 22)
- Re: Refactoring changes to target parsing Daniel Miller (Jan 22)