Skip to main content
Glama

list_modules

Lists all loaded modules (DLLs/shared libraries) with base address, size, and path information for game hacking and reverse engineering analysis.

Instructions

List all loaded modules (DLLs/shared libraries). Returns: List of modules with base address, size, and path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler for the 'list_modules' MCP tool. It checks if attached to a process, injects a Frida script to enumerate modules using Process.enumerateModules(), collects the results via message handler, parses JSON, and returns count and module list (name, base, size, path).
    @mcp.tool() def list_modules() -> Dict[str, Any]: """ List all loaded modules (DLLs/shared libraries). Returns: List of modules with base address, size, and path. """ global _session if not _session.is_attached(): return {"error": "Not attached. Use attach() first."} try: script_code = """ var modules = Process.enumerateModules(); var result = modules.map(function(m) { return {name: m.name, base: m.base.toString(), size: m.size, path: m.path}; }); send(JSON.stringify(result)); """ result_data = [] def on_message(message, data): if message['type'] == 'send': result_data.append(message['payload']) script = _session.session.create_script(script_code) script.on('message', on_message) script.load() script.unload() if not result_data: return {"error": "Failed to enumerate modules"} import json modules = json.loads(result_data[0]) return {"count": len(modules), "modules": modules} except Exception as e: return {"error": f"Failed to list modules: {str(e)}"}

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/0xhackerfren/frida-game-hacking-mcp'

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