Monday, April 7, 2014

Simple one line network scanner in Linux

Once in a while one has to scan a network segment to find out the IP address of a device. This is possible without installing any tool by using a simple linux shell one-line script:
for i in $(seq 255); do ping -c 1 -w 1 10.1.1.$i | grep "bytes from"; done;
Of course you have to configure the IP range scanned to match your subnet.

No comments:

Post a Comment