recon.httpx
Identify live hosts and retrieve HTTP status codes for reconnaissance during security testing. Input URLs or files to scan web targets and analyze responses.
Instructions
Run httpx to check which hosts are live and get status codes
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Input file path or comma-separated URLs | |
| statusCode | No | Show status codes | |
| title | No | Extract page titles |
Implementation Reference
- src/tools/recon.ts:60-115 (registration)Full registration of the 'recon.httpx' tool, including description, input schema, and the complete inline handler function that checks for httpx installation, constructs command arguments based on input type (file or URLs), runs the command, parses live hosts from output, stores in working memory, and returns formatted result.server.tool( '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); } } );