fix(seautils): query ANY instead of A records
Some checks failed
Actions / Build Documentation (MkDocs) (push) Successful in 25s
Actions / Lint Code (Ruff & Pylint) (push) Failing after 38s

This commit is contained in:
Seaswimmer 2024-05-28 18:42:42 -04:00
parent 5ffc42480a
commit 29bb64b35c
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -88,15 +88,12 @@ class SeaUtils(commands.Cog):
@commands.command(name='dig', aliases=['dnslookup', 'nslookup'])
@commands.is_owner()
async def dig(self, ctx: commands.Context, name: str, type: str | None = 'A', server: str | None = None, port: int = 53) -> None:
async def dig(self, ctx: commands.Context, name: str, type: str | None = 'ANY', server: str | None = None, port: int = 53) -> None:
"""Retrieve DNS information for a domain."""
command_opts: list[str | int] = ['dig']
if server:
command_opts.extend(['@', server])
command_opts.extend([name, type])
if port != 53:
command_opts.extend(['-p', port])
command_opts.extend(['+yaml'])
command_opts.extend([name, type, '-p', port, '+yaml'])
try:
process: Process = await asyncio.create_subprocess_exec(*command_opts, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE)