Skip to content

Instantly share code, notes, and snippets.

@jaamo
Created February 6, 2023 13:46
Show Gist options
  • Save jaamo/22ffde91aeaf03445015a5e9e77beb87 to your computer and use it in GitHub Desktop.
Save jaamo/22ffde91aeaf03445015a5e9e77beb87 to your computer and use it in GitHub Desktop.
Check that TLS 1.1 is not supported on a website
#!/bin/bash
SITES=("https://www.kampiapina.com" "https://apina.studio")
for i in "${SITES[@]}"
do
# Ask file with old version of TLS. Should return an error.
curl $i --verbose --tlsv1.1 --tls-max 1.1 &> response.txt
# Check that the error exists on the response.
if ! grep -q "curl: (35) error" response.txt
then
echo "$i - FAILED"
else
echo "$i - passed"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment