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"