ImHex is a cross-platform hex editor and binary analysis tool designed for reverse engineers, programmers, and digital forensics. It provides a rich GUI built on Dear ImGui and GLFW, with a modular plugin architecture that allows extending functionality through dynamically loaded plugins. The core library (libimhex) implements a provider abstraction for various data sources (files, disks, process memory, GDB, SSH, UDP, etc.), an event-driven communication system, a content registry for registering views, tools, settings, and data inspectors, and a pattern language engine for declarative binary parsing. The application includes built-in plugins for hex editing, data inspection, disassembly (Capstone), diffing, YARA rule matching, hashing, decompression, visualizations (3D, plots, images), scripting (C and .NET), and a Model Context Protocol (MCP) server for AI-assisted analysis. It supports undo/redo, bookmarks, patches, projects, themes, layouts, achievements, tutorials, and a command palette. The codebase is well-structured with clear separation between core library, plugins, and platform-specific code, though some components are tightly coupled to ImGui internals and the custom pattern language.
OPNsense core is the central management and control plane for the OPNsense open-source firewall distribution. It implements a complete MVC web application (PHP) that provides a graphical user interface and RESTful API for configuring firewall rules, VPNs (IPsec, OpenVPN, WireGuard), DNS/DHCP services, traffic shaping, intrusion detection, captive portal, system settings, and monitoring. The backend relies on a custom daemon (`configd`) that executes actions via Unix socket, running Python and shell scripts for system-level operations (e.g., pfctl, ipfw, swanctl, wg). Configuration is stored in XML files and managed through an extensive model layer with field types, validators, and migrations. The system is deeply integrated with FreeBSD and uses FreeBSD-specific tools and kernel subsystems (pf, carp, netgraph). The architecture is a monolithic PHP MVC framework (originally based on Phalcon, now with a custom dispatcher) with a clear separation: controllers handle HTTP requests, models manage XML-based configuration, and views are Volt templates. The API controllers extend `ApiMutableModelControllerBase` and provide standard CRUD operations plus service actions (start, stop, reconfigure). System scripts are organized under `src/opnsense/scripts/` and are invoked by configd or system hooks. Dashboard widgets (JavaScript) fetch real-time data via API endpoints or event streams. External dependencies include FreeBSD base system tools, PHP (with Phalcon or custom replacement), Python 3, and libraries like ujson, requests. Key entry points are the web UI (`/index.php`), the API (`/api.php`), and the configd daemon (`configd.py`). Data flows primarily from user input through controllers to model validation, then to configd actions that generate configuration files (templates) or execute system commands. The system is actively maintained with frequent commits, extensive unit tests for both PHP and Python components, and a well-structured migration framework for upgrading configurations.