dns_enumeration
Discover DNS records and subdomains for security research and OSINT investigations. This tool analyzes domain infrastructure to identify potential targets and vulnerabilities.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain name for DNS enumeration |
Implementation Reference
- src/tools/hackertarget.ts:47-55 (handler)The actual implementation of the DNS lookup logic used by the 'dns_enumeration' tool.
async getDnsLookup(domain: string): Promise<string> { try { const response = await fetch(`${this.baseUrl}dnslookup/?q=${domain}`); if (!response.ok) throw new Error("API failed"); return await response.text(); } catch (error) { throw new McpError(ErrorCode.InternalError, `DNS Lookup failed: ${(error as Error).message}`); } } - src/index.ts:229-239 (registration)The registration of the 'dns_enumeration' tool in the MCP server.
// --- DNS Enumeration --- server.tool( "dns_enumeration", { domain: z.string().describe("Domain name for DNS enumeration") }, async ({ domain }) => { const result = await htClient.getDnsLookup(domain); return { content: [{ type: "text", text: result }], }; } );