Skip to content

dns_resolve

Gate: gated on net, target the hostname being resolved ยท read

Look up DNS records for a host. It sends no payload and reads nothing back into the world, and it is still gated โ€” because the question is the channel: resolving secret-value.attacker.example leaks that value whether or not an answer ever comes back. It shares the net kind with HTTP, so one host decision covers both.

Input

FieldTypeRequiredNotes
hoststringyesThe hostname to resolve (an IP for PTR).
typestringnoRecord type: A, AAAA, IP, MX, TXT, CNAME, NS, PTR, SRV. Default A.

Output

A JSON object naming what was asked and what came back:

{ "host": "example.com", "type": "MX", "records": ["10 mail.example.com."] }

From JavaScript

const mx = nocturn.resolve("example.com", "MX");
console.log(mx.records);

Notes

The record type is a parameter of the question, never part of the gated action โ€” the decision is about the host, so approving example.com does not have to be repeated per record type.