fix: Update DNS server
All checks were successful
Build Docker / Build Docker (push) Successful in 28s

This commit is contained in:
Nathan Woodburn 2023-11-08 18:09:50 +11:00
parent 31c0b0a4e8
commit 830e6671af
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

8
bot.py
View File

@ -74,7 +74,7 @@ async def dig(ctx, domain: str, record_type: str = "A"):
record_type = record_type.upper() record_type = record_type.upper()
resolver = dns.resolver.Resolver() resolver = dns.resolver.Resolver()
resolver.nameservers = ["100.74.29.146"] resolver.nameservers = ["100.74.29.146"]
resolver.port = 53 resolver.port = 5350
try: try:
# Query the DNS record # Query the DNS record
response = resolver.resolve(domain, record_type) response = resolver.resolve(domain, record_type)
@ -148,7 +148,7 @@ async def ssl(ctx, domain: str, showcert: bool = False, notifymeonexpiry: bool =
message = "" message = ""
resolver = dns.resolver.Resolver() resolver = dns.resolver.Resolver()
resolver.nameservers = ["100.74.29.146"] resolver.nameservers = ["100.74.29.146"]
resolver.port = 53 resolver.port = 5350
domain_check = False domain_check = False
try: try:
# Query the DNS record # Query the DNS record
@ -327,8 +327,8 @@ async def checkForSSLExpiry():
userid, domain = line.split(",") userid, domain = line.split(",")
print(f"Checking SSL certificate for {domain}...", flush=True) print(f"Checking SSL certificate for {domain}...", flush=True)
resolver = dns.resolver.Resolver() resolver = dns.resolver.Resolver()
resolver.nameservers = ["100.74.29.146"] resolver.nameservers = ["10.2.1.15"]
resolver.port = 53 resolver.port = 5350
try: try:
# Query the DNS record # Query the DNS record
response = resolver.resolve(domain, "A") response = resolver.resolve(domain, "A")