Skip to content

Commit cf16e7c

Browse files
authored
Create zone_xfer.sh
1 parent acba47d commit cf16e7c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

zone_xfer.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
#Simple DNS zone transfer brute force script
3+
4+
#Check if an argument was given. If not, print usage
5+
if [ -z "$1" ]; then
6+
echo "A Simple DNS zone transfer brute force script"
7+
echo "[Usage]: $0 <domain_name>"
8+
echo ""
9+
exit 0
10+
fi
11+
12+
#Identify the DNS servers for the given domain
13+
for server in $(host -t ns $1 | cut -d " " -f4); do
14+
#For each DNS server found, attempt a zone transfer
15+
host -l $1 $server | grep "has address"
16+
done

0 commit comments

Comments
 (0)