From 61c209d35a47d126d0871bf03223eb1e8f7d8806 Mon Sep 17 00:00:00 2001 From: epoch Date: Thu, 6 Feb 2020 05:39:49 +0000 Subject: fixed urititle. forgot quotes around a semicolon and forgot a space between a flag and another argument for grep. >_> --- urititle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/urititle b/urititle index 263ffb2..7e40fd7 100755 --- a/urititle +++ b/urititle @@ -20,8 +20,8 @@ if [ "$port" ];then UA="Mozilla/5.0 (impersonator)" # content_type="$(printf "HEAD %s HTTP/1.1\r\nHost: %s\r\nUser-Agent: %s\r\n\r\n" "$path" "$domain" "$UA" | ncat -4 $SSL "$domain" "$port" | grep -i '^Content-Type: ' | head -n1 | cut '-d ' -f2 | cut '-d;' -f1 | tr -d '\r\n')" a_header="$(curl -Lsi "$1" | egrep -ai '^Location: |^Content-Type: ' | head -n1 | tr -d '\r\n')" - if printf "%s\n" "${a_header}" | grep -i^Content-Type: 2>&1 >/dev/null 2>&1;then - content_type="$(printf '%s\n' "${a_header}" | cut '-d ' -f2- | cut -d; -f1)" + if printf "%s\n" "${a_header}" | grep -i '^Content-Type: ' 2>&1 >/dev/null 2>&1;then + content_type="$(printf '%s\n' "${a_header}" | cut '-d ' -f2- | cut '-d;' -f1)" else content_type="redirect probably" fi -- cgit v1.2.3