Dough Git

commit

Meow

commit
7bb52b33125810f04945d6fcfcf25ef62f4b4857
author
Clove Twilight <[email protected]>
date
2026-10-27 09:05

diff --git a/commands/cogs/fun/gifs.py b/commands/cogs/fun/gifs.py
index c651c25..14a19d2 100644
--- a/commands/cogs/fun/gifs.py
+++ b/commands/cogs/fun/gifs.py
@@ -42,7 +42,7 @@ class Gifs(commands.Cog):
             return components.error(f"There's no gif called `{gif}`.")
 
         return components.panel(
-            images=[f"https://m.doughmination.gay/gif/{slug}.gif"],
+            images=[f"https://raw.doughmination.gay/gif/{slug}.gif"],
             footer="Sandrone",
         )
 
diff --git a/commands/cogs/lookups/dig.py b/commands/cogs/lookups/dig.py
new file mode 100644
index 0000000..9dbe225
--- /dev/null
+++ b/commands/cogs/lookups/dig.py
@@ -0,0 +1,275 @@
+import asyncio
+from dataclasses import dataclass
+import discord
+from discord import app_commands
+from discord.ext import commands
+from dns import asyncresolver, exception, name, resolver, reversename
+import ipaddress
+import re
+from sandrone import mood
+import time
+from typing import Any
+from utils import components
+
+recordTypes = ("A", "AAAA", "CNAME", "MX", "NS", "TXT", "SOA", "CAA")
+# public resolvers rather than the host's, which would answer for
+# internal names too
+publicNameservers = ["1.1.1.1", "9.9.9.9"]
+lookupTimeout = 5.0
+maxNameLength = 253
+
+thumbnail = "https://raw.doughmination.gay/img/search.png"
+
+cacheTtl = 120.0
+maxCached = 64
+overviewLimit = 300
+pageLimit = 3500
+
+PAGE_PREFIX = "dig:"
+PAGE_TEMPLATE = r"dig:(?P<target>\S+)"
+
+
+class DigError(Exception):
+    pass
+
+
+@dataclass(frozen=True)
+class RecordSet:
+    kind: str
+    ttl: int
+    values: tuple[str, ...]
+
+
+@dataclass(frozen=True)
+class DigResult:
+    name: str
+    sets: tuple[RecordSet, ...]
+
+
+_results: dict[str, tuple[float, DigResult]] = {}
+
+
+def normaliseName(query: str) -> str:
+    query = query.strip().strip("<>")
+    query = re.sub(r"^[a-zA-Z][a-zA-Z0-9+.-]*://", "", query)
+    query = query.split("/")[0].split("?")[0].split("#")[0]
+    query = query.split("@")[-1]
+    if query.count(":") == 1:
+        query = query.split(":")[0]
+    return query.rstrip(".").lower()
+
+
+def isAddress(query: str) -> bool:
+    try:
+        ipaddress.ip_address(query)
+    except ValueError:
+        return False
+    return True
+
+
+def makeResolver() -> asyncresolver.Resolver:
+    dns = asyncresolver.Resolver(configure=False)
+    dns.nameservers = publicNameservers
+    dns.lifetime = lookupTimeout
+    return dns
+
+
+async def queryType(
+    dns: asyncresolver.Resolver, target: name.Name, kind: str
+) -> RecordSet | None:
+    try:
+        answer = await dns.resolve(target, kind, search=False)
+    except resolver.NoAnswer, resolver.NoNameservers:
+        return None
+    if answer.rrset is None:
+        return None
+    return RecordSet(
+        kind,
+        answer.rrset.ttl,
+        tuple(record.to_text() for record in answer),
+    )
+
+
+async def dig(query: str) -> DigResult:
+    target = normaliseName(query)
+    if not target or len(target) > maxNameLength:
+        raise DigError(
+            "That doesn't look like a domain or IP address. Try "
+            "`example.com`."
+        )
+
+    try:
+        if isAddress(target):
+            dnsName = reversename.from_address(target)
+            kinds: tuple[str, ...] = ("PTR",)
+        else:
+            dnsName = name.from_text(target)
+            kinds = recordTypes
+    except exception.DNSException:
+        raise DigError(f"`{target}` is not a valid domain.") from None
+
+    dns = makeResolver()
+    outcomes = await asyncio.gather(
+        *(queryType(dns, dnsName, kind) for kind in kinds),
+        return_exceptions=True,
+    )
+
+    if any(isinstance(out, resolver.NXDOMAIN) for out in outcomes):
+        raise DigError(f"`{target}` does not exist.")
+    sets = tuple(out for out in outcomes if isinstance(out, RecordSet))
+    if not sets:
+        if all(isinstance(out, exception.Timeout) for out in outcomes):
+            raise DigError("The DNS lookup timed out.")
+        raise DigError(f"No DNS records found for `{target}`.")
+    for out in outcomes:
+        # anything that isn't dns trouble is a real bug, so let it out
+        if isinstance(out, BaseException) and not isinstance(
+            out, exception.DNSException
+        ):
+            raise out
+
+    return DigResult(target, sets)
+
+
+async def getResult(target: str) -> DigResult:
+    hit = _results.get(target)
+    if hit and time.monotonic() - hit[0] < cacheTtl:
+        return hit[1]
+    result = await dig(target)
+    if len(_results) >= maxCached:
+        _results.clear()
+    _results[target] = (time.monotonic(), result)
+    return result
+
+
+def clip(text: str, limit: int) -> str:
+    return text if len(text) <= limit else text[:limit] + "\n…"
+
+
+def recordCount(records: RecordSet) -> str:
+    count = len(records.values)
+    return (
+        f"{count} record{'s' if count != 1 else ''} · TTL {records.ttl}s"
+    )
+
+
+def overviewBody(result: DigResult) -> str:
+    return "\n".join(
+        f"> **{records.kind}** · {recordCount(records)}\n"
+        + components.codeBlock(
+            clip("\n".join(records.values), overviewLimit)
+        )
+        for records in result.sets
+    )
+
+
+def recordBody(records: RecordSet) -> str:
+    return f"> **{records.kind}** · {recordCount(records)}\n" + (
+        components.codeBlock(clip("\n".join(records.values), pageLimit))
+    )
+
+
+def renderResult(
+    target: str, result: DigResult, pageKey: str = "all"
+) -> components.Panel:
+    picked = next(
+        (records for records in result.sets if records.kind == pageKey),
+        None,
+    )
+    if len(result.sets) == 1:
+        picked = result.sets[0]
+    body = recordBody(picked) if picked else overviewBody(result)
+    label = f"{picked.kind} Records" if picked else "All Records"
+
+    customId = f"{PAGE_PREFIX}{target}"
+    menu = (
+        components.pagePicker(
+            customId,
+            [("all", "All Records", "A short look at every type")]
+            + [
+                (
+                    records.kind,
+                    f"{records.kind} Records",
+                    recordCount(records),
+                )
+                for records in result.sets
+            ],
+            picked.kind if picked else "all",
+            placeholder="Pick a record type…",
+        )
+        if len(result.sets) > 1 and len(customId) <= 100
+        else None
+    )
+    return components.panel(
+        title=f"DNS Records for {result.name}"[:256],
+        body=body,
+        thumbnail=thumbnail,
+        menu=menu,
+        footer=f"{label} · Resolved via 1.1.1.1 and 9.9.9.9",
+    )
+
+
+async def digPanel(query: str, pageKey: str = "all") -> components.Panel:
+    target = normaliseName(query)
+    try:
+        result = await getResult(target)
+    except DigError as error:
+        return components.panel(
+            body=f":x: {error}",
+            thumbnail=thumbnail,
+            color=components.RED,
+        )
+    return renderResult(target, result, pageKey)
+
+
+class DigPage(
+    discord.ui.DynamicItem[discord.ui.Select], template=PAGE_TEMPLATE
+):
+    def __init__(self, target: str, customId: str) -> None:
+        self.target = target
+        super().__init__(
+            discord.ui.Select(
+                custom_id=customId,
+                options=[discord.SelectOption(label="_", value="all")],
+            )
+        )
+
+    @classmethod
+    async def from_custom_id(
+        cls,
+        interaction: discord.Interaction,
+        item: discord.ui.Item[Any],
+        match: re.Match[str],
+        /,
+    ) -> DigPage:
+        return cls(match["target"], match.string)
+
+    async def callback(self, interaction: discord.Interaction) -> None:
+        await interaction.response.defer()
+        await interaction.edit_original_response(
+            view=await digPanel(self.target, self.item.values[0])
+        )
+
+
+class Dig(commands.Cog):
+    def __init__(self, bot: commands.Bot) -> None:
+        self.bot = bot
+
+    @app_commands.command(
+        name="dig",
+        description="Look up the DNS records for a domain or IP",
+    )
+    @app_commands.describe(
+        query="The domain, URL or IP address to look up"
+    )
+    @mood.sassy
+    async def dig(
+        self, interaction: discord.Interaction, query: str
+    ) -> None:
+        await interaction.response.defer()
+        await interaction.followup.send(view=await digPanel(query))
+
+
+async def setup(bot: commands.Bot) -> None:
+    bot.add_dynamic_items(DigPage)
+    await bot.add_cog(Dig(bot))
diff --git a/commands/cogs/lookups/ubdict.py b/commands/cogs/lookups/ubdict.py
index f6f3d30..5a4492e 100644
--- a/commands/cogs/lookups/ubdict.py
+++ b/commands/cogs/lookups/ubdict.py
@@ -81,7 +81,7 @@ class UrbanDictionary(commands.Cog):
             title=f"Searched '{query}' and found:",
             url=reply.get("permalink"),
             body="".join(parts),
-            thumbnail="https://m.doughmination.gay/img/search.png",
+            thumbnail="https://raw.doughmination.gay/img/search.png",
             footer=f"by {reply.get('author')}, Urban Dictionary",
         )
 
diff --git a/commands/cogs/lookups/whois.py b/commands/cogs/lookups/whois.py
index b01c7cc..e96360b 100644
--- a/commands/cogs/lookups/whois.py
+++ b/commands/cogs/lookups/whois.py
@@ -1,19 +1,38 @@
 import asyncio
+from dataclasses import dataclass
 import datetime as dt
 import discord
 from discord import app_commands
 from discord.ext import commands
+import httpx2
 import ipaddress
 import re
 from sandrone import mood
+import time
+from typing import Any
 from utils import components
+import whodap
+from whodap.errors import WhodapError
 
 ianaServer = "whois.iana.org"
 whoisPort = 43
 lookupTimeout = 10
 maxHops = 4
+# registered names sit at most this many labels above the tld, as in
+# example.co.uk, so www.a.b.example.com can't fan out into dozens of
+# requests
+maxRdapLookups = 3
+complaintForm = "https://www.icann.org/wicf/"
+eppStatusDocs = "https://icann.org/epp#"
 
-thumbnail = "https://m.doughmination.gay/img/search.png"
+thumbnail = "https://raw.doughmination.gay/img/search.png"
+
+cacheTtl = 300.0
+maxCached = 64
+rawLimit = 3500
+
+PAGE_PREFIX = "whois:"
+PAGE_TEMPLATE = r"whois:(?P<target>\S+)"
 
 queryFormats = {
     "whois.verisign-grs.com": "domain {query}",
@@ -40,6 +59,8 @@ domainFields = (
         ("registrar", "sponsoring registrar", "registrar name"),
         False,
     ),
+    ("Registrant", ("registrant organization", "holder", "org"), False),
+    ("Country", ("registrant country", "country"), False),
     (
         "Registered",
         (
@@ -75,19 +96,17 @@ domainFields = (
         ),
         True,
     ),
+    ("DNSSEC", ("dnssec",), False),
+)
+
+domainContactFields = (
+    ("Registrar URL", ("registrar url", "referral url"), False),
     (
-        "Registrant",
-        (
-            "registrant organization",
-            "registrant name",
-            "registrant",
-            "holder",
-            "org",
-        ),
+        "Abuse Email",
+        ("registrar abuse contact email", "abuse contact"),
         False,
     ),
-    ("Country", ("registrant country", "country"), False),
-    ("DNSSEC", ("dnssec",), False),
+    ("Abuse Phone", ("registrar abuse contact phone",), False),
 )
 
 networkFields = (
@@ -109,7 +128,12 @@ networkFields = (
     ("Country", ("country",), False),
     ("Registered", ("regdate", "created"), True),
     ("Updated", ("updated", "last-modified", "changed"), True),
-    ("Abuse", ("orgabuseemail", "abuse-mailbox", "abuse-c"), False),
+)
+
+networkContactFields = (
+    ("Abuse Email", ("orgabuseemail", "abuse-mailbox"), False),
+    ("Abuse Phone", ("orgabusephone",), False),
+    ("Abuse Handle", ("abuse-c",), False),
 )
 
 dateFormats = (
@@ -121,6 +145,61 @@ dateFormats = (
     "%d.%m.%Y",
 )
 
+redactionMarkers = (
+    "redacted",
+    "privacy",
+    "withheld",
+    "not disclosed",
+    "data protected",
+)
+
+# person-level contact lines in raw port 43 text. the organisation,
+# country and state of a contact are kept since those identify the
+# registrant without pointing at anyone's front door
+personalLine = re.compile(
+    r"^\s*(?:"
+    r"(?:registrant|admin|administrative|tech|technical|billing)"
+    r"(?![^:]*\b(?:organi[sz]ation|org|country|state|province)\b)"
+    r"|person|address|phone|fax-no|e-mail"
+    r")[^:]*:",
+    re.IGNORECASE,
+)
+
+eppPrefixes = ("client", "server", "pending")
+eppStandalone = {
+    "ok",
+    "active",
+    "inactive",
+    "addperiod",
+    "autorenewperiod",
+    "renewperiod",
+    "transferperiod",
+    "redemptionperiod",
+}
+
+
+class WhoisError(Exception):
+    pass
+
+
+@dataclass(frozen=True)
+class Page:
+    key: str
+    label: str
+    description: str | None
+    body: str
+
+
+@dataclass(frozen=True)
+class Report:
+    title: str
+    source: str
+    pages: tuple[Page, ...]
+    complaintForm: bool = False
+
+
+_reports: dict[str, tuple[float, Report]] = {}
+
 
 def normaliseQuery(query: str) -> str:
     query = query.strip().strip("<>").lower()
@@ -140,6 +219,12 @@ def isNetwork(query: str) -> bool:
     return True
 
 
+def isGeneric(domain: str) -> bool:
+    # country codes are always two letters, and icann only polices
+    # the rest
+    return len(domain.rsplit(".", 1)[-1]) > 2
+
+
 def addField(fields: dict[str, list[str]], key: str, value: str) -> None:
     key = key.strip().lower()
     value = value.strip()
@@ -191,7 +276,8 @@ def parseRecord(text: str) -> dict[str, list[str]]:
 
 def isPlaceholder(value: str) -> bool:
     value = value.strip()
-    if value.lower() in (
+    lowered = value.lower()
+    if lowered in (
         "n/a",
         "na",
         "none",
@@ -200,6 +286,8 @@ def isPlaceholder(value: str) -> bool:
         "not applicable",
     ):
         return True
+    if any(marker in lowered for marker in redactionMarkers):
+        return True
     return value.startswith(("0000-00-00", "0001-01-01"))
 
 
@@ -207,12 +295,19 @@ def firstValue(
     fields: dict[str, list[str]], keys: tuple[str, ...]
 ) -> str | None:
     for key in keys:
-        values = fields.get(key)
-        if values:
-            return values[0]
+        for value in fields.get(key, []):
+            if not isPlaceholder(value):
+                return value
     return None
 
 
+def formatStamp(stamp: dt.datetime) -> str:
+    if stamp.tzinfo is None:
+        stamp = stamp.replace(tzinfo=dt.UTC)
+    seconds = int(stamp.timestamp())
+    return f"<t:{seconds}:D> (<t:{seconds}:R>)"
+
+
 def formatDate(value: str) -> str:
     raw = value.split("(")[0].strip()
     stamp = None
@@ -229,28 +324,64 @@ def formatDate(value: str) -> str:
                 continue
     if stamp is None:
         return value
-    if stamp.tzinfo is None:
-        stamp = stamp.replace(tzinfo=dt.UTC)
-    return f"<t:{int(stamp.timestamp())}:D>"
+    return formatStamp(stamp)
+
 
+def formatPhone(value: str) -> str:
+    return value.removeprefix("tel:")
 
-def formatStatuses(fields: dict[str, list[str]]) -> str | None:
+
+def eppCode(status: str) -> str:
+    words = status.split()
+    if len(words) > 1 and all(word.isalpha() for word in words):
+        return words[0].lower() + "".join(
+            word.capitalize() for word in words[1:]
+        )
+    return words[0].strip(",") if words else ""
+
+
+def formatStatus(status: str) -> str:
+    code = eppCode(status)
+    if code.startswith(eppPrefixes) or code.lower() in eppStandalone:
+        return f"[`{code}`](<{eppStatusDocs}{code}>)"
+    return f"`{code}`"
+
+
+def quoteLines(fields: list[components.Field]) -> str:
+    return "\n".join(f"> **{name}**: {value}" for name, value in fields)
+
+
+def quoteList(items: list[str]) -> str:
+    return "\n".join(f"> {item}" for item in items)
+
+
+def pickFields(
+    fields: dict[str, list[str]],
+    spec: tuple[tuple[str, tuple[str, ...], bool], ...],
+) -> list[components.Field]:
+    return [
+        (name, (formatDate(value) if isDate else value)[:1024])
+        for name, keys, isDate in spec
+        if (value := firstValue(fields, keys))
+    ]
+
+
+def statusesFrom(fields: dict[str, list[str]]) -> list[str]:
     statuses = (
         fields.get("domain status")
         or fields.get("status")
         or fields.get("state")
+        or []
     )
-    if not statuses:
-        return None
     cleaned: list[str] = []
     for status in statuses:
-        name = status.split()[0].strip(",")
-        if name and name not in cleaned:
-            cleaned.append(name)
-    return ", ".join(f"`{name}`" for name in cleaned[:6]) or None
+        code = eppCode(status)
+        if code and code not in cleaned:
+            cleaned.append(code)
+    return cleaned
 
 
-def formatNameServers(fields: dict[str, list[str]]) -> str | None:
+def nameServersFrom(fields: dict[str, list[str]]) -> list[str]:
     servers: list[str] = []
     for key in (
         "name server",
@@ -263,161 +394,395 @@ def formatNameServers(fields: dict[str, list[str]]) -> str | None:
             host = value.split()[0].lower().rstrip(".")
             if host and host not in servers:
                 servers.append(host)
-    if not servers:
-        return None
-    return "\n".join(servers[:8])
+    return servers
 
 
-class Whois(commands.Cog):
-    def __init__(self, bot: commands.Bot) -> None:
-        self.bot = bot
+def scrubRecord(text: str) -> str:
+    return "\n".join(
+        line.split(":", 1)[0] + ": [hidden]"
+        if personalLine.match(line)
+        else line
+        for line in text.strip().splitlines()
+    )
 
-    @app_commands.command(
-        name="whois",
-        description="Look up the WHOIS record for a domain or IP",
+
+def buildPages(
+    overview: list[components.Field],
+    statuses: list[str],
+    nameServers: list[str],
+    contacts: list[components.Field],
+    raw: str | None = None,
+) -> tuple[Page, ...]:
+    pages: list[Page] = []
+    if overview:
+        pages.append(
+            Page(
+                "overview",
+                "Overview",
+                "Registration, dates and ownership",
+                quoteLines(overview),
+            )
+        )
+    if statuses:
+        pages.append(
+            Page(
+                "status",
+                "Status",
+                f"{len(statuses)} status code(s)",
+                quoteList([formatStatus(s) for s in statuses]),
+            )
+        )
+    if nameServers:
+        pages.append(
+            Page(
+                "nameservers",
+                "Name Servers",
+                f"{len(nameServers)} name server(s)",
+                quoteList([f"`{server}`" for server in nameServers]),
+            )
+        )
+    if contacts:
+        pages.append(
+            Page(
+                "contacts",
+                "Contacts",
+                "Registrar and abuse contacts",
+                quoteLines(contacts),
+            )
+        )
+    if raw:
+        clipped = raw[:rawLimit] + ("\n…" if len(raw) > rawLimit else "")
+        pages.append(
+            Page(
+                "raw",
+                "Raw Record",
+                "The record as the server sent it",
+                components.codeBlock(clipped),
+            )
+        )
+    return tuple(pages)
+
+
+def rdapCandidates(domain: str) -> list[tuple[str, str]]:
+    # rdap wants the name and tld apart, so example.co.uk is example.co
+    # + uk. longest first: www.example.com still falls back to
+    # example.com, and registries like co.uk answer for themselves
+    parts = domain.split(".")
+    if len(parts) < 2:
+        return []
+    tld = parts[-1]
+    first = max(0, len(parts) - 1 - maxRdapLookups)
+    return [
+        (".".join(parts[start:-1]), tld)
+        for start in range(first, len(parts) - 1)
+    ]
+
+
+def rdapPages(record: dict[str, Any]) -> tuple[Page, ...]:
+    # contact names, emails, phones and addresses for the registrant,
+    # admin and tech are left out on purpose: rdap hands them over for
+    # unredacted registrations, and the bot shouldn't post someone's
+    # home address into a channel
+    def text(key: str) -> str | None:
+        value = record.get(key)
+        if not isinstance(value, str) or isPlaceholder(value):
+            return None
+        return value[:1024]
+
+    def date(key: str) -> str | None:
+        value = record.get(key)
+        if not isinstance(value, dt.datetime):
+            return None
+        return formatStamp(value)
+
+    def present(
+        pairs: tuple[tuple[str, str | None], ...],
+    ) -> list[components.Field]:
+        return [(name, value) for name, value in pairs if value]
+
+    phone = text("registrar_phone")
+    abusePhone = text("abuse_phone")
+    overview = present(
+        (
+            ("Registrar", text("registrar_name")),
+            ("Registrant", text("registrant_organization")),
+            ("Registered", date("created_date")),
+            ("Updated", date("updated_date")),
+            ("Expires", date("expires_date")),
+            ("DNSSEC", text("dnssec")),
+        )
     )
-    @app_commands.describe(
-        query="The domain name or IP address to look up"
+    contacts = present(
+        (
+            ("Registrar Email", text("registrar_email")),
+            ("Registrar Phone", formatPhone(phone) if phone else None),
+            ("Registrar Address", text("registrar_address")),
+            ("Abuse Email", text("abuse_email")),
+            (
+                "Abuse Phone",
+                formatPhone(abusePhone) if abusePhone else None,
+            ),
+        )
     )
-    @mood.sassy
-    async def whois(
-        self, interaction: discord.Interaction, query: str
-    ) -> None:
-        await interaction.response.defer()
-        await interaction.followup.send(
-            view=await self.getWhoisPanel(query)
+    statuses: list[str] = []
+    for status in record.get("status") or []:
+        code = eppCode(status) if isinstance(status, str) else ""
+        if code and code not in statuses:
+            statuses.append(code)
+    servers = [
+        server.lower().rstrip(".")
+        for server in record.get("nameservers") or []
+        if isinstance(server, str)
+    ]
+    return buildPages(overview, statuses, servers, contacts)
+
+
+async def askServer(server: str, query: str) -> str:
+    request = queryFormats.get(server, "{query}").format(query=query)
+    reader, writer = await asyncio.open_connection(server, whoisPort)
+    try:
+        writer.write(f"{request}\r\n".encode())
+        await writer.drain()
+        data = await reader.read(-1)
+    finally:
+        writer.close()
+        await writer.wait_closed()
+    return data.decode("utf-8", errors="replace")
+
+
+async def portLookup(query: str, isIp: bool) -> list[tuple[str, str]]:
+    server = ianaServer
+    target = query if isIp else query.rsplit(".", 1)[-1]
+    records: list[tuple[str, str]] = []
+    seen: set[str] = set()
+
+    for hop in range(maxHops):
+        if not server or server in seen:
+            break
+        seen.add(server)
+        try:
+            text = await asyncio.wait_for(
+                askServer(server, target), timeout=lookupTimeout
+            )
+        except OSError, TimeoutError:
+            if hop == 0:
+                raise
+            break
+        records.append((server, text))
+        referral = firstValue(parseRecord(text), referralKeys)
+        server = (
+            referral.split()[0].lower().rstrip(".") if referral else ""
         )
+        if not server and hop == 0 and not isIp:
+            server = f"whois.nic.{target}"
+        target = query
 
-    async def askServer(self, server: str, query: str) -> str:
-        request = queryFormats.get(server, "{query}").format(query=query)
-        reader, writer = await asyncio.open_connection(server, whoisPort)
-        try:
-            writer.write(f"{request}\r\n".encode())
-            await writer.drain()
-            data = await reader.read(-1)
-        finally:
-            writer.close()
-            await writer.wait_closed()
-        return data.decode("utf-8", errors="replace")
-
-    async def lookup(
-        self, query: str, isIp: bool
-    ) -> list[tuple[str, str]]:
-        server = ianaServer
-        target = query if isIp else query.rsplit(".", 1)[-1]
-        records: list[tuple[str, str]] = []
-        seen: set[str] = set()
-
-        for hop in range(maxHops):
-            if not server or server in seen:
-                break
-            seen.add(server)
+    return records
+
+
+async def rdapLookup(domain: str) -> dict[str, Any] | None:
+    candidates = rdapCandidates(domain)
+    if not candidates:
+        return None
+    async with whodap.DNSClient.new_aio_client_context() as client:
+        for name, tld in candidates:
             try:
-                text = await asyncio.wait_for(
-                    self.askServer(server, target), timeout=lookupTimeout
+                response = await asyncio.wait_for(
+                    client.aio_lookup(name, tld),
+                    timeout=lookupTimeout,
                 )
-            except OSError, TimeoutError:
-                if hop == 0:
-                    raise
-                break
-            records.append((server, text))
-            referral = firstValue(parseRecord(text), referralKeys)
-            server = (
-                referral.split()[0].lower().rstrip(".") if referral else ""
-            )
-            if not server and hop == 0 and not isIp:
-                server = f"whois.nic.{target}"
-            target = query
-
-        return records
-
-    def mergeRecords(
-        self, records: list[tuple[str, str]]
-    ) -> dict[str, list[str]]:
-        usable = records[1:] if len(records) > 1 else records
-        merged: dict[str, list[str]] = {}
-        for _, text in usable:
-            for key, values in parseRecord(text).items():
-                if key in merged and all(
-                    isPlaceholder(value) for value in values
-                ):
-                    continue
-                merged[key] = values
-        return merged
-
-    def errorPanel(self, message: str) -> components.Panel:
-        return components.panel(
-            body=f":x: {message}",
-            thumbnail=thumbnail,
-            color=components.RED,
-        )
+            except WhodapError, httpx2.HTTPError, TimeoutError:
+                continue
+            return response.to_whois_dict()
+    return None
 
-    async def getWhoisPanel(self, query: str) -> components.Panel:
-        target = normaliseQuery(query)
 
-        isIp = isNetwork(target)
-        if not target or (not isIp and "." not in target):
-            return self.errorPanel(
-                "That doesn't look like a domain or IP address. Try "
-                "`example.com`."
-            )
+def mergeRecords(records: list[tuple[str, str]]) -> dict[str, list[str]]:
+    usable = records[1:] if len(records) > 1 else records
+    merged: dict[str, list[str]] = {}
+    for _, text in usable:
+        for key, values in parseRecord(text).items():
+            if key in merged and all(
+                isPlaceholder(value) for value in values
+            ):
+                continue
+            merged[key] = values
+    return merged
+
+
+async def buildReport(target: str) -> Report:
+    isIp = isNetwork(target)
+    if not target or (not isIp and "." not in target):
+        raise WhoisError(
+            "That doesn't look like a domain or IP address. Try "
+            "`example.com`."
+        )
 
+    if not isIp:
         try:
-            records = await self.lookup(target, isIp)
-        except OSError, TimeoutError:
-            return self.errorPanel(
-                "Couldn't reach the WHOIS servers — try again in a moment."
+            record = await rdapLookup(target)
+        except NotImplementedError, httpx2.HTTPError, TimeoutError:
+            # no rdap server for this tld (.de and friends), so port 43
+            # it is
+            record = None
+        if record and (pages := rdapPages(record)):
+            return Report(
+                title=str(record.get("domain_name") or target).lower(),
+                source="RDAP",
+                pages=pages,
+                complaintForm=isGeneric(target),
             )
 
-        if len(records) < 2:
-            return self.errorPanel(
-                f"No WHOIS server published a record for `{target}`."
-            )
+    try:
+        records = await portLookup(target, isIp)
+    except OSError, TimeoutError:
+        raise WhoisError(
+            "Couldn't reach the WHOIS servers — try again in a moment."
+        ) from None
+
+    if len(records) < 2:
+        raise WhoisError(
+            f"No WHOIS server published a record for `{target}`."
+        )
 
-        fields = self.mergeRecords(records)
-        body = records[-1][1].lower()
-        fieldSet = networkFields if isIp else domainFields
-        values: list[components.Field] = [
-            (name, (formatDate(value) if isDate else value)[:1024])
-            for name, keys, isDate in fieldSet
-            if (value := firstValue(fields, keys))
-        ]
+    server, text = records[-1]
+    fields = mergeRecords(records)
+    overview = pickFields(fields, networkFields if isIp else domainFields)
+    contacts = pickFields(
+        fields, networkContactFields if isIp else domainContactFields
+    )
+    raw = scrubRecord(text)
 
-        if not values and any(
-            marker in body for marker in notFoundMarkers
-        ):
-            return self.errorPanel(
-                f"No WHOIS record found for `{target}`."
-            )
+    if not overview and any(
+        marker in text.lower() for marker in notFoundMarkers
+    ):
+        raise WhoisError(f"No WHOIS record found for `{target}`.")
+    if not raw:
+        raise WhoisError("The WHOIS server returned nothing useful.")
+
+    return Report(
+        title=target,
+        source=f"WHOIS · {server}",
+        pages=buildPages(
+            overview,
+            statusesFrom(fields),
+            [] if isIp else nameServersFrom(fields),
+            contacts,
+            raw,
+        ),
+        complaintForm=not isIp and isGeneric(target),
+    )
+
+
+async def getReport(target: str) -> Report:
+    hit = _reports.get(target)
+    if hit and time.monotonic() - hit[0] < cacheTtl:
+        return hit[1]
+    report = await buildReport(target)
+    if len(_reports) >= maxCached:
+        _reports.clear()
+    _reports[target] = (time.monotonic(), report)
+    return report
 
-        statuses = formatStatuses(fields)
-        if statuses:
-            values.append(("Status", statuses[:1024]))
-
-        nameServers = formatNameServers(fields)
-        if nameServers and not isIp:
-            values.append(("Name Servers", nameServers))
-
-        if not values:
-            snippet = records[-1][1].strip()[:1000]
-            return components.panel(
-                title=target,
-                body=(
-                    f"```\n{snippet}\n```"
-                    if snippet
-                    else ":x: The WHOIS server returned nothing useful."
-                ),
-                thumbnail=thumbnail,
-                footer=f"Powered by WHOIS · {records[-1][0]}",
-            )
 
+def renderReport(
+    target: str, report: Report, pageKey: str = "overview"
+) -> components.Panel:
+    page = next(
+        (page for page in report.pages if page.key == pageKey),
+        report.pages[0],
+    )
+    customId = f"{PAGE_PREFIX}{target}"
+    # custom ids cap at 100 characters, so a very long name just gets
+    # its first page without the menu
+    menu = (
+        components.pagePicker(
+            customId,
+            [(p.key, p.label, p.description) for p in report.pages],
+            page.key,
+        )
+        if len(report.pages) > 1 and len(customId) <= 100
+        else None
+    )
+    return components.panel(
+        title=f"WHOIS Information for {report.title}"[:256],
+        body=page.body,
+        thumbnail=thumbnail,
+        menu=menu,
+        buttons=[
+            components.linkButton("Report inaccurate data", complaintForm)
+        ]
+        if report.complaintForm
+        else None,
+        footer=f"{page.label} · Powered by {report.source}",
+    )
+
+
+async def whoisPanel(
+    query: str, pageKey: str = "overview"
+) -> components.Panel:
+    target = normaliseQuery(query)
+    try:
+        report = await getReport(target)
+    except WhoisError as error:
         return components.panel(
-            title=target,
-            fields=values,
+            body=f":x: {error}",
             thumbnail=thumbnail,
-            footer=f"Powered by WHOIS · {records[-1][0]}",
+            color=components.RED,
+        )
+    return renderReport(target, report, pageKey)
+
+
+class WhoisPage(
+    discord.ui.DynamicItem[discord.ui.Select], template=PAGE_TEMPLATE
+):
+    def __init__(self, target: str, customId: str) -> None:
+        self.target = target
+        super().__init__(
+            discord.ui.Select(
+                custom_id=customId,
+                options=[
+                    discord.SelectOption(label="_", value="overview")
+                ],
+            )
+        )
+
+    @classmethod
+    async def from_custom_id(
+        cls,
+        interaction: discord.Interaction,
+        item: discord.ui.Item[Any],
+        match: re.Match[str],
+        /,
+    ) -> WhoisPage:
+        return cls(match["target"], match.string)
+
+    async def callback(self, interaction: discord.Interaction) -> None:
+        await interaction.response.defer()
+        await interaction.edit_original_response(
+            view=await whoisPanel(self.target, self.item.values[0])
         )
 
 
+class Whois(commands.Cog):
+    def __init__(self, bot: commands.Bot) -> None:
+        self.bot = bot
+
+    @app_commands.command(
+        name="whois",
+        description="Look up the WHOIS record for a domain or IP",
+    )
+    @app_commands.describe(
+        query="The domain name or IP address to look up"
+    )
+    @mood.sassy
+    async def whois(
+        self, interaction: discord.Interaction, query: str
+    ) -> None:
+        await interaction.response.defer()
+        await interaction.followup.send(view=await whoisPanel(query))
+
+
 async def setup(bot: commands.Bot) -> None:
+    bot.add_dynamic_items(WhoisPage)
     await bot.add_cog(Whois(bot))
diff --git a/commands/cogs/lookups/wikipedia.py b/commands/cogs/lookups/wikipedia.py
index e32836e..f44bc72 100644
--- a/commands/cogs/lookups/wikipedia.py
+++ b/commands/cogs/lookups/wikipedia.py
@@ -59,7 +59,7 @@ class Wikipedia(commands.Cog):
             img = next(iter(pageImages.values()))
             thumbnail = await img.url
         else:
-            thumbnail = "https://m.doughmination.gay/img/search.png"
+            thumbnail = "https://raw.doughmination.gay/img/search.png"
 
         return components.panel(
             title=wikiPage.title,
diff --git a/commands/cogs/nsfw/horny_gifs.py b/commands/cogs/nsfw/horny_gifs.py
index 47fe8ba..47cc267 100644
--- a/commands/cogs/nsfw/horny_gifs.py
+++ b/commands/cogs/nsfw/horny_gifs.py
@@ -49,7 +49,7 @@ class NsfwGifs(commands.Cog):
             return components.error(f"There's no gif called `{gif}`.")
 
         return components.panel(
-            images=[f"https://m.doughmination.gay/gif/nsfw/{slug}.gif"],
+            images=[f"https://raw.doughmination.gay/gif/nsfw/{slug}.gif"],
             footer="Sandrone",
         )
 
diff --git a/pyproject.toml b/pyproject.toml
index 8a0d07b..859bba5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -12,6 +12,7 @@ dependencies = [
     "argostranslate>=1.11.0",
     "colorful>=0.5.8",
     "discord-py>=2.7.1",
+    "dnspython>=2.9.0",
     "imageio-ffmpeg>=0.6.0",
     "jpcl>=1.1.1",
     "pillow>=11.0.0",
@@ -22,6 +23,7 @@ dependencies = [
     "qrcode[pil]>=8.2",
     "toml>=0.10.2",
     "watchfiles>=1.2.0",
+    "whodap>=0.2.1",
     "wikipedia-api>=0.15.0",
     "yt-dlp>=2026.8.19",
 ]
diff --git a/tests/test_dig.py b/tests/test_dig.py
new file mode 100644
index 0000000..0f4a3ed
--- /dev/null
+++ b/tests/test_dig.py
@@ -0,0 +1,63 @@
+from commands.cogs.lookups import dig
+from discord import ui
+import re
+
+
+def textOf(view: ui.LayoutView) -> str:
+    return "\n".join(
+        item.content
+        for item in view.walk_children()
+        if isinstance(item, ui.TextDisplay)
+    )
+
+
+def selectsOf(view: ui.LayoutView) -> list[ui.Select]:
+    return [
+        item
+        for item in view.walk_children()
+        if isinstance(item, ui.Select)
+    ]
+
+
+def sample() -> dig.DigResult:
+    return dig.DigResult(
+        "example.com",
+        (
+            dig.RecordSet("A", 300, ("93.184.215.14",)),
+            dig.RecordSet("TXT", 60, ('"v=spf1 -all"', '"a```b"')),
+        ),
+    )
+
+
+def test_normalise_name_keeps_subdomains() -> None:
+    assert dig.normaliseName("https://WWW.Example.com:8080/x?y") == (
+        "www.example.com"
+    )
+    assert dig.normaliseName("example.com.") == "example.com"
+
+
+def test_overview_lists_every_type() -> None:
+    view = dig.renderResult("example.com", sample())
+    text = textOf(view)
+
+    assert "> **A** · 1 record · TTL 300s" in text
+    assert "> **TXT** · 2 records · TTL 60s" in text
+    assert "All Records ·" in text
+
+
+def test_record_page_shows_one_type_and_defuses_backticks() -> None:
+    view = dig.renderResult("example.com", sample(), "TXT")
+    text = textOf(view)
+
+    assert "93.184.215.14" not in text
+    assert "a```b" not in text
+    selects = selectsOf(view)
+    match = re.fullmatch(dig.PAGE_TEMPLATE, selects[0].custom_id)
+    assert match and match["target"] == "example.com"
+    assert [o.value for o in selects[0].options if o.default] == ["TXT"]
+
+
+def test_unknown_page_falls_back_to_overview() -> None:
+    view = dig.renderResult("example.com", sample(), "MX")
+    text = textOf(view)
+    assert "All Records ·" in text
diff --git a/tests/test_whois.py b/tests/test_whois.py
new file mode 100644
index 0000000..21d84a1
--- /dev/null
+++ b/tests/test_whois.py
@@ -0,0 +1,139 @@
+from commands.cogs.lookups import whois
+import datetime as dt
+from discord import ui
+import re
+
+
+def selectsOf(view: ui.LayoutView) -> list[ui.Select]:
+    return [
+        item
+        for item in view.walk_children()
+        if isinstance(item, ui.Select)
+    ]
+
+
+def test_normalise_query_strips_url_noise() -> None:
+    assert (
+        whois.normaliseQuery("https://www.Example.com:443/path?q=1")
+        == "example.com"
+    )
+    assert whois.normaliseQuery("[email protected]") == "example.org"
+
+
+def test_rdap_candidates_go_longest_first_and_stay_bounded() -> None:
+    assert whois.rdapCandidates("www.example.co.uk") == [
+        ("www.example.co", "uk"),
+        ("example.co", "uk"),
+        ("co", "uk"),
+    ]
+    assert len(whois.rdapCandidates("a.b.c.d.e.f.example.com")) == (
+        whois.maxRdapLookups
+    )
+    assert whois.rdapCandidates("localhost") == []
+
+
+def test_redacted_values_count_as_placeholders() -> None:
+    assert whois.isPlaceholder("REDACTED FOR PRIVACY")
+    assert whois.isPlaceholder("Data Protected")
+    assert not whois.isPlaceholder("Markmonitor Inc.")
+
+
+def test_first_value_skips_redacted_entries() -> None:
+    fields = {"registrant organization": ["REDACTED", "Example Ltd"]}
+    assert (
+        whois.firstValue(fields, ("registrant organization",))
+        == "Example Ltd"
+    )
+
+
+def test_epp_codes_from_rdap_and_port_43_agree() -> None:
+    assert whois.eppCode("client transfer prohibited") == (
+        "clientTransferProhibited"
+    )
+    assert whois.eppCode(
+        "clientTransferProhibited https://icann.org/epp#x"
+    ) == ("clientTransferProhibited")
+    assert "icann.org/epp#ok" in whois.formatStatus("ok")
+    assert whois.formatStatus("connect") == "`connect`"
+
+
+def test_rdap_pages_never_leak_personal_contacts() -> None:
+    record = {
+        "domain_name": "example.gay",
+        "registrar_name": "NAMECHEAP INC",
+        "registrar_phone": "tel:+1.6613102107",
+        "registrant_name": "Some Person",
+        "registrant_email": "[email protected]",
+        "registrant_address": "1 Home Street",
+        "registrant_phone": "tel:+44.0000000000",
+        "technical_email": "[email protected]",
+        "abuse_email": "[email protected]",
+        "created_date": dt.datetime(2026, 3, 15, tzinfo=dt.UTC),
+        "status": ["client transfer prohibited"],
+        "nameservers": ["NS1.EXAMPLE.COM."],
+    }
+
+    pages = {page.key: page for page in whois.rdapPages(record)}
+    rendered = "\n".join(page.body for page in pages.values())
+
+    assert list(pages) == ["overview", "status", "nameservers", "contacts"]
+    assert "> **Registrar**: NAMECHEAP INC" in pages["overview"].body
+    assert ":R>" in pages["overview"].body
+    assert "`ns1.example.com`" in pages["nameservers"].body
+    assert "+1.6613102107" in pages["contacts"].body
+    for leaked in ("Some Person", "[email protected]", "Home Street"):
+        assert leaked not in rendered
+
+
+def test_rdap_pages_drop_redacted_registrant() -> None:
+    record = {"registrant_organization": "REDACTED FOR PRIVACY"}
+    assert whois.rdapPages(record) == ()
+
+
+def test_scrub_record_hides_people_but_keeps_registry_facts() -> None:
+    lines = [
+        "Domain Name: example.gay",
+        "Registrar: NAMECHEAP INC",
+        "Registrant Name: Some Person",
+        "Registrant Organization: Example Ltd",
+        "Registrant Street: 1 Home Street",
+        "Registrant Country: GB",
+        "Admin Email: [email protected]",
+        "Tech Phone: +44.0000000000",
+        "Registrar Abuse Contact Email: [email protected]",
+        "address:        1 Home Street",
+        "e-mail:         [email protected]",
+    ]
+    raw = "\n".join(lines)
+
+    scrubbed = whois.scrubRecord(raw)
+
+    for leaked in ("Some Person", "Home Street", "[email protected]"):
+        assert leaked not in scrubbed
+    assert "Registrant Name: [hidden]" in scrubbed
+    assert "Registrant Organization: Example Ltd" in scrubbed
+    assert "Registrant Country: GB" in scrubbed
+    assert "[email protected]" in scrubbed
+
+
+def test_report_menu_round_trips_through_its_custom_id() -> None:
+    page = whois.Page("overview", "Overview", None, "> hi")
+    other = whois.Page("raw", "Raw Record", None, "```\nx\n```")
+    report = whois.Report("example.com", "RDAP", (page, other))
+
+    view = whois.renderReport("example.com", report, "raw")
+    selects = selectsOf(view)
+
+    assert len(selects) == 1
+    match = re.fullmatch(whois.PAGE_TEMPLATE, selects[0].custom_id)
+    assert match and match["target"] == "example.com"
+    assert [o.default for o in selects[0].options] == [False, True]
+
+
+def test_single_page_reports_have_no_menu() -> None:
+    page = whois.Page("overview", "Overview", None, "> hi")
+    report = whois.Report("example.com", "RDAP", (page,))
+
+    view = whois.renderReport("example.com", report)
+
+    assert not selectsOf(view)
diff --git a/utils/components.py b/utils/components.py
index 525d294..7a4feb2 100644
--- a/utils/components.py
+++ b/utils/components.py
@@ -9,6 +9,8 @@ RED = discord.Color.red()
 
 type Field = tuple[str, str]
 type Media = str | discord.MediaGalleryItem
+# key, label, description
+type PageOption = tuple[str, str, str | None]
 
 
 def image(
@@ -39,6 +41,27 @@ def linkButton(
     )
 
 
+def pagePicker(
+    customId: str,
+    pages: list[PageOption],
+    current: str,
+    placeholder: str = "Jump to a section…",
+) -> ui.Select:
+    return ui.Select(
+        custom_id=customId,
+        placeholder=placeholder,
+        options=[
+            discord.SelectOption(
+                label=label[:100],
+                value=key,
+                description=description[:100] if description else None,
+                default=key == current,
+            )
+            for key, label, description in pages[:25]
+        ],
+    )
+
+
 def container(
     *,
     title: str | None = None,
@@ -48,6 +71,7 @@ def container(
     thumbnail: str | None = None,
     images: Sequence[Media] | None = None,
     files: list[str] | None = None,
+    menu: ui.Select | None = None,
     buttons: list[ui.Button] | None = None,
     footer: str | None = None,
     color: discord.Color | int | None = FUCHSIA,
@@ -89,6 +113,9 @@ def container(
     for ref in files or []:
         blocks.append(ui.File(ref))
 
+    if menu:
+        blocks.append(ui.ActionRow(menu))
+
     if buttons:
         row = ui.ActionRow()
         for btn in buttons:
@@ -114,6 +141,7 @@ def panel(
     thumbnail: str | None = None,
     images: Sequence[Media] | None = None,
     files: list[str] | None = None,
+    menu: ui.Select | None = None,
     buttons: list[ui.Button] | None = None,
     footer: str | None = None,
     color: discord.Color | int | None = FUCHSIA,
@@ -127,6 +155,7 @@ def panel(
             thumbnail=thumbnail,
             images=images,
             files=files,
+            menu=menu,
             buttons=buttons,
             footer=footer,
             color=color,
diff --git a/uv.lock b/uv.lock
index c72b978..ace5a58 100644
--- a/uv.lock
+++ b/uv.lock
@@ -1,5 +1,5 @@
 version = 1
-revision = 3
+revision = 5
 requires-python = ">=3.14"
 
 [[package]]
@@ -654,6 +654,15 @@ wheels = [
     { url = "https://files.pythonhosted.org/packages/f7/a7/17208c3b3f92319e7fad259f1c6d5a5baf8fd0654c54846ced329f83c3eb/discord_py-2.7.1-py3-none-any.whl", hash = "sha256:849dca2c63b171146f3a7f3f8acc04248098e9e6203412ce3cf2745f284f7439", size = 1227550, upload-time = "2026-03-03T18:40:44.492Z" },
 ]
 
+[[package]]
+name = "dnspython"
+version = "2.9.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/ef/4a/50822184bd67cc6493f0fb6a880749158fcd31ab3fa07409acfd91f9fc85/dnspython-2.9.0.tar.gz", hash = "sha256:b44dc6b18f07a8b1c56676a19fbfdb5209415b046a9cece286baafa87ff3f7f1", size = 423560, upload-time = "2026-10-09T00:07:24.352Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/10/02/cdcc9b7c051786a103c3b09e1003a82fa0c66bcb91ffbdabcfbf7b4163b9/dnspython-2.9.0-py3-none-any.whl", hash = "sha256:9a4aedb833c3c1b49214d04d44d3032ab7a9135f7c1d29a549b4ff78fd82fda9", size = 354822, upload-time = "2026-10-09T00:07:22.622Z" },
+]
+
 [[package]]
 name = "emoji"
 version = "2.15.0"
@@ -752,6 +761,19 @@ wheels = [
     { url = "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", size = 78784, upload-time = "2025-04-24T22:06:20.566Z" },
 ]
 
+[[package]]
+name = "httpcore2"
+version = "2.16.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "h11" },
+    { name = "truststore" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/c0/61/afa9d6b7452f9eca73f73d45324eb0bb52f098fd5e6049bf6b8263be9b4e/httpcore2-2.16.0.tar.gz", hash = "sha256:c72cd0413563b17e1cd8354677dff887466f8ec2551679759e93126534428643", size = 69886, upload-time = "2026-10-21T07:09:45.31Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/af/c2/ce417c397afa5181f0e3c6ff01a4d01639414e1adef08730d97571297151/httpcore2-2.16.0-py3-none-any.whl", hash = "sha256:5c4358319f2602d984ad93182c9fee5160f22e9da7babdda870a5e7c4e2dc34f", size = 85070, upload-time = "2026-10-21T07:09:42.802Z" },
+]
+
 [[package]]
 name = "httpx"
 version = "0.28.1"
@@ -767,6 +789,31 @@ wheels = [
     { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517, upload-time = "2024-12-06T15:37:21.509Z" },
 ]
 
+[[package]]
+name = "httpx2"
+version = "2.16.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "anyio", marker = "sys_platform != 'emscripten'" },
+    { name = "httpcore2", marker = "sys_platform != 'emscripten'" },
+    { name = "httpx2-jsfetch", marker = "sys_platform == 'emscripten'" },
+    { name = "idna" },
+    { name = "truststore", marker = "sys_platform != 'emscripten'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/43/73/5ca2cedf5e4e50423d1c258877865a6b62793633b561c58499f8aeb33b7e/httpx2-2.16.0.tar.gz", hash = "sha256:0d54c98128e8f2ff7fbbde0fca8c359e5f032edeaaaac443cdb7f31f685bcd7f", size = 103116, upload-time = "2026-10-21T07:09:46.348Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/7b/3d/2e4bc4fd1ef9770871669adb348d612a6e4786b303a23f9935b81c48dd60/httpx2-2.16.0-py3-none-any.whl", hash = "sha256:fd2c5d7909e8d86fe92d53020c310ca0e4e431b838c207c5754b9bbf0308d49a", size = 97880, upload-time = "2026-10-21T07:09:44.01Z" },
+]
+
+[[package]]
+name = "httpx2-jsfetch"
+version = "1.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/cd/c4/0e5636363151a2a1795e0a77617168b9ca438e1748ec05fc9b5687f93d64/httpx2_jsfetch-1.0.tar.gz", hash = "sha256:70a0e3eabfef7cce5ad9c629f7d01ca05e418f586646f4ddf14782e4c1454c60", size = 6872, upload-time = "2026-08-07T00:13:07.492Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/9b/43/832f631d32e4f1211caa2ba368317739fe71f0b8530e4c9d15dc454bac2a/httpx2_jsfetch-1.0-py3-none-any.whl", hash = "sha256:cb916b707601e69a07721aabc8f3f6659be3a6893bc1ff5c6f9e02241df2da32", size = 6382, upload-time = "2026-08-07T00:13:06.567Z" },
+]
+
 [[package]]
 name = "idna"
 version = "3.19"
@@ -1765,6 +1812,7 @@ dependencies = [
     { name = "argostranslate" },
     { name = "colorful" },
     { name = "discord-py" },
+    { name = "dnspython" },
     { name = "imageio-ffmpeg" },
     { name = "jpcl" },
     { name = "pillow" },
@@ -1775,6 +1823,7 @@ dependencies = [
     { name = "qrcode", extra = ["pil"] },
     { name = "toml" },
     { name = "watchfiles" },
+    { name = "whodap" },
     { name = "wikipedia-api" },
     { name = "yt-dlp" },
 ]
@@ -1792,6 +1841,7 @@ requires-dist = [
     { name = "argostranslate", specifier = ">=1.11.0" },
     { name = "colorful", specifier = ">=0.5.8" },
     { name = "discord-py", specifier = ">=2.7.1" },
+    { name = "dnspython", specifier = ">=2.9.0" },
     { name = "imageio-ffmpeg", specifier = ">=0.6.0" },
     { name = "jpcl", specifier = ">=1.1.1" },
     { name = "pillow", specifier = ">=11.0.0" },
@@ -1802,6 +1852,7 @@ requires-dist = [
     { name = "qrcode", extras = ["pil"], specifier = ">=8.2" },
     { name = "toml", specifier = ">=0.10.2" },
     { name = "watchfiles", specifier = ">=1.2.0" },
+    { name = "whodap", specifier = ">=0.2.1" },
     { name = "wikipedia-api", specifier = ">=0.15.0" },
     { name = "yt-dlp", specifier = ">=2026.8.19" },
 ]
@@ -2080,6 +2131,15 @@ wheels = [
     { url = "https://files.pythonhosted.org/packages/f0/ac/229b7d4589d2e5937310e72c6d46e89599d16a4a12b479ffa1499fee8eb8/triton-3.7.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:10ba85fa2cca4a2fbdeb36bf1cb082f2c252bda55bf9fccd74f65ec5bc647e68", size = 197824404, upload-time = "2026-06-17T19:53:42.772Z" },
 ]
 
+[[package]]
+name = "truststore"
+version = "0.10.5"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/ee/9f/c5201d42a484c061e528825fc8e2d565f5abd50a4ced6fb7d29c4ec99b2b/truststore-0.10.5.tar.gz", hash = "sha256:30d36967ccaded5cbb38d602c433f53600036c79d502f4533a49b60a03bbefcd", size = 28091, upload-time = "2026-10-12T22:27:31.808Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/51/e9/3a7820be2bb0fe53b6bc9c3be26d3d1158004e4c3ab953aa6840b955b1e9/truststore-0.10.5-py3-none-any.whl", hash = "sha256:9aaaedaefaf06d8b206278cf8b5012bc897f485a874503501e12d776df78951c", size = 19017, upload-time = "2026-10-12T22:27:30.377Z" },
+]
+
 [[package]]
 name = "ty"
 version = "0.0.86"
@@ -2221,6 +2281,18 @@ wheels = [
     { url = "https://files.pythonhosted.org/packages/0a/07/57ebf7a6798b016c064bd0ca81b4c6a99daa4dc377b898bc7b41eb6b5af0/weasel-1.0.0-py3-none-any.whl", hash = "sha256:89518acee027f49d743126c3502d35e6dd14f5768be5c37c9af47c171b6005cc", size = 50713, upload-time = "2026-03-20T08:10:23.637Z" },
 ]
 
+[[package]]
+name = "whodap"
+version = "0.2.1"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "httpx2" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/6f/2c/21024e9a0d03a95a9cd2e1888328c9868df5b275cf3b773a2327759ae80d/whodap-0.2.1.tar.gz", hash = "sha256:80e7fe5e1ded6c9175cf160ba5366a579ef9bd7d4251a59c904a20b519064d06", size = 24986, upload-time = "2026-10-01T15:27:10.873Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/ea/e3/b45e17637cc982d306cc6887451b3359debea2d76bbf0babc468b1c35e06/whodap-0.2.1-py3-none-any.whl", hash = "sha256:b9eba2c007603b5061037059fab149931988b89fff3bcacc1525af7eb373482a", size = 18124, upload-time = "2026-10-01T15:27:10.033Z" },
+]
+
 [[package]]
 name = "wikipedia-api"
 version = "0.16.0"
diff --git a/web/assets/stylesheets/style.css b/web/assets/stylesheets/style.css
index 188f1ca..c228fce 100644
--- a/web/assets/stylesheets/style.css
+++ b/web/assets/stylesheets/style.css
@@ -56,7 +56,7 @@ body {
   margin: 0;
   font-size: 1rem;
   line-height: 1.6;
-  cursor: url("https://m.doughmination.gay/cursors/sandrone/Normal.png") 0 0, default;
+  cursor: url("https://raw.doughmination.gay/cursors/sandrone/Normal.png") 0 0, default;
 }
 
 a,
@@ -64,7 +64,7 @@ button,
 .button,
 [role="button"],
 label[for] {
-  cursor: url("https://m.doughmination.gay/cursors/sandrone/Link.png") 4 0, pointer;
+  cursor: url("https://raw.doughmination.gay/cursors/sandrone/Link.png") 4 0, pointer;
 }
 
 .wrap {
diff --git a/web/index.html b/web/index.html
index 74d8baf..d1aac96 100644
--- a/web/index.html
+++ b/web/index.html
@@ -225,6 +225,8 @@
             <dd>The lead section, with a thumbnail.</dd>
             <dt><code>/whois</code></dt>
             <dd>Domains and IPs, resolved to the registrar.</dd>
+            <dt><code>/dig</code></dt>
+            <dd>DNS records by type, from public resolvers.</dd>
           </dl>
         </div>
 
@@ -302,8 +304,8 @@
       <p class="section-lede">Sandrone only ever uses three sets of links of its own:</p>
       <ul class="domains">
         <li><code>discord.com</code> <code>discord.gg</code><span>Discord’s own — the invite and the support server.</span></li>
-        <li><code>sandrone.is-a.bot</code><span>The short link. It redirects to the docs.</span></li>
-        <li><code>sandrone.doughmination.gay</code><span>Where <code>/yt-dlp</code> serves an oversized download.</span></li>
+        <li><code>sandrone.is-a.bot</code><span>The short link. It redirects here, to <code>sandrone.doughmination.gay</code>.</span></li>
+        <li><code>sandrone.doughmination.gay</code><span>This site, and where <code>/yt-dlp</code> serves an oversized download.</span></li>
       </ul>
 
       <p class="warn">
diff --git a/web/privacy.html b/web/privacy.html
index 38f8f10..63e57be 100644
--- a/web/privacy.html
+++ b/web/privacy.html
@@ -201,12 +201,13 @@
         <li><strong>Pluralpedia</strong> and <strong>morethanone.info</strong>, which are linked by <code>/snippet</code>'s plurality explainer.</li>
         <li><strong>girlcockx.com</strong>, which receives the post URL you give <code>/tweet</code>, to build the embed.</li>
         <li><strong>Bluesky's public API</strong>, which receives the handle and post ID you give <code>/bluesky</code>. The resulting embed links to <strong>xsky.app</strong>.</li>
-        <li><strong>WHOIS servers</strong>, which receive the domain or IP you give <code>/whois</code>. The lookup starts at IANA and follows referrals to the registry and registrar for that name, so more than one operator sees the query. It never carries anything about you &mdash; WHOIS has no facility for it.</li>
+        <li><strong>RDAP and WHOIS servers</strong>, which receive the domain or IP you give <code>/whois</code>. Domains are looked up over RDAP first, starting from IANA's list of registry servers, and fall back to WHOIS, which starts at IANA and follows referrals to the registry and registrar for that name &mdash; so more than one operator sees the query. It never carries anything about you, since neither protocol has a facility for it. Sandrone also leaves personal contact details out of what it posts, even when a registry hands them over.</li>
+        <li><strong>Cloudflare (1.1.1.1)</strong> and <strong>Quad9 (9.9.9.9)</strong>, the public DNS resolvers that receive the domain or IP you give <code>/dig</code>. The query carries the bot server's address, not yours.</li>
         <li><strong>The Doughmination API</strong> (<code>doughmination.uk</code>), which <code>/profile</code> queries with the Discord ID of whoever the command is run on, and which <code>/genshin</code> queries with the Genshin UID you type. That UID is a game account number you supply, not something Sandrone knows about you, and it is not recorded anywhere.</li>
         <li><strong>Enka.Network</strong>, which is where the Doughmination API gets Genshin account data from. Your UID reaches it through that API when you run <code>/genshin</code>; nothing about your Discord account does.</li>
         <li><strong>The Argos Translate package index</strong>, which <code>/translate</code> contacts to list and download language models. The translation itself runs locally on the bot's host &mdash; the text you type is <strong>not</strong> sent to a translation service.</li>
         <li><strong>cataas</strong>, which serves <code>/kitty</code> a random image and receives nothing about you.</li>
-        <li><strong>m.doughmination.gay</strong>, the CDN that serves images and GIFs, which your Discord client fetches the way it fetches any embedded image.</li>
+        <li><strong>raw.doughmination.gay</strong>, the CDN that serves images and GIFs, which your Discord client fetches the way it fetches any embedded image.</li>
       </ul>
       <p class="section-lede">
         One thing worth being explicit about: <code>/stats</code> calls