From 606779e8e1f3ccbdb2a779a876a50528ed04067b Mon Sep 17 00:00:00 2001 From: Salt Date: Sun, 23 Feb 2020 01:33:53 -0600 Subject: [PATCH] Make domain searching more robust and accurate --- domainfind | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/domainfind b/domainfind index 43274ad..999e27f 100755 --- a/domainfind +++ b/domainfind @@ -82,8 +82,10 @@ checkavaildomains() { [ -z "$1" ] && return 1 # Strip leading periods tld="${1#.}" + tldstrip="${tld//\./}" # Looking at you, .co.in while read word; do - ! [[ $word == *$tld ]] && continue + ! [[ $word == *$tldstrip ]] && continue + [[ $word == $tldstrip ]] && continue # Ignore the tld itself log "Processing word: $word" 2 prefix="${word%$tld}" fqdn="$prefix.$tld"