Skip to main content
Glama

poll_interactsh_session

Retrieve and decrypt security testing interactions for analysis. Filter captured DNS/HTTP data by method, path, query, protocol, or text content to identify specific callback responses.

Instructions

Retrieves and decrypts interactions for a session. Optional filters let you match HTTP method, path, query, protocol, or free text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
correlation_idYes
methodNo
path_containsNo
protocolNo
query_containsNo
text_containsNo

Implementation Reference

  • Handler function for the poll_interactsh_session tool. Polls the Interactsh service for events using the correlation_id, applies optional filters to the events, and returns a structured result including matched events, totals, and additional data.
    async ({ correlation_id, ...filters }) => { const payload = await service.pollSession(correlation_id); const sanitizedFilters = Object.fromEntries( Object.entries(filters) .filter(([, value]) => value !== undefined && value !== '') .map(([key, value]) => [key, typeof value === 'string' ? value : JSON.stringify(value)]), ); const filteredEvents = applyEventFilters(payload.events, sanitizedFilters); return result({ applied_filters: sanitizedFilters, total_events: payload.events.length, matched_events: filteredEvents.length, events: filteredEvents, extra: payload.extra, tld_data: payload.tld_data, }); },
  • Zod input schema defining the required correlation_id and optional filters for method, path_contains, query_contains, protocol, and text_contains.
    inputSchema: { correlation_id: z.string(), method: z.string().optional(), path_contains: z.string().optional(), query_contains: z.string().optional(), protocol: z.string().optional(), text_contains: z.string().optional(), },
  • src/server.js:342-375 (registration)
    Registration of the poll_interactsh_session tool with McpServer, including name, metadata (title, description, inputSchema), and the handler function.
    server.registerTool( 'poll_interactsh_session', { title: 'Poll session', description: 'Retrieves and decrypts interactions for a session. Optional filters let you match HTTP method, path, query, protocol, or free text.', inputSchema: { correlation_id: z.string(), method: z.string().optional(), path_contains: z.string().optional(), query_contains: z.string().optional(), protocol: z.string().optional(), text_contains: z.string().optional(), }, }, async ({ correlation_id, ...filters }) => { const payload = await service.pollSession(correlation_id); const sanitizedFilters = Object.fromEntries( Object.entries(filters) .filter(([, value]) => value !== undefined && value !== '') .map(([key, value]) => [key, typeof value === 'string' ? value : JSON.stringify(value)]), ); const filteredEvents = applyEventFilters(payload.events, sanitizedFilters); return result({ applied_filters: sanitizedFilters, total_events: payload.events.length, matched_events: filteredEvents.length, events: filteredEvents, extra: payload.extra, tld_data: payload.tld_data, }); }, );
  • Core helper method in InteractshService that performs the actual polling: constructs /poll URL with id and secret, fetches response, decrypts events using private key, and normalizes extra/tld_data.
    async pollSession(correlationId) { const session = this.#requireSession(correlationId); const url = new URL('/poll', this.baseUrl); url.searchParams.set('id', session.correlationId); url.searchParams.set('secret', session.secretKey); const response = await this.#request(url, { method: 'GET' }); const payload = await response.json(); const events = this.#decryptEvents(session.privateKey, payload); return { events, extra: normaliseArray(payload.extra), tld_data: normaliseArray(payload.tlddata), }; }

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/tachote/mcp-interactsh'

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