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
| Name | Required | Description | Default |
|---|---|---|---|
| correlation_id | Yes | ||
| method | No | ||
| path_contains | No | ||
| protocol | No | ||
| query_contains | No | ||
| text_contains | No |
Implementation Reference
- src/server.js:357-374 (handler)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, }); },
- src/server.js:348-355 (schema)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, }); }, );
- src/server.js:73-88 (helper)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), }; }