Skip to main content
Glama

get_payloads

Retrieve compatible payloads for a specific Metasploit exploit to enable effective penetration testing and security assessment workflows.

Instructions

List available payloads for a specific exploit

Input Schema

NameRequiredDescriptionDefault
exploitPathYesFull exploit path

Input Schema (JSON Schema)

{ "properties": { "exploitPath": { "description": "Full exploit path", "type": "string" } }, "required": [ "exploitPath" ], "type": "object" }

Implementation Reference

  • Handler implementation for the 'get_payloads' tool. It takes an exploitPath, runs 'use [exploitPath]' and 'show payloads' in msfconsole, and returns the list of payloads.
    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, }), }, ], }; } }
  • src/index.ts:123-136 (registration)
    Registration of the 'get_payloads' tool in the tools array, including name, description, and input schema definition.
    { name: "get_payloads", description: "List available payloads for a specific exploit", inputSchema: { type: "object", properties: { exploitPath: { type: "string", description: "Full exploit path", }, }, required: ["exploitPath"], }, },
  • Input schema definition for the 'get_payloads' tool, specifying the required 'exploitPath' parameter.
    inputSchema: { type: "object", properties: { exploitPath: { type: "string", description: "Full exploit path", }, }, required: ["exploitPath"], },

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