Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thescriptguy/certificatechecker

certificateChecker Python Script
https://github.com/thescriptguy/certificatechecker

ca certificate certificates checker expiry json metadata mongodb pki python python3 upload

Last synced: about 1 month ago
JSON representation

certificateChecker Python Script

Awesome Lists containing this project

README

        

## Example to send email
If you'd like to be sent an email of the results of the queries, the mail.cfg file needs to be defined.

Some important things to note in the mail.cfg file:
* Right now only Authenticated SMTP STARTTLS is allowed. This means you need all the fields below in order to access except the verbose field.
* If the verbose field is defined to True, then additional SMTP interactions will be displayed.
* the bodyHtmlFile and bodyTextFile variables define where the HTML and TEXT versions of each file is. Make sure you add the MONITOREDHOSTS keyword into the HTML and TEXT files. This is used for inserting the results into the correct place.

```json
{
"hostname": "mail.mysmartdomain.com",
"port": 465,
"smtpuser": "[email protected]",
"smtppass": "BlaPasswordBla1",
"startTLS": "true",
"from": "[email protected]",
"to": "[email protected]",
"subject": "Certificate Checker",
"bodyHtmlFile": "bodyhtml.html",
"bodyTextFile": "bodytext.txt",
"verbose": "false"
}
```

### Single host:
```bash
$ python3 certCheck.py --hostname apple.com --sendEmail
$
```

### Multiple hosts:
```bash
$ python3 certCheck.py --queryFile queryfile --sendEmail
$
```