Skip to main content
Glama

search_auxiliary

Find Metasploit auxiliary modules for security testing by searching with queries and filtering by type like scanner or admin.

Instructions

Search for auxiliary modules in Metasploit

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query for auxiliary modules
typeNoOptional: Filter by auxiliary type

Implementation Reference

  • Handler function for the 'search_auxiliary' tool. Extracts query and optional type parameters, constructs Metasploit search command for auxiliary modules, executes it via msfconsole, and returns formatted JSON results or error.
    case "search_auxiliary": { const { query, type } = args as { query: string; type?: string }; const searchQuery = type ? `search type:auxiliary ${type} ${query}` : `search type:auxiliary ${query}`; try { const results = await executeMsfCommand([searchQuery]); return { content: [ { type: "text", text: JSON.stringify( { success: true, query, type: type || null, results, }, null, 2 ), }, ], }; } catch (error: any) { return { content: [ { type: "text", text: JSON.stringify({ success: false, error: error.message, }), }, ], }; } }
  • src/index.ts:90-108 (registration)
    Registration of the 'search_auxiliary' tool in the tools array, including name, description, and input schema definition.
    { name: "search_auxiliary", description: "Search for auxiliary modules in Metasploit", inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query for auxiliary modules", }, type: { type: "string", enum: ["scanner", "admin", "dos", "fuzzers", "gather"], description: "Optional: Filter by auxiliary type", }, }, required: ["query"], }, },
  • Input schema definition for the 'search_auxiliary' tool, specifying query (required) and optional type filter with enum values.
    inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query for auxiliary modules", }, type: { type: "string", enum: ["scanner", "admin", "dos", "fuzzers", "gather"], description: "Optional: Filter by auxiliary type", }, }, required: ["query"], },
  • Helper function used by search_auxiliary handler to execute Metasploit commands via msfconsole.
    async function executeMsfCommand(commands: string[]): Promise<string> { const commandString = commands.join("; "); const fullCommand = `msfconsole -q -x "${commandString}; exit"`; try { const { stdout, stderr } = await execAsync(fullCommand, { timeout: 60000, // 60 second timeout maxBuffer: 10 * 1024 * 1024, // 10MB buffer }); return stdout || stderr; } catch (error: any) { throw new Error(error.message || "Command execution failed"); } }

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/andreransom58-coder/kali-metasploit-mcp'

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