This Bash script checks if a given list of URLs supports TLSv1.3, HTTP/2, X25519, and OCSP response.
- Bash shell
openssl
command-line tool
-
Save the script to a file, e.g.,
check_tls.sh
. -
Make the script executable:
chmod +x check_tls.sh
-
Run the script with the URLs you want to check as arguments:
./check_tls.sh https://example.com https://another-example.com
The script will output the status of each URL, indicating whether it supports the required protocols and responses.
example.com: Supports TLSv1.3, HTTP/2, X25519, and shows OCSP response
another-example.com: Does NOT support all required protocols and responses
-
The script defines a
check_url
function that takes a URL as an argument. -
Inside the
check_url
function, the script extracts the domain name from the URL using ased
command. -
The script then uses the
openssl
command to connect to the domain on port 443 and check for the following:- TLSv1.3 support
- HTTP/2 support
- X25519 server key
- Successful OCSP response
-
The script parses the
openssl
output to determine if the domain supports all the required protocols and responses. -
The script prints the result for the domain, indicating whether it supports the required protocols and responses.
-
The script loops through all the URLs provided as arguments and calls the
check_url
function for each one.
To run the script on Ubuntu, follow these steps:
-
Open a terminal on your Ubuntu system.
-
Install the
openssl
package if it's not already installed:sudo apt-get update sudo apt-get install -y openssl
-
Download the script from the GitHub repository:
wget https://raw.githubusercontent.com/us254/Reality_TLSv1.3_H2_Checker/main/check_tls.sh
-
Make the script executable:
chmod +x check_tls.sh
-
Run the script with the URLs you want to check as arguments:
./check_tls.sh https://example.com https://another-example.com
The script should now run and display the results for the provided URLs on your Ubuntu system.