get_module_info
Retrieve detailed information about a specific game module, including its base address, size, and export count for reverse engineering analysis.
Instructions
Get detailed information about a specific module.
Args:
module_name: Name of the module (e.g., "game.dll")
Returns:
Module details including base, size, exports count.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| module_name | Yes |
Implementation Reference
- The handler function for the 'get_module_info' tool. It uses Frida to find the module by name, enumerates imports and exports count, and returns JSON with module details including name, base address, size, path, and counts.@mcp.tool() def get_module_info(module_name: str) -> Dict[str, Any]: """ Get detailed information about a specific module. Args: module_name: Name of the module (e.g., "game.dll") Returns: Module details including base, size, exports count. """ global _session if not _session.is_attached(): return {"error": "Not attached. Use attach() first."} try: script_code = f""" var module = Process.findModuleByName("{module_name}"); if (module) {{ send(JSON.stringify({{ name: module.name, base: module.base.toString(), size: module.size, path: module.path, imports: module.enumerateImports().length, exports: module.enumerateExports().length }})); }} else {{ send(JSON.stringify({{error: "Module not found"}})); }} """ 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() import json return json.loads(result_data[0]) if result_data else {"error": "No response"} except Exception as e: return {"error": f"Failed to get module info: {str(e)}"}