get_module_exports
List exported functions and variables from a specified module to analyze game code structure for reverse engineering and memory manipulation.
Instructions
List exports from a module.
Args:
module_name: Name of the module
filter_name: Optional filter for export names
Returns:
List of exports with name and address.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| module_name | Yes | ||
| filter_name | No |
Implementation Reference
- The handler function for the 'get_module_exports' tool. It uses Frida to find the module by name, enumerate its exports, filter if specified, and return the list of exports with names, types, and addresses.@mcp.tool() def get_module_exports(module_name: str, filter_name: str = "") -> Dict[str, Any]: """ List exports from a module. Args: module_name: Name of the module filter_name: Optional filter for export names Returns: List of exports with name and address. """ 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) {{ var exports = module.enumerateExports(); send(JSON.stringify(exports.map(function(e) {{ return {{name: e.name, type: e.type, address: e.address.toString()}}; }}))); }} else {{ send(JSON.stringify([])); }} """ 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 exports = json.loads(result_data[0]) if result_data else [] if filter_name: exports = [e for e in exports if filter_name.lower() in e['name'].lower()] return {"module": module_name, "count": len(exports), "exports": exports[:100]} except Exception as e: return {"error": f"Failed to get exports: {str(e)}"}