Skip to main content
Glama

get_payloads

Lists available payloads for a specific Metasploit exploit to support authorized security testing and penetration testing workflows.

Instructions

List available payloads for a specific exploit

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exploitPathYesFull exploit path

Implementation Reference

  • The handler function for the 'get_payloads' tool. It takes an exploitPath argument, uses the specified exploit in msfconsole, shows available payloads, and returns the results as JSON.
    case "get_payloads": { const { exploitPath } = args as { exploitPath: string }; try { const payloads = await executeMsfCommand([ `use ${exploitPath}`, `show payloads`, ]); return { content: [ { type: "text", text: JSON.stringify( { success: true, exploitPath, payloads, }, null, 2 ), }, ], }; } catch (error: any) { return { content: [ { type: "text", text: JSON.stringify({ success: false, error: error.message, }), }, ], }; } }
  • The tool definition including name, description, and input schema (JSON Schema) for 'get_payloads'.
    { name: "get_payloads", description: "List available payloads for a specific exploit", inputSchema: { type: "object", properties: { exploitPath: { type: "string", description: "Full exploit path", }, }, required: ["exploitPath"], }, },
  • src/index.ts:219-220 (registration)
    Registration of the tools list handler which exposes the 'get_payloads' tool via the tools array.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools };

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