From 59dd6e59d4b7fc1c6307a79131759c61ae10d1e5 Mon Sep 17 00:00:00 2001 From: devdatt Date: Thu, 1 Jan 2026 03:56:44 +0530 Subject: [PATCH] update --- attempts.json | 0 encoder/firmware.php | 2 +- encoder/login.php | 434 ++++++++++++++++++++++++++++++++++++++++ html/certification.html | 181 +++++++++++++++++ html/index.html | 1 + setup.sh | 4 + users.json | 5 + 7 files changed, 626 insertions(+), 1 deletion(-) create mode 100644 attempts.json create mode 100644 encoder/login.php create mode 100644 html/certification.html create mode 100644 setup.sh create mode 100644 users.json diff --git a/attempts.json b/attempts.json new file mode 100644 index 0000000..e69de29 diff --git a/encoder/firmware.php b/encoder/firmware.php index 073e36b..0337731 100755 --- a/encoder/firmware.php +++ b/encoder/firmware.php @@ -2,7 +2,7 @@ include 'header.php'; exec("sudo chmod 444 /sys/class/dmi/id/product_uuid"); -$version = 1; +$version = 3; function fail(string $msg): never { diff --git a/encoder/login.php b/encoder/login.php new file mode 100644 index 0000000..513da46 --- /dev/null +++ b/encoder/login.php @@ -0,0 +1,434 @@ += $MAX_ATTEMPTS && + time() - $attempts[$ip]['last'] < $LOCK_TIME + ) { + http_response_code(429); + die("Too many attempts. Try again later."); + } +} + +/* ---------- LOGIN ---------- */ +$error = ''; + +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + + if (!hash_equals($_SESSION['csrf'], $_POST['csrf'] ?? '')) { + http_response_code(400); + die('Invalid request'); + } + + $username = trim($_POST['username'] ?? ''); + $password = $_POST['password'] ?? ''; + if (empty($_POST['agree'])) { + + $error = 'You must agree to the Privacy Policy and Terms & Conditions.'; + echo ''; + } + $users = load_json($usersFile); + + $valid = isset($users[$username]) && + password_verify($password, $users[$username]['password']); + + if ($valid) { + session_regenerate_id(true); + unset($attempts[$ip]); + save_json($attemptsFile, $attempts); + $_SESSION['user'] = $username; + header('Location: dashboard.php'); + exit; + } + + // Failed login + $attempts[$ip]['count'] = ($attempts[$ip]['count'] ?? 0) + 1; + $attempts[$ip]['last'] = time(); + save_json($attemptsFile, $attempts); + + $error = 'Invalid username or password'; +} +?> + + + + + + + URMIC powred by Shreebhattji + + + + + +
+ +
+
+ +

Welcome

+ + +

+ + +
+ + +
+ + + + + +
+
+ +
+ Forgot password? +
+ + +
+
+ + + + + \ No newline at end of file diff --git a/html/certification.html b/html/certification.html new file mode 100644 index 0000000..53f5827 --- /dev/null +++ b/html/certification.html @@ -0,0 +1,181 @@ + + + + + + Self Certification + + + + + + + + + +
+ + +
+ +
+

Self Certification Declaration

+ +

+ This document serves as a formal self-certification confirming compliance with all applicable + legal, security, and operational requirements related to the provided software, firmware, + service, or system. +

+ +
Compliance & Safety Declaration
+

+ I hereby declare and guarantee that the delivered software or system contains no malware, + spyware, backdoors, or harmful components of any kind. The system does not perform unauthorized + surveillance, user behavior tracking, or data collection beyond what is strictly required for + its intended operation. +

+ +
Privacy Assurance
+

+ No usage tracking, analytics, or hidden monitoring mechanisms are implemented. Any data processed + by the system is handled transparently and solely for functional or security-related purposes. +

+ +
License Verification Notice
+

+ For licensing and authenticity verification purposes, limited hardware-related identifiers may + be securely stored. This information is used exclusively for license validation and protection + against unauthorized use, duplication, or redistribution. +

+ +
Limitation of Liability
+

+ The developer, author, or distributor shall not be held liable for any direct, indirect, + incidental, special, consequential, or punitive damages, including but not limited to loss + of data, system failure, business interruption, or financial loss, arising from the use, + misuse, or inability to use the software or system. +

+

+ The software or system is provided on an “as-is” and “as-available” basis, without warranties + of any kind, whether express or implied. The user assumes full responsibility for deployment, + configuration, operation, and compliance with applicable laws and regulations. +

+ +
Declaration
+

+ I confirm that the above statements are true and accurate to the best of my knowledge and accept + full responsibility for compliance with this declaration. +

+ +
+
+ Devdatt Bhatt aka ShreeBhattji
Bhavnagar +
Authorized Signature
+
+
+
01 Jan , 2026 +
Date
+
+
+
+ + + + \ No newline at end of file diff --git a/html/index.html b/html/index.html index e6aa66e..88e33ed 100644 --- a/html/index.html +++ b/html/index.html @@ -268,6 +268,7 @@ What's app Email Call Us + Certificate