From 29bb64b35c194f08f548057e39df023e5ef199c8 Mon Sep 17 00:00:00 2001 From: Seaswimmer Date: Tue, 28 May 2024 18:42:42 -0400 Subject: [PATCH] fix(seautils): query ANY instead of A records --- seautils/seautils.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/seautils/seautils.py b/seautils/seautils.py index 8ef8e1f..c7e732f 100644 --- a/seautils/seautils.py +++ b/seautils/seautils.py @@ -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)