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.

Revisions

  1. jaamo created this gist Feb 6, 2023.
    20 changes: 20 additions & 0 deletions tls-check.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    #!/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