1

I am trying to scan my local network and return a list of all connected devices with there IP, MAC Address & device name.

by device name I mean if it is my iPhone it would say 'Jamies-iPhone' as it would when I check my routers admin application for connected devices.

At the moment I have got as far as getting the IP and MAC using:

sudo nmap 192.168.1.0/24 -sP > file1.txt

It gives me the below output into the file 'file1.txt'

Starting Nmap 6.47 ( http://nmap.org ) at 2016-09-01 18:37 UTC
Nmap scan report for 192.168.1.1
Host is up (0.00027s latency).
MAC Address: 8C:34:FD:E2:E6:48 (Unknown)
Nmap scan report for 192.168.1.3
Host is up (0.0038s latency).
MAC Address: 70:56:82:C6:BE:EE (Apple)
Nmap scan report for 192.168.1.10
Host is up (0.18s latency).
Nmap done: 256 IP addresses (2 hosts up) scanned in 6.42 seconds

but I can not find any information about how to get the device name to show up, it just says 'Apple'. I specifically want to see the name of my apple TV's as I have a few and would like to be able to differentiate between them.

1 Answers1

0

The "Apple" listed there is derived from the MAC address (it's in the range assigned to Apple). NMap doesn't know if it's actually an Apple device.

If the device doesn't reply to a service with its name (that your utility also scans for), and it hasn't been registered in a local name service (like DNS; either manually, or registered by DHCP), then you can't know its name.