From 5ec1f83434adf7190e92ca7eb0d8b52275a0d8d0 Mon Sep 17 00:00:00 2001 From: Andreas Perhab Date: Mon, 6 Sep 2021 08:34:32 +0200 Subject: [PATCH] Fix dig -r check to only run if dig is available --- testssl.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testssl.sh b/testssl.sh index 433bc87..6351f83 100755 --- a/testssl.sh +++ b/testssl.sh @@ -20115,15 +20115,15 @@ check_resolver_bins() { type -p idn &>/dev/null && HAS_IDN=true type -p idn2 &>/dev/null && HAS_IDN2=true - # Old dig versions don't have an option to ignore $HOME/.digrc - if ! dig -h | grep -qE '\-r.*~/.digrc'; then - HAS_DIG_R=false - DIG_R="" - fi if ! "$HAS_DIG" && ! "$HAS_HOST" && ! "$HAS_DRILL" && ! "$HAS_NSLOOKUP"; then fatal "Neither \"dig\", \"host\", \"drill\" or \"nslookup\" is present" $ERR_DNSBIN fi if "$HAS_DIG"; then + # Old dig versions don't have an option to ignore $HOME/.digrc + if ! dig -h | grep -qE '\-r.*~/.digrc'; then + HAS_DIG_R=false + DIG_R="" + fi if dig -h | grep -Eq idnout; then HAS_DIG_NOIDNOUT=true fi