diff --git a/README.md b/README.md index 5c5e761..f817827 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,10 @@ will create the symbolic link for each script in the \ directory. - [mem](scripts/mem) stores the shorts notes in the file. - [pomodoro](scripts/pomodoro) tracks the working time. +## Network + +- [check-cert](scripts/check-cert) retrieves information about web site's TLS certificate. + ## WWW - [bor](scripts/bor) displays the latest posts from [bash.im](https://bash.im) website. diff --git a/scripts/check-cert b/scripts/check-cert new file mode 100755 index 0000000..c316943 --- /dev/null +++ b/scripts/check-cert @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +DOMAIN=${1:?USAGE: check-cert [domain name]} + +echo | { openssl s_client -connect "${DOMAIN}:443" \ + | openssl x509 -noout -dates; +} 2>&1 | sed -E '/verify|DONE/d; s/^depth=[0-9]+[[:space:]]+//' +