A simple way to check certificate's infomation.
git clone git@github.com:yrccondor/Certificate-checker.git
cd Certificate-checker
- curl
- Python3
Edit config.json
to configure which website you want to scan.
Like:
{
"config_list": ["example.com","test.example.com"],
"timeout": 10
}
Then use it with curl
:
python3 check.py
If everything works, you will see:
-----------------------------
Certificate infomation about example.com:
Check time: 2018-01-16 14:52:31
Start: 2015-11-03 00:00:00
End: 2018-11-28 12:00:00
Common Name: www.example.org
Issuer Info: CN=DigiCert SHA2 High Assurance Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US
-----------------------------
config.json
:
website_list
: The list of websites. Only needhost[:port]
(Without protocol). Default port: 443.[timeout]
: The duration while connecting. Default: 10(s).[sleep]
: How long should we wait between scannings. Default: 2(s).[output]
: How we print results. You can choose"print"
or"print_details"
. Default:"print"
. If you choose"print_details"
, you will see:
[13:29:43] Read config.json successfully.
[13:29:43] Read website_list successfully. 3 web site(s) will be scaned.
[13:29:43] Read timeout successfully. Value: 10s
[13:29:43] Read output successfully. Value: 1s
[13:29:43] Scanning example.com(1 in 3).
[13:29:45] Read reponse successfully.
[13:29:45] Read certificate infomation successfully.
[13:29:45] Environment cleaned.
-----------------------------
Certificate infomation about example.com:
Check time: 2018-01-16 13:29:45
Start: 2015-11-03 00:00:00
End: 2018-11-28 12:00:00
Common Name: www.example.org
Issuer Info: CN=DigiCert SHA2 High Assurance Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US
-----------------------------
Here is an example of config.json
:
{
"website_list": ["example.com","test.example.com"],
"timeout": 15,
"sleep": 1,
"output": "print_details"
}