Я пытаюсь выполнить способ получения каждого IP-адреса и Mac-адреса, которые подключены к маршрутизатору (включая беспроводной).
Мне удается узнать, какие IP-адреса у меня есть в моей сети, используя nmap:nmap -sP 192.168.1.* >> IPs.txt
и это возвращение:
Starting Nmap 7.40 ( https://nmap.org ) at 2017-04-27 18:31 ???? ÷?? ???????
Nmap scan report for 192.168.1.1
Host is up (0.0010s latency).
MAC Address: 2C:E4:12:EF:5B:72 (Sagemcom Broadband SAS)
Nmap scan report for 192.168.1.10
Host is up (0.074s latency).
MAC Address: 48:02:2A:06:A4:6F (B-Link Electronic Limited)
Nmap scan report for 192.168.1.11
Host is up (0.0030s latency).
MAC Address: 6E:2E:85:FF:FF:FF (Unknown)
Nmap scan report for 192.168.1.12
Host is up (0.071s latency).
MAC Address: 8C:18:D9:C8:A3:94 (Shenzhen RF Technology)
Nmap scan report for 192.168.1.13
Host is up (0.070s latency).
MAC Address: B4:43:0D:AA:3F:6C (Broadlink)
Nmap scan report for 192.168.1.16
Host is up (0.0020s latency).
MAC Address: F8:D1:11:18:74:89 (Tp-link Technologies)
Nmap scan report for 192.168.1.17
Host is up (0.056s latency).
MAC Address: 34:23:BA:4C:82:42 (Samsung Electro-mechanics(thailand))
Nmap scan report for 192.168.1.20
Host is up.
Nmap done: 256 IP addresses (8 hosts up) scanned in 8.24 seconds
Я ищу способ фильтрации содержимого и печати так: IP:MAC;
Спасибо!