Scripting Exercise: sub-domains enumeration. Offensive Security Certified Professional (OSCP) video series by Ahmed: https://www.linkedin.com/in/limbo0x01/ h...
for sub in $(cat sub.txt)
do
if [[ $(ping -c 1 $sub 2> /dev/null ) ]]
then
echo "$sub +++++++pong"
echo $sub >> valid_sub.txt
else
echo "$sub-------Error"
fi
done
for ip in $(cat valid_sub.txt)
do
host $ip | cut -d " " -f 4|uniq >>ips.txt
done
echo "DONE ......"
fi
mkdir Final_test
cp subfinder.sh Final_test/
cd Final_test/
./subfinder.sh www.megacorpone.com
------------------------
./subfinder.sh