fix: Add support for wildcard domain checks
All checks were successful
Build Docker / Build Docker (push) Successful in 3m40s

This commit is contained in:
Nathan Woodburn 2025-01-07 22:43:52 +11:00
parent fdc5e66daa
commit 9e4b4294b0
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 7 additions and 2 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
.env
__pycache__/
.venv/

6
bot.py
View File

@ -235,8 +235,12 @@ async def ssl(ctx, domain: str, showcert: bool = False, notifymeonexpiry: bool =
message = message + "\n## SSL Domains:\n"
for cn in domains:
message = message + "- " + cn + "\n"
if domain in domains:
if cn == domain:
domain_check = True
elif cn.startswith("*."):
if domain.endswith(cn[1:]):
domain_check = True
expiry_date = cert_obj.not_valid_after
# Check if expiry date is past