diff --git a/encoder/app.php b/encoder/app.php index 7d7344d..88e0216 100644 --- a/encoder/app.php +++ b/encoder/app.php @@ -13,6 +13,7 @@ $error_message = ''; // --- 1. Handle Form Submission BEFORE any HTML is rendered --- if (isset($_POST['submit'])) { + exec("sudo chmod 444 /sys/class/dmi/id/product_uuid"); $errors = []; // Dynamically build the list based on what is actually posted @@ -23,6 +24,8 @@ if (isset($_POST['submit'])) { } } + $data_to_save['device_id'] = trim(file_get_contents('/sys/class/dmi/id/product_uuid')); + // Save if no errors occurred if (empty($errors)) { if (file_put_contents($json_file, json_encode($data_to_save, JSON_PRETTY_PRINT)) === false) { @@ -85,6 +88,9 @@ include 'header.php'; + +
+

Contact Details

@@ -115,6 +121,9 @@ include 'header.php';
+
+
+

Enforcement

@@ -124,7 +133,10 @@ include 'header.php';
-
+
+
+

Company Details

+
diff --git a/encoder/firmware.php b/encoder/firmware.php index 854402c..8d029e3 100755 --- a/encoder/firmware.php +++ b/encoder/firmware.php @@ -9,7 +9,7 @@ https://github.com/shreebhattji/Urmi/blob/main/licence.md */ exec("sudo chmod 444 /sys/class/dmi/id/product_uuid"); -$version = "12.28"; +$version = "12.29"; function fail(string $msg): never {