bot: Add 3 1 1 to cert hash
All checks were successful
Build Docker / Build Docker (push) Successful in 16s

This commit is contained in:
Nathan Woodburn 2023-09-27 18:03:53 +10:00
parent 8cd5ba5c56
commit b7ca3e2ddc
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

4
bot.py
View File

@ -192,10 +192,10 @@ async def ssl(ctx, domain: str):
tlsa_process = subprocess.Popen(" ".join(tlsa_command), shell=True, stdout=subprocess.PIPE)
tlsa_output, _ = tlsa_process.communicate()
tlsa_server = binascii.hexlify(tlsa_output).decode("utf-8")
tlsa_server = "3 1 1 " + binascii.hexlify(tlsa_output).decode("utf-8")
message = message + "\n## TLSA Record from webserver:\n`3 1 1 " + tlsa_server + "`\n"
message = message + "\n## TLSA Record from webserver:\n`" + tlsa_server + "`\n"
# Check for TLSA record
response = resolver.resolve("_443._tcp."+domain, "TLSA")