Friday, January 11, 2013

Getting list of live IPs in your network

We will use nmap and linux commands for finding live hosts in the network.

First, we will run nmap for network scan, I will pick small /24 network for testting.

nmap -sS -oA filename

This command will give you 3 different files. 

ls -l filename*

I will use scan.gnmap, Lets see what is in it? 
cat scan.gnmap

As you can see there is so much information on this file just think about it your are scanning /22 or bigger network. How are we going to get ip addresses?
cat scan,gnmap | grep open | cut -d " " -f2
If you add  " > iplist.txt " end of the line you will get iplist.txt with ip addresses showing above.