\n"); exit(1); } $root = rtrim($root, "/") . "/"; // Keep in sync with Integrity::is_tampered()'s callers — every file that // implements or directly enforces the license gate. $protected = [ "aurora-admin.php", "admin/src/App/AuroraAdmin.php", "admin/src/Licensing/License.php", "admin/src/Licensing/Integrity.php", "admin/src/Pages/SubApps.php", "admin/src/Analytics/Analytics.php", "admin/src/Rest/AnalyticsData.php", "admin/src/WhiteLabel/WhiteLabel.php", "admin/src/Shell/Shell.php", ]; $manifest = []; foreach ($protected as $relative) { $full = $root . $relative; if (!file_exists($full)) { fwrite(STDERR, "Missing protected file, aborting: {$relative}\n"); exit(1); } $manifest[$relative] = hash_file("sha256", $full); } $out_path = $root . "admin/src/Licensing/integrity-manifest.json"; file_put_contents($out_path, json_encode($manifest, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); echo "Wrote " . count($manifest) . " hashes to {$out_path}\n";