summaryrefslogtreecommitdiff
path: root/urititle
diff options
context:
space:
mode:
authorepoch <epoch@hack.thebackupbox.net>2020-02-06 05:39:49 +0000
committerepoch <epoch@hack.thebackupbox.net>2020-02-06 05:39:49 +0000
commit61c209d35a47d126d0871bf03223eb1e8f7d8806 (patch)
treebf909f842e39aa7529403bff82fa5e2c84f09990 /urititle
parent2d1f24c3f9a16f59a545578602929364e64669ba (diff)
downloaduritools-61c209d35a47d126d0871bf03223eb1e8f7d8806.tar.gz
uritools-61c209d35a47d126d0871bf03223eb1e8f7d8806.zip
fixed urititle. forgot quotes around a semicolon and forgot a space between a flag and another argument for grep. >_>
Diffstat (limited to 'urititle')
-rwxr-xr-xurititle4
1 files 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