Add small script for reverse dns enumeration of ipv4 subnets
This commit is contained in:
parent
6ff18621ba
commit
b9cb811c4d
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
IP4BLOCK="$1"
|
||||||
|
|
||||||
|
echo "Doing reverse lookup for $IP4BLOCK.0/24..."
|
||||||
|
|
||||||
|
ctr=1
|
||||||
|
while [ $ctr -le 255 ]; do
|
||||||
|
ipaddress="$IP4BLOCK.$ctr";
|
||||||
|
result=`dig +short -x $ipaddress`;
|
||||||
|
result=`echo $result | sed -e 's#\n##g'`
|
||||||
|
if [ "$result" != "" ]; then
|
||||||
|
echo "$ipaddress $result";
|
||||||
|
fi;
|
||||||
|
((ctr++));
|
||||||
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue