Given the following Nmap output, how can I extract the IP address which matches a particular MAC address?
Nmap scan report for 10.0.0.2 Host is up (0.0011s latency). MAC Address: 00:02:CF:E2:52:4E (ZyGate Communications) Nmap scan report for 10.0.0.9 Host is up (0.015s latency). MAC Address: 1C:18:4A:08:88:48 (Unknown) Nmap scan report for 10.0.0.35 Host is up (0.019s latency). MAC Address: B8:B4:2E:F9:2B:B1 (Unknown) Nmap scan report for 10.0.0.40 Host is up (0.00036s latency). MAC Address: 00:25:11:2C:F6:9C (Elitegroup Computer System )
I would like a pipeline something like this, but it doesn't work:
nmap -sP 10.0.0.0-255 | grep 00:25:11 | awk '{print IP ADDRESS}'