If you find yourself a stranger in a strange land and you do not have admin privileges on your system and you want to see what and who is out there; Here is a way to sweep the network using native Windows tools.
This Looks crazy to human eyes but I will break it down for you.
DOS version
1 2 3 4 5 |
for /L %x in (1,1,255) do @ping -a -n 1 192.168.2.%x -w 100 | Find "Pinging" |
Linux version
1 2 3 4 5 |
for i in {1..255} do @ping -n 1 192.168.2.%i -w 100 |
The FOR loop pings each device and passes that output to Find command to get the addresses that reply .
the Find command will only show responses that return a positive result
/L here indicates the set is a sequence of numbers. -a asks for a host name if available, -n indicates send one ping attempt, -w indicates wait timeout (helps speed the sweep up since default is 1 second, this is specified in milliseconds.)