update
This commit is contained in:
parent
e3b47a09e7
commit
59dd6e59d4
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,434 @@
|
|||
<?php
|
||||
session_start();
|
||||
|
||||
/* ---------- CONFIG ---------- */
|
||||
$usersFile = __DIR__ . '/users.json';
|
||||
$attemptsFile = __DIR__ . '/attempts.json';
|
||||
|
||||
$MAX_ATTEMPTS = 3;
|
||||
$LOCK_TIME = 3600; // 15 minutes
|
||||
|
||||
/* ---------- HELPERS ---------- */
|
||||
function client_ip(): string
|
||||
{
|
||||
return $_SERVER['REMOTE_ADDR'] ?? '0.0.0.0';
|
||||
}
|
||||
|
||||
function load_json($file): array
|
||||
{
|
||||
return is_file($file) ? json_decode(file_get_contents($file), true) ?: [] : [];
|
||||
}
|
||||
|
||||
function save_json($file, $data): void
|
||||
{
|
||||
file_put_contents($file, json_encode($data, JSON_PRETTY_PRINT), LOCK_EX);
|
||||
}
|
||||
|
||||
/* ---------- CSRF ---------- */
|
||||
if (empty($_SESSION['csrf'])) {
|
||||
$_SESSION['csrf'] = bin2hex(random_bytes(32));
|
||||
}
|
||||
|
||||
/* ---------- RATE LIMIT ---------- */
|
||||
$ip = client_ip();
|
||||
$attempts = load_json($attemptsFile);
|
||||
|
||||
if (isset($attempts[$ip])) {
|
||||
if (
|
||||
$attempts[$ip]['count'] >= $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 '<script>alert("'
|
||||
. htmlspecialchars($error, ENT_QUOTES)
|
||||
. '");</script>';
|
||||
}
|
||||
$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';
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>URMIC powred by Shreebhattji</title>
|
||||
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
:root {
|
||||
--bg-1: #0f172a;
|
||||
--bg-2: #1d4ed8;
|
||||
--bg-3: #22c55e;
|
||||
--accent: #f97316;
|
||||
--text-main: #f9fafb;
|
||||
--text-muted: #cbd5f5;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
|
||||
sans-serif;
|
||||
color: var(--text-main);
|
||||
background:
|
||||
radial-gradient(circle at top left, #22c55e33, transparent 60%),
|
||||
radial-gradient(circle at bottom right, #f9731633, transparent 65%),
|
||||
linear-gradient(135deg, var(--bg-1), var(--bg-2));
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.page-wrap {
|
||||
position: relative;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 1.5rem;
|
||||
isolation: isolate;
|
||||
}
|
||||
|
||||
.rain-container {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.raindrop {
|
||||
position: absolute;
|
||||
width: 2px;
|
||||
height: 70px;
|
||||
background: linear-gradient(to bottom,
|
||||
rgba(255, 255, 255, 0.9),
|
||||
rgba(255, 255, 255, 0));
|
||||
opacity: 0.55;
|
||||
border-radius: 999px;
|
||||
filter: blur(0.3px);
|
||||
animation-name: fall;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
@keyframes fall {
|
||||
0% {
|
||||
transform: translate3d(0, -120px, 0);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translate3d(0, 110vh, 0);
|
||||
}
|
||||
}
|
||||
|
||||
.card {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
max-width: 720px;
|
||||
width: 100%;
|
||||
padding: 2.5rem 2rem;
|
||||
border-radius: 1.75rem;
|
||||
border: 1px solid rgba(148, 163, 184, 0.6);
|
||||
background: linear-gradient(135deg,
|
||||
rgba(15, 23, 42, 0.9),
|
||||
rgba(15, 23, 42, 0.7)) border-box;
|
||||
backdrop-filter: blur(16px);
|
||||
box-shadow:
|
||||
0 20px 60px rgba(15, 23, 42, 0.7),
|
||||
0 0 0 1px rgba(15, 23, 42, 0.9);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
padding: 0.25rem 0.7rem;
|
||||
border-radius: 999px;
|
||||
font-size: 0.7rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.12em;
|
||||
color: var(--text-main);
|
||||
background: linear-gradient(90deg,
|
||||
rgba(59, 130, 246, 0.6),
|
||||
rgba(34, 197, 94, 0.75));
|
||||
}
|
||||
|
||||
.badge-dot {
|
||||
width: 0.35rem;
|
||||
height: 0.35rem;
|
||||
border-radius: 999px;
|
||||
background: #bbf7d0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: clamp(2.1rem, 4vw, 2.8rem);
|
||||
line-height: 1.08;
|
||||
}
|
||||
|
||||
h1 span.highlight {
|
||||
font-size: clamp(1.1rem, 2vw, 1.8rem);
|
||||
background-image: linear-gradient(120deg,
|
||||
#22c55e,
|
||||
#a855f7,
|
||||
#f97316);
|
||||
background-clip: text;
|
||||
-webkit-background-clip: text;
|
||||
color: transparent;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
p.subtitle {
|
||||
font-size: 0.95rem;
|
||||
color: var(--text-muted);
|
||||
max-width: 40rem;
|
||||
}
|
||||
|
||||
.tagline {
|
||||
margin-top: 0.5rem;
|
||||
font-size: 0.9rem;
|
||||
color: #e5e7eb;
|
||||
}
|
||||
|
||||
.pill-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.65rem;
|
||||
margin-top: 0.75rem;
|
||||
}
|
||||
|
||||
.pill {
|
||||
padding: 0.35rem 0.8rem;
|
||||
border-radius: 999px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.8);
|
||||
font-size: 0.75rem;
|
||||
color: #e5e7eb;
|
||||
background: radial-gradient(circle at top left,
|
||||
rgba(59, 130, 246, 0.22),
|
||||
rgba(15, 23, 42, 0.7));
|
||||
}
|
||||
|
||||
.footer {
|
||||
margin-top: 1.5rem;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.75rem;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.brand {
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.brand span {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.links {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.link {
|
||||
text-decoration: none;
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-muted);
|
||||
border-bottom: 1px dashed rgba(148, 163, 184, 0.7);
|
||||
}
|
||||
|
||||
.link:hover {
|
||||
color: #ffffff;
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.card {
|
||||
padding: 3rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.footer {
|
||||
align-items: flex-start;
|
||||
gap: 0.4rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="rain-container" id="rain"></div>
|
||||
|
||||
<div class="page-wrap">
|
||||
<main class="card">
|
||||
|
||||
<h1>Welcome</h1>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<p style="color:#fca5a5"><?= htmlspecialchars($error) ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="post" autocomplete="off">
|
||||
<input type="hidden" name="csrf" value="<?= htmlspecialchars($_SESSION['csrf']) ?>">
|
||||
|
||||
<div style="display:flex;flex-direction:column;gap:0.75rem">
|
||||
<input
|
||||
type="text"
|
||||
name="username"
|
||||
placeholder="Username"
|
||||
required
|
||||
style="padding:0.7rem;border-radius:0.5rem;border:none" />
|
||||
|
||||
<input
|
||||
type="password"
|
||||
name="password"
|
||||
placeholder="Password"
|
||||
required
|
||||
style="padding:0.7rem;border-radius:0.5rem;border:none" />
|
||||
<label style="display:flex; gap:0.5rem; align-items:flex-start; font-size:0.8rem; color:#e5e7eb;">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="agree"
|
||||
value="1"
|
||||
required
|
||||
style="margin-top:0.15rem">
|
||||
<span>
|
||||
I agree to the
|
||||
<a href="https://urmic.org/2025/12/31/privacy-policy-and-terms-conditions-for-encoder/" target="_blank" class="link">Privacy Policy</a>
|
||||
and
|
||||
<a href="https://urmic.org/2025/12/31/privacy-policy-and-terms-conditions-for-encoder/" target="_blank" class="link">Terms & Conditions</a>
|
||||
</span>
|
||||
</label>
|
||||
<button
|
||||
type="submit"
|
||||
style="padding:0.75rem;border-radius:0.6rem;border:none;
|
||||
background:#22c55e;color:#000;font-weight:600">
|
||||
Login
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div style="margin-top:0.75rem">
|
||||
<a href="forgot.php" class="link">Forgot password?</a>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="brand">
|
||||
URMIC • <span>Shreebhattji</span>
|
||||
</div>
|
||||
<div class="links">
|
||||
<a href="https://urmic.org/trusted-partners/" class="link">Meet Out Partners</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
const container = document.getElementById("rain");
|
||||
|
||||
function generateRain() {
|
||||
if (!container) return;
|
||||
|
||||
container.innerHTML = "";
|
||||
|
||||
// Density: more width -> more raindrops
|
||||
const width = window.innerWidth;
|
||||
const height = window.innerHeight;
|
||||
|
||||
const baseDensity = 0.16; // drops per vw
|
||||
let drops = Math.floor(width * baseDensity);
|
||||
|
||||
if (window.innerWidth < 600) {
|
||||
drops = Math.floor(width * 0.10);
|
||||
} else if (window.innerWidth > 1400) {
|
||||
drops = Math.floor(width * 0.18);
|
||||
}
|
||||
|
||||
for (let i = 0; i < drops; i++) {
|
||||
const drop = document.createElement("span");
|
||||
drop.className = "raindrop";
|
||||
|
||||
const left = Math.random() * 100; // vw
|
||||
const delay = Math.random() * -3; // negative so it’s already falling
|
||||
const duration = 0.7 + Math.random() * 1.2; // seconds
|
||||
const offsetY = Math.random() * height * 0.3;
|
||||
|
||||
drop.style.left = left + "vw";
|
||||
drop.style.top = -120 - offsetY + "px";
|
||||
drop.style.animationDuration = duration + "s";
|
||||
drop.style.animationDelay = delay + "s";
|
||||
drop.style.opacity = (0.35 + Math.random() * 0.55).toFixed(2);
|
||||
|
||||
container.appendChild(drop);
|
||||
}
|
||||
}
|
||||
|
||||
// Basic debounce for resize
|
||||
let resizeTimer = null;
|
||||
window.addEventListener("resize", () => {
|
||||
clearTimeout(resizeTimer);
|
||||
resizeTimer = setTimeout(generateRain, 180);
|
||||
});
|
||||
|
||||
window.addEventListener("DOMContentLoaded", generateRain);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -0,0 +1,181 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Self Certification</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
background: #f4f6f8;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
.top-bar {
|
||||
background: #0f172a;
|
||||
padding: 12px 16px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.top-bar button {
|
||||
background: #2563eb;
|
||||
border: none;
|
||||
color: #fff;
|
||||
padding: 8px 16px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.top-bar button:hover {
|
||||
background: #1d4ed8;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 900px;
|
||||
margin: 24px auto;
|
||||
background: #ffffff;
|
||||
padding: 32px;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: 1.6;
|
||||
margin-bottom: 16px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-weight: bold;
|
||||
margin-top: 24px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.signature {
|
||||
margin-top: 48px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.sign-box {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.sign-line {
|
||||
margin-top: 40px;
|
||||
border-top: 1px solid #000;
|
||||
padding-top: 6px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@media print {
|
||||
.top-bar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.container {
|
||||
box-shadow: none;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
function goHome() {
|
||||
window.location.href = "index.html";
|
||||
}
|
||||
|
||||
function printPage() {
|
||||
window.print();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="top-bar">
|
||||
<button onclick="goHome()">Home</button>
|
||||
<button onclick="printPage()">Print</button>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<h1>Self Certification Declaration</h1>
|
||||
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<div class="section-title">Compliance & Safety Declaration</div>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<div class="section-title">Privacy Assurance</div>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<div class="section-title">License Verification Notice</div>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<div class="section-title">Limitation of Liability</div>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<div class="section-title">Declaration</div>
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
<div class="signature">
|
||||
<div class="sign-box">
|
||||
Devdatt Bhatt aka ShreeBhattji <br> Bhavnagar
|
||||
<div class="sign-line">Authorized Signature</div>
|
||||
</div>
|
||||
<div class="sign-box">
|
||||
<br>01 Jan , 2026
|
||||
<div class="sign-line">Date</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -268,6 +268,7 @@
|
|||
<span class="pill"><a style="color: #ffffff;" href="https://wa.me/+918000741919">What's app</a></span>
|
||||
<span class="pill"><a style="color: #ffffff;" href="mailto:hello@urmic.org">Email</a></span>
|
||||
<span class="pill"><a style="color: #ffffff;" href="tel:+918000741919">Call Us</a></span>
|
||||
<span class="pill"><a style="color: #ffffff;" href="certification.html">Certificate</a></span>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
sudo cp -r encoder/* /var/www/encoder/
|
||||
sudo cp users.json /var/www/users.json
|
||||
sudo cp attempts.json /var/www/attempts.json
|
||||
sudo reboot
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"shreebhattji": {
|
||||
"password": "$2y$10$eImiTXuWVxfM37uY4JANjQ=="
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue