diff --git a/spf_check.sh b/spf_check.sh index 9aa2255..d742453 100755 --- a/spf_check.sh +++ b/spf_check.sh @@ -10,10 +10,11 @@ esac COUNT=0 DEPTH=0 mDEPTH=0 +INDENT=2 checkIncludes() { SPF=$1 for I in $(dig -t txt $SPF +short|grep -oE "include:.* |ip[4,6]:.* "|sed 's/include://g; s/ip[4,6]://g; s/\"//g'|tr ' ' '\n'); do - [[ $DEBUG ]] && printf "%*s%s %s\n" $(($DEPTH*2)) '' "$I" + [[ $DEBUG ]] && printf "%*s%s %s\n" $(($DEPTH*$INDENT)) '' "$I" if [[ ! ${I} =~ ^[0-9] ]]; then DEPTH=$(($DEPTH+1)) mDEPTH=$(($mDEPTH+1))