bot: Updated dig location
All checks were successful
Build Docker / Build Docker (push) Successful in 31s
All checks were successful
Build Docker / Build Docker (push) Successful in 31s
This commit is contained in:
parent
a74943dec3
commit
be6f6c14f9
4
bot.py
4
bot.py
@ -63,11 +63,9 @@ async def botstatus(ctx, message: str, statusmethod: str = None):
|
|||||||
@tree.command(name="dig", description="Dig a dns record")
|
@tree.command(name="dig", description="Dig a dns record")
|
||||||
async def dig(ctx, domain: str, record_type: str = "A"):
|
async def dig(ctx, domain: str, record_type: str = "A"):
|
||||||
record_type = record_type.upper()
|
record_type = record_type.upper()
|
||||||
|
|
||||||
# Format dig @100.74.29.146 -p 5350 <domain> <type>
|
|
||||||
resolver = dns.resolver.Resolver()
|
resolver = dns.resolver.Resolver()
|
||||||
resolver.nameservers = ["100.74.29.146"]
|
resolver.nameservers = ["100.74.29.146"]
|
||||||
resolver.port = 5350
|
resolver.port = 53
|
||||||
try:
|
try:
|
||||||
# Query the DNS record
|
# Query the DNS record
|
||||||
response = resolver.resolve(domain, record_type)
|
response = resolver.resolve(domain, record_type)
|
||||||
|
Loading…
Reference in New Issue
Block a user