47 lines
1.1 KiB
Markdown
47 lines
1.1 KiB
Markdown
# certificate
|
|
|
|
Bash scripts to check whether a site is available or not, and whether the certificate is valid or not.
|
|
|
|
|
|
|
|
#### 1) urls_check.sh
|
|
|
|
Usage: urls_check.sh
|
|
|
|
1. Check whether the certificate is valid or not, using <u>showcert</u> (pip install showcert) if available, else use <u>openssl.</u>
|
|
2. Check if the url is up or down with it's http_code.
|
|
|
|
Required the <u>urls_list.txt</u> file that contain a list of domains:
|
|
|
|
```bash
|
|
#https://notif.domain.com
|
|
#https://ntfy.domain.com
|
|
https://paperlessngx.domain.com
|
|
https://pastebin.domain.com
|
|
|
|
# comment line to disable checking this url
|
|
```
|
|
|
|
Required the <u>status.txt</u> file to give information about the http code returned.
|
|
|
|
```bash
|
|
302;Found;https://developer.mozilla.org/fr/docs/Web/HTTP/Status/302
|
|
```
|
|
|
|
|
|
|
|
#### 2) validity.sh
|
|
|
|
Usage: ./validity.sh
|
|
|
|
Check whether the certificate is valid or not, using <u>showcert</u> (pip install showcert) if available, else use <u>openssl.</u>
|
|
|
|
Required the <u>validity_domains.txt</u> file that contain a list of domains:
|
|
|
|
```bash
|
|
domain1.com
|
|
domain2.fr
|
|
```
|
|
|
|
or edit the hosts() array in source code.
|