How growthease/gamesentry works
Project type and purpose
• GameSentry is an open-source, Node.js-based security-testing tool for mobile games.
• It provides a CLI entrypoint (index.js), a modular plugin system under lib/cli, a native “agent” injected into the target game process (lib/component), and a browser-based UI (res/templates + res/static).
• Core use cases: automatic Hooking, protocol extraction (e.g., Protobuf), Lua dumping/decompiling, function tracing, and hot-patching.
File structure
• Top-level:
• index.js – CLI server startup
• lib/cli/… – plugin modules (hook, log, protocol, dump, hotfix, etc.) + utils/constants/helper
• lib/component/… – Frida-agent code (agent API, filtering, tracer, structs definitions)
• lib/cocos/… – engine-specific adapters (cocos-js, cocos-lua)
• res/templates + res/static – HTML/CSS/JS for browser UI
• tools/lua/unluac.jar – external decompiler for Lua bytecode
• Patterns:
• Plugin architecture for extendability (each module under lib/cli/module)
• Client-server IPC between Node.js and in-process Frida agent
• MVC-style separation for UI (templates vs. static assets)
README for additional insights
• Describes supported game engines (unity il2cpp, cocos-js/lua), requirements (rooted device, no APK obfuscation).
• Points to detailed features (doc/Features.md) and usage instructions (doc/InstructionsForUse.md).
• Emphasizes extensibility and attacker-style analysis.
Summary of essential architectural elements
• Don’t over-fragment: group related modules under logical subsystems (Modules, Agent, UI).
• Communication flows (Frida IPC, HTTP).
• Engine adapters (lib/cocos) and extensibility points (module folder).
• Technology labels (Node.js, Frida, Lua, HTTP).