Nmap Development mailing list archives
Re: --win_help
From: Fyodor <fyodor () insecure org>
Date: Wed, 28 Dec 2005 19:19:39 -0800
On Mon, Dec 19, 2005 at 12:12:08PM -0800, Fyodor wrote:
of this device, but one would expect it to be PPP given the name. As before, Nmap gets this (ethernet) from libdnet. In tcpip.cc: if (entry->intf_type & INTF_TYPE_ETH) { dcrn->ifaces[numifaces].device_type = devt_ethernet; /* Collect the MAC address since this is ethernet */ memcpy(dcrn->ifaces[numifaces].mac, &entry->intf_link_addr.addr_eth.data, 6); }
After further examination, I think the problem is that I am using libdnet wong. intf_type is not a bitmask-style flag variable, but rather an exclusive set of enumerated options. In other words, I should be testing for "entry->intf_type == INTF_TYPE_ETH" rather than "entry->intf_type & INTF_TYPE_ETH". Here is a patch which should resolve most of the "Failed to determine dst MAC address for target" errors. Nmap still won't work on those (dialup) systems, but should give a clearer error message. --- tcpip.cc (revision 3015) +++ tcpip.cc (working copy) @@ -2134,14 +2134,14 @@ Strncpy(dcrn->ifaces[numifaces].devfullname, entry->intf_name, sizeof(dcrn->ifaces[numifaces].devfullname)); /* Interface type */ - if (entry->intf_type & INTF_TYPE_ETH) { + if (entry->intf_type == INTF_TYPE_ETH) { dcrn->ifaces[numifaces].device_type = devt_ethernet; /* Collect the MAC address since this is ethernet */ memcpy(dcrn->ifaces[numifaces].mac, &entry->intf_link_addr.addr_eth.data, 6); } - else if (entry->intf_type & INTF_TYPE_LOOPBACK) + else if (entry->intf_type == INTF_TYPE_LOOPBACK) dcrn->ifaces[numifaces].device_type = devt_loopback; - else if (entry->intf_type & INTF_TYPE_TUN) + else if (entry->intf_type == INTF_TYPE_TUN) dcrn->ifaces[numifaces].device_type = devt_p2p; else dcrn->ifaces[numifaces].device_type = devt_other; Cheers, -F _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev
Current thread:
- AW: --win_help Baumgart, Alexander (K-GOT-1) (Dec 19)
- Re: --win_help kx (Dec 19)
- Re: --win_help Fyodor (Dec 19)
- Re: --win_help Fyodor (Dec 28)
- Re: --win_help Fyodor (Dec 28)