From 50f22bdcbfdcd3ecd6ee2e5d1c4931166c978f92 Mon Sep 17 00:00:00 2001 From: Aaron Johnson Date: Tue, 25 Dec 2018 13:58:46 -0600 Subject: [PATCH] Added timeout for zone transfer --- tab-sorcery.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tab-sorcery.sh b/tab-sorcery.sh index 26de512..8da7eb4 100644 --- a/tab-sorcery.sh +++ b/tab-sorcery.sh @@ -8,6 +8,10 @@ scan_domain=$1 scan_ns=$2 +# Static Configuration (Do not edit) +dns_time=5 +dns_tries=1 + # Check for and set RDP geometry config case "$SORC_GEOM_RDP" in [0123456789]*x*[0123456789]) geom_rdp=$SORC_GEOM_RDP;; @@ -26,7 +30,7 @@ get_hostip () { host_ip=`echo $zone_xfer | grep $1 | grep A | awk '{print $3}'` } -zone_xfer=`dig $scan_domain @$scan_ns AXFR | egrep -v 'SOA|NS|MX|DiG' | grep $scan_domain | awk '{print $1,$4,$5}'` +zone_xfer=`dig $scan_domain @$scan_ns +time=$dns_time +tries=$dns_tries AXFR | egrep -v 'SOA|NS|MX|DiG' | grep $scan_domain | awk '{print $1,$4,$5}'` while read host <&3; do user_name=$3 connect_cmd="ssh -t"