Harvesting
Step 1: Download the default page of a website
wget icq.com
Step2: Find All FQDN and PQDN in index.html
cat index.html | grep "href=" |cut -d'/' -f3|grep icq.com|sort-u|cut -d'"' -f1 >domain.txt
Step 3: Find Ip address of all domain names which we got from the last step.To do so we will make a bash script.
//findip.sh
#!/bin/bash
for hostname in $(cat domain.txt); do
host $hostname |cut -d' ' -f4|tr -d 'a-z' &
done
Step 4: Now find whether these Ip address are alive or not.So again we will make a script that will do ping sweep.
./findip.sh >Ipaddress.txt
//FindAlive.sh
#!/bin/bash
for ipaddress in $(cat Ipaddress.txt);do
echo $ipaddress $(ping $ipaddress -c 1|grep "received"|cut -d',' -f2) &
done
Now lets have look to the results:->
Comments
Post a Comment