diff --git a/config/action.d/xarf-login-attack.conf b/config/action.d/xarf-login-attack.conf index a0121966..00da7f79 100644 --- a/config/action.d/xarf-login-attack.conf +++ b/config/action.d/xarf-login-attack.conf @@ -46,6 +46,11 @@ actionban = oifs=${IFS}; if [ "" -gt 0 ]; then echo "try to resolve $RESOLVER_ADDR"; fi ADDRESSES=$(dig +short -t txt -q $RESOLVER_ADDR | grep -v ';;' | tr -d '"') if [ "" -gt 0 ]; then echo "returned address $ADDRESSES"; fi + if [ -z "$ADDRESSES" ]; then + echo "address for $RESOLVER_ADDR cannot be found or timeout from dig"; + if [ "" -gt 0 ]; then exit 1; fi + exit 0 + fi IFS=,; ADDRESSES=$(echo $ADDRESSES) IFS=${oifs} IP= @@ -56,13 +61,11 @@ actionban = oifs=${IFS}; TLP= PORT= DATE=`LC_ALL=C date --date=@