File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- VERSION=" v3.2.5 "
3+ VERSION=" v3.3.0 "
44
55# Set Defaults
66WGET_INSTALLED=0
@@ -423,13 +423,13 @@ elif [ -z "$USER_DOMAIN" ] && [ "$RUN_NONINTERACTIVE" -eq 1 ]; then
423423fi
424424
425425USER_DOMAIN=" ${USER_DOMAIN%/ } "
426- DISPLAY_DOMAIN=" $( echo ${USER_DOMAIN} | grep -oP " ^http(s)?://(www\.)?\K.*" ) "
427- GENERATED_FILENAME=" $( echo ${USER_DOMAIN} | grep -oP " ^http(s)?://(www\.)?\K.*" | tr " ." " -" ) "
426+ DISPLAY_DOMAIN=" $( echo ${USER_DOMAIN} | grep -ioP " ^http(s)?://(www\.)?\K.*" ) "
427+ GENERATED_FILENAME=" $( echo ${USER_DOMAIN} | grep -ioP " ^http(s)?://(www\.)?\K.*" | tr " ." " -" ) "
428428# Remove non-alpha-numeric characters (other than dash)
429429GENERATED_FILENAME=" $( echo " $GENERATED_FILENAME " | sed ' s/[^[:alnum:]-]/-/g' ) "
430430
431431# Check if URL is valid and returns 200 status
432- URL_STATUS=$( wget --spider -q --server-response $USER_DOMAIN 2>&1 | grep --max-count=1 " HTTP/" | awk ' {print $2}' )
432+ URL_STATUS=$( wget --spider -q --server-response $USER_DOMAIN 2>&1 | grep --max-count=1 --ignore-case " HTTP/" | awk ' {print $2}' )
433433
434434if [ -z " $URL_STATUS " ]; then
435435 echo " ${COLOR_RESET} "
@@ -439,7 +439,7 @@ if [ -z "$URL_STATUS" ]; then
439439# If response is 3xx, follow redirect
440440elif [ " $URL_STATUS " -ge 300 ] && [ " $URL_STATUS " -le 399 ]; then
441441 # Get redirect URL
442- FORWARDED_URI=$( wget --spider -q --server-response $USER_DOMAIN 2>&1 | grep --max-count=1 " Location" | awk ' {print $2}' )
442+ FORWARDED_URI=$( wget --spider -q --server-response $USER_DOMAIN 2>&1 | grep --max-count=1 --ignore-case " Location" | awk ' {print $2}' )
443443 echo " ${COLOR_RESET} "
444444
445445 if [ " $URL_STATUS " -eq 301 ]; then
You can’t perform that action at this time.
0 commit comments