From d3c82b6c0588dc1367ef19920fb2f5a6299763aa Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Wed, 27 Sep 2023 17:38:56 +1000 Subject: [PATCH] bot: Trim certs --- bot.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bot.py b/bot.py index 8b6e940..7663ad5 100644 --- a/bot.py +++ b/bot.py @@ -175,6 +175,9 @@ async def ssl(ctx, domain: str): certificates.append(current_cert) current_cert = "" + # Remove anything before -----BEGIN CERTIFICATE----- + certificates = [cert[cert.find("-----BEGIN CERTIFICATE-----"):] for cert in certificates] + if certificates: cert = certificates[0] message = message + "\n## Website Certificate:\n`" + cert + "`\n"