1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Correct the Target MAC Address in Nmap's ARP discovery to conform to what IP stacks in currently popular operating systems use.

This commit is contained in:
jay
2014-05-31 11:03:44 +00:00
parent b0303ac883
commit b6a994ea40
2 changed files with 8 additions and 4 deletions

View File

@@ -3284,7 +3284,10 @@ static UltraProbe *sendArpScanProbe(UltraScanInfo *USI, HostScanStats *hss,
ETH_TYPE_ARP);
arp_pack_hdr_ethip(frame + ETH_HDR_LEN, ARP_OP_REQUEST,
*hss->target->SrcMACAddress(), *hss->target->v4sourceip(),
ETH_ADDR_BROADCAST, *hss->target->v4hostip());
"\x00\x00\x00\x00\x00\x00", *hss->target->v4hostip());
// RFC 826 says that the ar$tha field need not be set to anything in particular (i.e. its value doesn't matter)
// We use 00:00:00:00:00:00 since that is what IP stacks in currently popular operating systems use
gettimeofday(&USI->now, NULL);
probe->sent = USI->now;
hss->probeSent(sizeof(frame));