censys_host_details
Retrieve comprehensive host intelligence from Censys for any IP address, including services, certificates, OS details, location, and ASN data to support security analysis and reconnaissance.
Instructions
Get detailed Censys host information for a single IP: all services, certificates, OS, location, ASN. Requires CENSYS_API_ID + CENSYS_API_SECRET.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ip | Yes | IP address to look up |
Implementation Reference
- src/censys/index.ts:101-124 (handler)The implementation of the `censysHostDetails` function which performs the API request to Censys and maps the result.
export async function censysHostDetails(ip: string, auth: CensysAuth): Promise<CensysHost> { const data = await censysFetch("GET", `/hosts/${encodeURIComponent(ip)}`, auth); const h = data.result ?? {}; return { ip: h.ip ?? ip, services: (h.services ?? []).map((s: any) => ({ port: s.port, serviceName: s.service_name ?? s.extended_service_name ?? "", transportProtocol: s.transport_protocol ?? "TCP", certificate: s.tls?.certificates?.leaf_data?.fingerprint, })), location: h.location ? { country: h.location.country, city: h.location.city, province: h.location.province } : undefined, autonomousSystem: h.autonomous_system ? { asn: h.autonomous_system.asn, name: h.autonomous_system.name, bgpPrefix: h.autonomous_system.bgp_prefix } : undefined, lastUpdatedAt: h.last_updated_at, operatingSystem: h.operating_system ? { product: h.operating_system.product, version: h.operating_system.version } : undefined, }; } - src/protocol/tools.ts:290-303 (registration)Registration of the `censys_host_details` tool definition.
const censysHostDetailsTool: ToolDef = { name: "censys_host_details", description: "Get detailed Censys host information for a single IP: all services, certificates, OS, location, ASN. Requires CENSYS_API_ID + CENSYS_API_SECRET.", schema: { ip: z.string().describe("IP address to look up"), }, execute: async (args, ctx) => { const id = requireApiKey(ctx.config.censysApiId, "Censys", "CENSYS_API_ID"); const secret = requireApiKey(ctx.config.censysApiSecret, "Censys", "CENSYS_API_SECRET"); return json(await censysHostDetails(args.ip as string, { id, secret })); }, }; const censysCertificatesTool: ToolDef = {