Skip to main content
Glama
badchars

osint-mcp-server

by badchars

dns_srv_discover

Discover SRV records and service CNAMEs for domains to identify SIP, XMPP, LDAP, Kerberos, CalDAV, CardDAV, Autodiscover, OWA, ADFS, and other services.

Instructions

Discover SRV records and common service CNAMEs for a domain. Probes for SIP, XMPP, Autodiscover, LDAP, Kerberos, CalDAV, CardDAV, and checks CNAMEs for autodiscover, lyncdiscover, OWA, ADFS, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain to probe

Implementation Reference

  • The implementation of the dns_srv_discover logic in src/dns/index.ts.
    export async function dnsSrvDiscover(domain: string): Promise<SrvDiscoverResult> {
      const srvRecords: SrvRecord[] = [];
      const cnameRecords: CnameRecord[] = [];
    
      // SRV probes
      const srvPromises = SRV_PROBES.map(async (prefix) => {
        const fqdn = `${prefix}.${domain}`;
        try {
          const srvs = await dns.resolveSrv(fqdn);
          for (const s of srvs) {
            srvRecords.push({ name: fqdn, target: s.name, port: s.port, priority: s.priority, weight: s.weight });
          }
        } catch {
          // Not found
        }
      });
    
      // CNAME probes
      const cnamePromises = CNAME_PROBES.map(async (prefix) => {
        const fqdn = `${prefix}.${domain}`;
        try {
          const cnames = await dns.resolveCname(fqdn);
          for (const c of cnames) {
            cnameRecords.push({ name: fqdn, target: c });
          }
        } catch {
          // Not found — try A record to see if it exists
          try {
            const ips = await dns.resolve4(fqdn);
            if (ips.length > 0) {
              cnameRecords.push({ name: fqdn, target: ips.join(", ") });
            }
          } catch {
            // Not found
          }
        }
      });
    
      await Promise.all([...srvPromises, ...cnamePromises]);
    
      return { domain, srvRecords, cnameRecords };
    }
  • The tool definition and registration for dns_srv_discover.
    const dnsSrvDiscoverTool: ToolDef = {
      name: "dns_srv_discover",
      description: "Discover SRV records and common service CNAMEs for a domain. Probes for SIP, XMPP, Autodiscover, LDAP, Kerberos, CalDAV, CardDAV, and checks CNAMEs for autodiscover, lyncdiscover, OWA, ADFS, etc.",
      schema: {
        domain: z.string().describe("Domain to probe"),
      },
      execute: async (args) => json(await dnsSrvDiscover(args.domain as string)),
    };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/badchars/osint-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server