forked from gwen001/pentest-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmass_axfr.sh
More file actions
executable file
·47 lines (36 loc) · 732 Bytes
/
mass_axfr.sh
File metadata and controls
executable file
·47 lines (36 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
source myutils.sh
function usage() {
echo "Usage: "$0" <domain_file>"
if [ -n "$1" ] ; then
echo "Error: "$1"!"
fi
exit
}
if [ ! $# -eq 1 ] ; then
usage
fi
file=$1
if [ ! -f $file ] ; then
usage "file not found"
fi
n=0
domains=$(cat $file)
#domains=$(cat $file | sort -fu)
echo "Running "$(cat $file | wc -l)" zone transfer..."
echo
for d in $domains ; do
echo -ne $d"\r"
axfr=`fierce -tcptimeout 3 -dns $d -wordlist /tmp/null | grep 'Whoah, it worked' &`
#axfr=`dnsrecon -t axfr -d $d | grep 'Zone Transfer was successful' &`
if [ -n "$axfr" ] ; then
_print "$d successful!" GREEN
echo
n=$[$n+1]
fi
done
echo
echo
echo $n" zone transfer performed."
echo
exit