|
|
@ -432,6 +432,7 @@ usage(){ |
|
|
|
|
|
|
|
|
|
|
|
Options: |
|
|
|
Options: |
|
|
|
-h, --help Display this help and exit |
|
|
|
-h, --help Display this help and exit |
|
|
|
|
|
|
|
-k, --insecure Ignores certificate errors |
|
|
|
" |
|
|
|
" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -472,11 +473,13 @@ done |
|
|
|
set -- "${options[@]}" |
|
|
|
set -- "${options[@]}" |
|
|
|
unset options |
|
|
|
unset options |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
insecure="" |
|
|
|
|
|
|
|
|
|
|
|
# Read the options and set stuff |
|
|
|
# Read the options and set stuff |
|
|
|
while [[ $1 = -?* ]]; do |
|
|
|
while [[ $1 = -?* ]]; do |
|
|
|
case $1 in |
|
|
|
case $1 in |
|
|
|
-h|--help) usage; exit;; |
|
|
|
-h|--help) usage; exit;; |
|
|
|
|
|
|
|
-k|--insecure) insecure="-k" ;; |
|
|
|
--) shift; break ;; |
|
|
|
--) shift; break ;; |
|
|
|
*) die "invalid option: '$1'." ;; |
|
|
|
*) die "invalid option: '$1'." ;; |
|
|
|
esac |
|
|
|
esac |
|
|
@ -493,7 +496,7 @@ url="${args[0]}" |
|
|
|
if [ "$url" = "-" ]; then |
|
|
|
if [ "$url" = "-" ]; then |
|
|
|
headers="$(cat -)" |
|
|
|
headers="$(cat -)" |
|
|
|
else |
|
|
|
else |
|
|
|
headers="$(curl -s -I "$url")" |
|
|
|
headers="$(curl -s -I $insecure "$url")" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
missingHeaders="x-frame-options |
|
|
|
missingHeaders="x-frame-options |
|
|
|