Nmap Development mailing list archives
Re: [nmap-svn] r26285 - nmap/scripts
From: Djalal Harouni <tixxdz () opendz org>
Date: Sat, 3 Sep 2011 11:51:24 +0100
On Sat, Sep 03, 2011 at 11:32:21AM +0800, Xu Weilin wrote:
On Fri, Sep 2, 2011 at 6:54 PM, Djalal Harouni <tixxdz () opendz org> wrote:On Thu, Sep 01, 2011 at 09:11:00PM -0700, commit-mailer@insecure.orgwrote:Author: david Date: Thu Sep 1 21:11:00 2011 New Revision: 26285 Log: Add IPv6 multicast host discovery scripts from Weilin. Added: nmap/scripts/targets-ipv6-multicast-echo.nse nmap/scripts/targets-ipv6-multicast-invalid-dst.nse nmap/scripts/targets-ipv6-multicast-slaac.nse ... +local function get_ipv6_interface_info_by_name(if_name) + local ifaces = nmap.list_interfaces() + local iface + local if_nfo + for _,iface in pairs(ifaces) do + if if_name == iface.device and (#iface.address>15 orstring.find(iface.address, "::")) then+ if_nfo = iface + return if_nfo + end + end + return nil +endDavid you can remove this workaround now and use: local iface, err = nmap.get_interface_info(if_name) It was patched to handle IPv6 info.What would we get if the interface has both IPv4 address and IPv6 address? Don't you think we need an argument of address family in nmap.get_interface_info()?
Only one of them will be used. nmap.get_interface_info() automatically passes the correct address family based on the 'addressfamily' member of the 'NmapOps' class (file: NmapOps.h) which is set by the user (Nmap options) to the getInterfaceByName() function. I've committed a patch to do this as r26301. Weilin I've a small suggestion: In these scripts can you add a check to see if the interface type is "ethernet" before calling dnet:ethernet_open(), just to avoid fatal errors. Thanks. -- tixxdz http://opendz.org _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Re: [nmap-svn] r26285 - nmap/scripts Djalal Harouni (Sep 05)
- Re: [nmap-svn] r26285 - nmap/scripts David Fifield (Sep 05)
- Re: [nmap-svn] r26285 - nmap/scripts Djalal Harouni (Sep 05)
- Re: [nmap-svn] r26285 - nmap/scripts Xu Weilin (Sep 05)
- Re: [nmap-svn] r26285 - nmap/scripts Djalal Harouni (Sep 05)
- Re: [nmap-svn] r26285 - nmap/scripts Djalal Harouni (Sep 05)
- Re: [nmap-svn] r26285 - nmap/scripts Xu Weilin (Sep 05)
- Re: [nmap-svn] r26285 - nmap/scripts Djalal Harouni (Sep 05)
- Re: [nmap-svn] r26285 - nmap/scripts David Fifield (Sep 05)