Skip to main content

CheckSSLCert

Made with Python

Huntroid-India - SSLCheckerr License stars - SSLChecker forks - SSLChecker issues - SSLCheckerr

CheckSSLCert is a Python library that allows you to check the SSL certificate status for single or multiple domains. It provides an easy way to determine if an SSL certificate is active, the number of days left until it expires, and additional certificate information.

Installation

You can install CheckSSLCert using pip:

pip install CheckSSLCert

Usage

SSL Validation (Single Domain)

To check the SSL certificate status for a single domain, you can use the from_link function from validate class.

Here's a sample code demonstrating the usage:

from CheckSSLCert import validate

# Create an from_link object for the domain
checker = validate.from_link("example.com")

# Check the SSL certificate status
status = checker.IsActive()
days_left = checker.getDayLeft()
info = checker.getInfo()

# Print the results
print("SSL Status:", status)
print("Days Left:", days_left)
print("Certificate Info:", info)

# Print the SSL certificate Report
print(checker)

Bulk SSL Validation (Multiple Domains - CSV File)

To check the SSL certificate status for multiple domains, you can use the from_file function from validate class.

Print the SSL certificate status report to the console

Here's a sample code demonstrating the usage:

from CheckSSLCert import validate

# Create a from_file object with the path to the domain list file (CSV format)
checker = validate.from_file("domain_list.csv")

# Print the SSL certificate status report to the console (Full Report)
checker.print_report()

# Print the SSL certificate status report to the console (Partial Report)
checker.print_report(IsAll=False)

Note:

  • If you want to print the complete report, set IsAll to True. By default, the full report is printed.
  • If you want to print the report only for the domains with expired or expiring in 14 days, set IsAll to False.

Send the SSL certificate status report via email

Here's a sample code demonstrating the usage:

from CheckSSLCert import validate

# Create a from_file object with the path to the domain list file (CSV format)
checker = validate.from_file("domain_list.csv")

# Configure the Mail Server
mail_config = {'sender': "example@gmail.com",
               'password': "passward",
               'receiver': ["example2@gmail.com", "example3@gmail.com"],
               'subject': "SSL Checker Report",
               'smtp_server': "smtp.gmail.com",
               'port': 587}

# Send the SSL certificate status report to an email address (Full Report)
checker.send_report(mail_config, IsAll=True)

# Send the SSL certificate status report to an email address (Partial Report)
checker.send_report(mail_config, IsAll=False)

Note:

  • If you want to you a different mail server, set smtp_server to the SMTP server address in mail_config.
  • If you want to use TLS, set port to 587 in mail_config.
  • If you want to use SSL, set port to 465 in mail_config.
  • If you want to send the complete report, set IsAll to True. By default, the full report is sent.
  • If you want to send the report only for the domains with expired or expiring in 14 days, set IsAll to False.

Save the SSL certificate status report to a file

Here's a sample code demonstrating the usage:

from CheckSSLCert import validate

# Create a from_file object with the path to the domain list file (CSV format)
checker = validate.from_file("domain_list.csv")

# Save the SSL certificate status report to a file (HTML format)

# By default, the report is saved in HTML format
checker.save_report("C:\Users\YourUsername\Desktop") 

# Save the SSL certificate status report to a file (CSV format)
checker.save_report("C:\Users\YourUsername\Desktop", file_type="csv")

Note:

  • If you want to save the complete report, set IsAll to True. By default, the full report is saved.
  • If you want to save the report only for the domains with expired or expiring in 14 days, set IsAll to False.
  • By default, the report is saved in HTML format. If you want to save the report in CSV format, set file_type to csv.

Domain List File Format

The domain list file should be in CSV format. The first row should contain the column names. Here's a sample domain list file:

Click the Download button and Save it as domain_list.csv.

CSV - Documentation

File Format

S.No Website_Name Website_URL
1 Google https://google.com
2 Facebook - Mobile https://m.facebook.com
3 Twitter www.twitter.com

Contribution

Contributions are welcome! If you have any suggestions, improvements, or bug fixes, please submit a pull request.

License

Released under MIT by @Huntroid-India.

Metadata

Release files for CheckSSLCert 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CheckSSLCert 0.1.1
File Size Uploaded
CheckSSLCert-0.1.1.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for CheckSSLCert 0.1.1
File Interpreter ABI Platform
CheckSSLCert-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 16.6 kB

Release files / CheckSSLCert-0.1.1.tar.gz

Download URL CheckSSLCert-0.1.1.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2fe8ca4e283bba790f0e1540f4de2230df307f0638409fdee31ae40bfeff411a
BLAKE2b-256 checksum
How to use checksums
f73af8ff5233d17e63a464d2b2efa462bdf00c1ca28c577a7be11690e86c23e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release files / CheckSSLCert-0.1.1-py3-none-any.whl

Download URL CheckSSLCert-0.1.1-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
66656e1f8bd7e45aaaa84bf7fed0fbf75c6289824dc38cd2127daf9cdc61df5b
BLAKE2b-256 checksum
How to use checksums
d4c0720bf7dcf7db3fb154f0d4da29c6de56c82711cbc04bed3b85e1afa72ea5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page