Skip to main content
Glama

use_module

Execute penetration testing modules with proper configuration, handling credentials and options to automate security assessments in Active Directory environments.

Instructions

Call this to use the module with the right options and make sure to satisfy the need of certain variables like credentials etc.If no credentials are needed for the module or no valid credentials are found leave the username and password default (empty). Options syntax is ["option1=value1","options2=value2",...]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ipsYes
protYes
moduleYes
optionsYes
usernameYes
passwordYes
kerberosNo
ntlmNo

Implementation Reference

  • Registration of the 'use_module' tool using the @mcp.tool decorator.
    @mcp.tool(name='use_module',description='Call this to use the module with the right options and make sure to satisfy the need of certain variables like credentials etc.If no credentials are needed for the module or no valid credentials are found leave the username and password default (empty). Options syntax is ["option1=value1","options2=value2",...]')
  • The handler function implements the tool logic by constructing and executing a netexec command based on the provided protocol, module, options, and credentials.
    def use_module(ips:List[str],prot:str,module:str,options:List[str],username:str,password:str,kerberos:bool=False,ntlm:bool=False): if (ntlm): return run_command(["netexec",prot]+ips+["-u",username,"-H",password,"-M",module,"-o"]+options) elif(kerberos): return run_command(["netexec",prot]+ips+["-u",username,"-p",password,'-k',"-M",module,"-o"]+options) else: return run_command(["netexec",prot]+ips+["-u",username,"-p",password,"-M",module,"-o"]+options)

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/YoussefSahnoun/PentestMCP'

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