28 July 2010

findout name and ip of machines in the network

Download latest version of WinPcap from here (1.4.2).
Download latest version of namp from here (1.2.9).
C:\>nmap -sP 192.168.10.0/24

Nmap scan report for 192.168.10.1
Host is up (0.041s latency).
MAC Address: 00:24:01:XX:YY:ZZ (D-Link)

Nmap scan report for 192.168.10.100
Host is up (0.047s latency).
MAC Address: 00:1F:3B:XX:YY:ZZ (Intel Corporate)

Nmap scan report for 192.168.10.101
Host is up.
--> ME

Nmap scan report for 192.168.10.102
Host is up (0.078s latency).
MAC Address: 00:1C:DF:XX:YY:ZZ (Belkin International)

Nmap scan report for 192.168.10.104
Host is up (0.00s latency).
MAC Address: 00:19:D2:XX:YY:ZZ (Intel)

Nmap done: 256 IP addresses (5 hosts up) scanned in 4.94 seconds
This command took almost 15-20 min

FOR /L %i IN (1,1,254) DO ping -n 1 192.168.10.%i | FIND /i "Reply">> c:\ipaddr.txt
Reply from 192.168.10.1: bytes=32 time=2ms TTL=64
Reply from 192.168.10.101: bytes=32 time<1ms TTL=128
Reply from 192.168.10.102: bytes=32 time=3ms TTL=128

Reference:
http://nmap.org
http://www.winpcap.org
http://www.petri.co.il/quickly_find_used_ip_addresses.htm

No comments:

Post a Comment