Skip to main content
Glama

recon.httpx

Identify live hosts and retrieve HTTP status codes for reconnaissance during security testing.

Instructions

Run httpx to check which hosts are live and get status codes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesInput file path or comma-separated URLs
statusCodeNoShow status codes
titleNoExtract page titles

Implementation Reference

  • Executes the httpx binary to probe input hosts/URLs for liveness, constructs command arguments based on options, parses stdout to extract live hosts, stores in Redis working memory, and returns formatted ToolResult.
    async ({ input, statusCode = true, title = false }: any): Promise<ToolResult> => { try { const exists = await checkCommandExists('httpx'); if (!exists) { return formatToolResult( false, null, 'httpx not found. Install from: https://github.com/projectdiscovery/httpx' ); } const args = ['-silent']; if (statusCode) args.push('-status-code'); if (title) args.push('-title'); // Check if input is a file or URLs if (input.includes(',') || input.startsWith('http')) { args.push('-u', input); } else { args.push('-l', input); } const result = await runCommand('httpx', args); const liveHosts = result.stdout .split('\n') .filter((s) => s.trim().length > 0); await setWorkingMemory('recon:live_hosts', liveHosts, 3600); return formatToolResult(true, { liveHosts, count: liveHosts.length, raw: result.stdout, }); } catch (error: any) { return formatToolResult(false, null, error.message); } }
  • Defines the input schema for the recon.httpx tool, including required 'input' parameter and optional flags for statusCode and title.
    { description: 'Run httpx to check which hosts are live and get status codes', inputSchema: { type: 'object', properties: { input: { type: 'string', description: 'Input file path or comma-separated URLs', }, statusCode: { type: 'boolean', description: 'Show status codes', default: true }, title: { type: 'boolean', description: 'Extract page titles', default: false }, }, required: ['input'], }, },
  • Registers the recon.httpx MCP tool on the server within the registerReconTools function.
    'recon.httpx', { description: 'Run httpx to check which hosts are live and get status codes', inputSchema: { type: 'object', properties: { input: { type: 'string', description: 'Input file path or comma-separated URLs', }, statusCode: { type: 'boolean', description: 'Show status codes', default: true }, title: { type: 'boolean', description: 'Extract page titles', default: false }, }, required: ['input'], }, }, async ({ input, statusCode = true, title = false }: any): Promise<ToolResult> => { try { const exists = await checkCommandExists('httpx'); if (!exists) { return formatToolResult( false, null, 'httpx not found. Install from: https://github.com/projectdiscovery/httpx' ); } const args = ['-silent']; if (statusCode) args.push('-status-code'); if (title) args.push('-title'); // Check if input is a file or URLs if (input.includes(',') || input.startsWith('http')) { args.push('-u', input); } else { args.push('-l', input); } const result = await runCommand('httpx', args); const liveHosts = result.stdout .split('\n') .filter((s) => s.trim().length > 0); await setWorkingMemory('recon:live_hosts', liveHosts, 3600); return formatToolResult(true, { liveHosts, count: liveHosts.length, raw: result.stdout, }); } catch (error: any) { return formatToolResult(false, null, error.message); } } );

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/telmon95/VulneraMCP'

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