bot: Check for TLSA missing in DNS
All checks were successful
Build Docker / Build Docker (push) Successful in 15s
All checks were successful
Build Docker / Build Docker (push) Successful in 15s
This commit is contained in:
parent
0fb5834eb3
commit
00cbe236b2
10
bot.py
10
bot.py
@ -206,7 +206,13 @@ async def ssl(ctx, domain: str):
|
|||||||
message = message + "- " +str(record) + "\n"
|
message = message + "- " +str(record) + "\n"
|
||||||
|
|
||||||
if not tlsa_records:
|
if not tlsa_records:
|
||||||
message = message + "\n## TLSA Record not found\n"
|
message = message + "\n## Result:\n:x: No TLSA record found\n"
|
||||||
|
else:
|
||||||
|
if tlsa_server == tlsa_records[0]:
|
||||||
|
message = message + "\n## Result:\n:white_check_mark: TLSA record matches certificate\n"
|
||||||
|
else:
|
||||||
|
message = message + "\n## Result:\n:x: TLSA record does not match certificate\n"
|
||||||
|
|
||||||
|
|
||||||
# If message is too long, send it in 2 messages
|
# If message is too long, send it in 2 messages
|
||||||
if (len(message) > 2000):
|
if (len(message) > 2000):
|
||||||
@ -217,7 +223,7 @@ async def ssl(ctx, domain: str):
|
|||||||
|
|
||||||
|
|
||||||
await ctx.response.send_message(message1)
|
await ctx.response.send_message(message1)
|
||||||
await ctx.send(message2)
|
await ctx.send_message(message2)
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user