mirror of
https://github.com/nmap/nmap.git
synced 2026-01-08 15:39:05 +00:00
Use the same trick of peeking inside the ARP packet for the destination
MAC in the doArp function as is done for ARP ping scan in scan_engine.cc. This makes us capable of reading ARP responses that are sent to the broadcast address.
This commit is contained in:
2
tcpip.cc
2
tcpip.cc
@@ -2702,7 +2702,7 @@ static bool doArp(const char *dev, const u8 *srcmac,
|
||||
/* Start listening */
|
||||
pd = my_pcap_open_live(dev, 50, 1, 25);
|
||||
set_pcap_filter(dev, pd,
|
||||
"arp and ether dst host %02X:%02X:%02X:%02X:%02X:%02X",
|
||||
"arp and arp[18:4] = 0x%02X%02X%02X%02X and arp[22:2] = 0x%02X%02X",
|
||||
srcmac[0], srcmac[1], srcmac[2], srcmac[3], srcmac[4],
|
||||
srcmac[5]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user