Nmap Development mailing list archives

Re: [nmap-svn] r26285 - nmap/scripts


From: Xu Weilin <mzweilin () gmail com>
Date: Sat, 3 Sep 2011 11:32:21 +0800

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 or
string.find(iface.address, "::")) then
+                     if_nfo = iface
+                     return if_nfo
+             end
+     end
+     return nil
+end
David 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()?

-- 
Regards
Xu Weilin 许伟林
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/

Current thread: