From 4c10634d85fd25a44cb6c688927abd6278453a7e Mon Sep 17 00:00:00 2001 From: DL6ER Date: Mon, 21 Nov 2016 15:49:11 +0100 Subject: [PATCH] Convert domain names to lower case before checking validity of the domain --- advanced/Scripts/list.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) mode change 100644 => 100755 advanced/Scripts/list.sh diff --git a/advanced/Scripts/list.sh b/advanced/Scripts/list.sh old mode 100644 new mode 100755 index 24f6d055..cfcea424 --- a/advanced/Scripts/list.sh +++ b/advanced/Scripts/list.sh @@ -51,8 +51,11 @@ EOM } HandleOther(){ - #check validity of domain - validDomain=$(echo "$1" | perl -ne'print if /\b((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}\b/') + # First, convert everything to lowercase + domain=$(sed -e "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/" <<< "$1") + + #check validity of domain + validDomain=$(echo "$domain" | perl -ne'print if /\b((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}\b/') if [ -z "${validDomain}" ]; then echo "::: $1 is not a valid argument or domain name" else