|
|
@ -725,6 +725,7 @@ usage(){ |
|
|
|
-h, --help Display this help and exit |
|
|
|
-h, --help Display this help and exit |
|
|
|
-k, --insecure Ignores certificate errors |
|
|
|
-k, --insecure Ignores certificate errors |
|
|
|
--fetch-lots Updates domains from https://lots-project.com/ and exit |
|
|
|
--fetch-lots Updates domains from https://lots-project.com/ and exit |
|
|
|
|
|
|
|
--nojoke Prevents script making windows joke |
|
|
|
" |
|
|
|
" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -767,12 +768,18 @@ unset options |
|
|
|
|
|
|
|
|
|
|
|
insecure="" |
|
|
|
insecure="" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
windowsjoke=false |
|
|
|
|
|
|
|
if grep -q Microsoft /proc/version; then |
|
|
|
|
|
|
|
windowsjoke=true |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# 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" ;; |
|
|
|
-k|--insecure) insecure="-k" ;; |
|
|
|
--fetch-lots ) fetchLots; exit ;; |
|
|
|
--fetch-lots ) fetchLots; exit ;; |
|
|
|
|
|
|
|
--nojoke ) windowsjoke=false ;; |
|
|
|
--) shift; break ;; |
|
|
|
--) shift; break ;; |
|
|
|
*) die "invalid option: '$1'." ;; |
|
|
|
*) die "invalid option: '$1'." ;; |
|
|
|
esac |
|
|
|
esac |
|
|
@ -797,13 +804,17 @@ strict-transport-security |
|
|
|
content-security-policy |
|
|
|
content-security-policy |
|
|
|
x-xss-protection |
|
|
|
x-xss-protection |
|
|
|
x-content-type-options |
|
|
|
x-content-type-options |
|
|
|
feature-policy |
|
|
|
|
|
|
|
permissions-policy |
|
|
|
permissions-policy |
|
|
|
|
|
|
|
feature-policy |
|
|
|
cache-control" |
|
|
|
cache-control" |
|
|
|
|
|
|
|
|
|
|
|
tmpfile="$(mktemp)" |
|
|
|
tmpfile="$(mktemp)" |
|
|
|
touch "$tmpfile" |
|
|
|
touch "$tmpfile" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$windowsjoke" == "true" ]; then |
|
|
|
|
|
|
|
echo "Why would you use windows, do you hate yourself?" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
printKey |
|
|
|
printKey |
|
|
|
|
|
|
|
|
|
|
|
echo "" |
|
|
|
echo "" |
|
|
@ -830,8 +841,7 @@ while read -r line; do |
|
|
|
fi |
|
|
|
fi |
|
|
|
done<<<"$(echo "$headers" | sed '1d')" # We don't want the initial http banner |
|
|
|
done<<<"$(echo "$headers" | sed '1d')" # We don't want the initial http banner |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "$missingHeaders" | while read -r line; do |
|
|
|
echo -n "$missingHeaders" | while read -r line; do |
|
|
|
|
|
|
|
echo -e "${RED}$line${NC}" |
|
|
|
echo -e "${RED}$line${NC}" |
|
|
|
functionName="test_$line" |
|
|
|
functionName="test_$line" |
|
|
|
"$functionName" >> "$tmpfile" |
|
|
|
"$functionName" >> "$tmpfile" |
|
|
|