How rdxfgxy1/nullhooks-releases works
Project Type and Purpose
• NullHooks is a modular, command-line interface (CLI) application written in Lua (5.3+).
• Its core purpose is secure, cross-platform management of Discord webhooks, featuring encrypted credential storage, activation/licensing via MySQL/MariaDB, retry logic, diagnostics, and logging.
File Structure
• According to the README, the repo should contain:
• data/ – encrypted storage for credentials and backups
• src/ – Lua modules implementing business logic (encryption, networking, CLI UI, activation, logging, scheduling, health checks)
• nullhooks – the main executable shell script or Lua CLI entrypoint
• db_config.json – JSON file holding database connection parameters
• The “releases/” directory holds prebuilt binaries, encrypted assets, version metadata, and checksums – these are outputs, not part of the runtime architecture per se.
Key Architectural Patterns
• Modular Monolith: all functionality lives in a single deployable CLI, but is logically separated into modules/packages under src/.
• Layered Approach:
• Presentation Layer (CLI interface)
• Application/Business Layer (webhook management, encryption, activation, scheduling, diagnostics, logging)
• Data Layer (encrypted file storage + relational DB for activation/licensing)
• Integration Layer (Discord API calls via HTTP, database driver via LuaSQL)
Main Components and Their Interactions
a. CLI Interface (“nullhooks” executable)
• Parses user commands (sendtemp, register, activate, etc.) and invokes corresponding modules.
b. Core Modules (in src/)
• Encryption Module (AES-256 storage/retrieval in data/)
• Activation Module (reads/writes activation records to MySQL/MariaDB via luasql-mysql)
• Network Module (connectivity checks, HTTP calls to Discord webhook endpoints via luasocket)
• Retry/Scheduler Module (manages retries and scheduled deliveries)
• Health Monitoring Module (checks status of endpoints, diagnostics)
c. Data Stores
• Encrypted File Store (data/ folder with AES-256 encrypted blobs and backups)
• Relational Database (MySQL/MariaDB for activation/licensing records)
d. External Services
• Discord Webhook API (HTTPS endpoints)
• Optional: remote license/signature verification service (if activation involves an external license server)
Final Checklist
• [ ] Notes on key technologies (Lua, AES-256, MySQL)