diff options
author | epoch <epoch@hack.thebackupbox.net> | 2020-02-06 05:39:49 +0000 |
---|---|---|
committer | epoch <epoch@hack.thebackupbox.net> | 2020-02-06 05:39:49 +0000 |
commit | 61c209d35a47d126d0871bf03223eb1e8f7d8806 (patch) | |
tree | bf909f842e39aa7529403bff82fa5e2c84f09990 /urititle | |
parent | 2d1f24c3f9a16f59a545578602929364e64669ba (diff) | |
download | uritools-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-x | urititle | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |