-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
543 lines (487 loc) · 30 KB
/
Copy pathindex.html
File metadata and controls
543 lines (487 loc) · 30 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
<!DOCTYPE html>
<html lang="en" class="scroll-smooth">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="ACLLock – Windows ACL file/folder lock tool, CLI & TUI">
<title>ASLLock | NTFS ACL Security Tool</title>
<!-- Tailwind CSS -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Inter:wght@300;400;600;700&display=swap" rel="stylesheet">
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
fontFamily: {
sans: ['Inter', 'sans-serif'],
mono: ['Fira Code', 'monospace'],
},
colors: {
win: {
blue: '#012456', // Classic Windows Blue
dark: '#0c0c0c', // VS Code/Terminal bg
panel: '#1e1e1e', // Panel bg
term: '#2d2d2d', // Input line
accent: '#3b82f6', // PowerShell Blue
success: '#22c55e',
warn: '#eab308',
error: '#ef4444'
}
},
animation: {
'blink': 'blink 1s step-end infinite',
'fade-in': 'fadeIn 0.3s ease-out forwards',
},
keyframes: {
blink: {
'0%, 100%': { opacity: '1' },
'50%': { opacity: '0' },
},
fadeIn: {
'0%': { opacity: '0', transform: 'translateY(10px)' },
'100%': { opacity: '1', transform: 'translateY(0)' },
}
}
}
}
}
</script>
<style>
body {
background-color: #0c0c0c;
color: #e2e8f0;
}
/* Scrollbar */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: #0c0c0c;
}
::-webkit-scrollbar-thumb {
background: #334155;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #475569;
}
/* Terminal Scrollbar */
.term-scroll::-webkit-scrollbar {
width: 6px;
}
.term-scroll::-webkit-scrollbar-track {
background: #1e1e1e;
}
.term-scroll::-webkit-scrollbar-thumb {
background: #475569;
border-radius: 3px;
}
.active-nav {
background-color: rgba(59, 130, 246, 0.1);
color: #3b82f6;
border-right: 3px solid #3b82f6;
}
</style>
</head>
<body class="flex h-screen overflow-hidden selection:bg-win-accent selection:text-white">
<!-- Mobile Header -->
<div class="md:hidden fixed top-0 w-full h-16 bg-win-panel border-b border-slate-800 z-50 flex items-center justify-between px-4">
<div class="flex items-center">
<i class="fa-solid fa-shield-halved text-win-accent mr-2"></i>
<span class="font-bold text-lg">ASLLock</span>
</div>
<button onclick="toggleSidebar()" class="text-slate-400 focus:text-white">
<i class="fa-solid fa-bars text-xl"></i>
</button>
</div>
<!-- Sidebar Navigation -->
<aside id="sidebar" class="fixed inset-y-0 left-0 z-40 w-64 bg-win-panel border-r border-slate-800 transform -translate-x-full md:translate-x-0 md:static md:flex flex-col transition-transform duration-300 ease-in-out">
<!-- Brand -->
<div class="h-16 flex items-center px-6 border-b border-slate-800">
<i class="fa-solid fa-shield-halved text-win-accent text-xl mr-3"></i>
<span class="font-bold text-lg tracking-tight">ASLLock</span>
<span class="ml-auto text-xs bg-slate-800 text-slate-400 px-2 py-0.5 rounded border border-slate-700">v1.0</span>
</div>
<!-- Nav Links -->
<nav class="flex-1 overflow-y-auto py-4">
<ul class="space-y-1">
<li>
<button onclick="switchTab('home')" class="nav-item w-full text-left px-6 py-3 text-slate-400 hover:text-white hover:bg-slate-800/50 transition-all active-nav" data-target="home">
<i class="fa-solid fa-house w-6"></i> Overview
</button>
</li>
<li>
<button onclick="switchTab('features')" class="nav-item w-full text-left px-6 py-3 text-slate-400 hover:text-white hover:bg-slate-800/50 transition-all" data-target="features">
<i class="fa-solid fa-list-check w-6"></i> Features
</button>
</li>
<li>
<button onclick="switchTab('install')" class="nav-item w-full text-left px-6 py-3 text-slate-400 hover:text-white hover:bg-slate-800/50 transition-all" data-target="install">
<i class="fa-solid fa-download w-6"></i> Installation
</button>
</li>
<li>
<button onclick="switchTab('cli')" class="nav-item w-full text-left px-6 py-3 text-slate-400 hover:text-white hover:bg-slate-800/50 transition-all" data-target="cli">
<i class="fa-solid fa-terminal w-6"></i> CLI Demo
</button>
</li>
<li>
<button onclick="switchTab('architecture')" class="nav-item w-full text-left px-6 py-3 text-slate-400 hover:text-white hover:bg-slate-800/50 transition-all" data-target="architecture">
<i class="fa-solid fa-diagram-project w-6"></i> Architecture
</button>
</li>
</ul>
</nav>
<!-- Footer -->
<div class="p-4 border-t border-slate-800">
<a href="https://github.com/mini-page/asllock" target="_blank" class="flex items-center justify-center w-full bg-slate-800 hover:bg-slate-700 text-slate-300 py-2 rounded transition-colors text-sm font-mono">
<i class="fa-brands fa-github mr-2"></i> View on GitHub
</a>
</div>
</aside>
<!-- Main Content -->
<main class="flex-1 flex flex-col h-screen overflow-hidden relative pt-16 md:pt-0">
<!-- Overlay for mobile sidebar -->
<div id="sidebar-overlay" onclick="toggleSidebar()" class="fixed inset-0 bg-black/50 z-30 hidden md:hidden"></div>
<div class="flex-1 overflow-y-auto p-6 md:p-12 relative">
<!-- SECTION: HOME -->
<section id="home" class="tab-content max-w-5xl mx-auto animate-fade-in">
<div class="flex flex-col md:flex-row gap-8 items-center mb-12">
<div class="flex-1">
<div class="flex items-center gap-2 mb-4">
<span class="bg-win-accent/10 text-win-accent text-xs font-bold px-2 py-1 rounded uppercase">PowerShell Tool</span>
<span class="bg-slate-800 text-slate-400 text-xs px-2 py-1 rounded uppercase">Open Source</span>
</div>
<h1 class="text-4xl md:text-5xl font-bold text-white mb-4">
NTFS ACL File <br>
<span class="text-win-accent">Locking Utility</span>
</h1>
<p class="text-lg text-slate-400 mb-8 leading-relaxed">
Secure your files and folders using Windows native permissions. <br>
<span class="text-slate-500 text-sm">Not encryption. Permission-based access control via CLI & TUI.</span>
</p>
<!-- One-line Install Box -->
<div class="bg-win-panel border border-slate-700 rounded-lg p-1 inline-flex items-center shadow-lg mb-6 w-full max-w-lg">
<div class="bg-slate-800 text-slate-400 px-3 py-2 rounded text-xs font-mono">
PS>
</div>
<code class="flex-1 px-4 text-slate-200 font-mono text-sm overflow-x-hidden whitespace-nowrap" id="install-cmd">iwr https://raw.githubusercontent.com/mini-page/acllock/main/install.ps1 | iex</code>
<button onclick="copyToClipboard()" class="px-4 py-2 bg-slate-700 hover:bg-slate-600 text-white rounded text-sm font-medium transition-colors">
<i class="fa-regular fa-copy"></i>
</button>
</div>
</div>
<!-- Visual Icon -->
<div class="w-48 h-48 relative flex items-center justify-center">
<div class="absolute inset-0 bg-win-accent/20 rounded-full blur-3xl animate-pulse"></div>
<i class="fa-solid fa-lock text-8xl text-white relative z-10"></i>
<i class="fa-brands fa-windows text-6xl text-win-blue absolute -bottom-4 -right-4 opacity-80"></i>
</div>
</div>
<!-- Warning Box -->
<div class="border-l-4 border-win-warn bg-win-warn/10 p-4 rounded-r mb-12">
<div class="flex">
<div class="flex-shrink-0">
<i class="fa-solid fa-triangle-exclamation text-win-warn"></i>
</div>
<div class="ml-3">
<p class="text-sm text-slate-300">
<strong class="text-win-warn font-bold">Security Note:</strong> This tool does not encrypt data. It modifies NTFS ACLs to deny access. Administrators can always override these locks. Use for rapid access control, not for cryptographic security.
</p>
</div>
</div>
</div>
</section>
<!-- SECTION: FEATURES -->
<section id="features" class="tab-content hidden max-w-5xl mx-auto animate-fade-in">
<h2 class="text-3xl font-bold text-white mb-8 border-b border-slate-800 pb-4">Key Features</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<!-- Feature 1 -->
<div class="bg-win-panel p-6 rounded-xl border border-slate-800 hover:border-win-accent/50 transition-colors group">
<div class="w-12 h-12 bg-slate-800 rounded-lg flex items-center justify-center mb-4 group-hover:bg-win-accent/20 transition-colors">
<i class="fa-solid fa-user-lock text-win-accent text-xl"></i>
</div>
<h3 class="text-xl font-bold text-white mb-2">ACL-Based Protection</h3>
<p class="text-slate-400 text-sm">Uses native Windows `icacls` to deny access to files/folders. Administrators always retain recovery access.</p>
</div>
<!-- Feature 2 -->
<div class="bg-win-panel p-6 rounded-xl border border-slate-800 hover:border-win-accent/50 transition-colors group">
<div class="w-12 h-12 bg-slate-800 rounded-lg flex items-center justify-center mb-4 group-hover:bg-win-accent/20 transition-colors">
<i class="fa-solid fa-terminal text-green-400 text-xl"></i>
</div>
<h3 class="text-xl font-bold text-white mb-2">Dual Interface (CLI & TUI)</h3>
<p class="text-slate-400 text-sm">Scriptable commands for automation (`acllock lock path`) or an interactive TUI menu for guided usage.</p>
</div>
<!-- Feature 3 -->
<div class="bg-win-panel p-6 rounded-xl border border-slate-800 hover:border-win-accent/50 transition-colors group">
<div class="w-12 h-12 bg-slate-800 rounded-lg flex items-center justify-center mb-4 group-hover:bg-win-accent/20 transition-colors">
<i class="fa-solid fa-database text-purple-400 text-xl"></i>
</div>
<h3 class="text-xl font-bold text-white mb-2">Backup & Restore</h3>
<p class="text-slate-400 text-sm">Automatically backs up original ACLs to a hidden `.acllock` folder before locking. Fully restorable.</p>
</div>
<!-- Feature 4 -->
<div class="bg-win-panel p-6 rounded-xl border border-slate-800 hover:border-win-accent/50 transition-colors group">
<div class="w-12 h-12 bg-slate-800 rounded-lg flex items-center justify-center mb-4 group-hover:bg-win-accent/20 transition-colors">
<i class="fa-solid fa-file-waveform text-orange-400 text-xl"></i>
</div>
<h3 class="text-xl font-bold text-white mb-2">Operation Logging</h3>
<p class="text-slate-400 text-sm">All actions are logged with timestamps to `%LOCALAPPDATA%\acllock\acllock.log` for auditing.</p>
</div>
</div>
</section>
<!-- SECTION: CLI DEMO (Interactive) -->
<section id="cli" class="tab-content hidden max-w-4xl mx-auto animate-fade-in">
<h2 class="text-3xl font-bold text-white mb-4">Interactive CLI Demo</h2>
<p class="text-slate-400 mb-6">Experience the workflow of ASLLock directly in your browser. (Simulation)</p>
<!-- Terminal Window -->
<div class="bg-win-panel rounded-xl shadow-2xl border border-slate-700 overflow-hidden font-mono text-sm flex flex-col h-[400px]">
<!-- Terminal Bar -->
<div class="bg-slate-800 px-4 py-2 flex items-center justify-between border-b border-slate-700">
<div class="flex items-center gap-2">
<div class="w-3 h-3 rounded-full bg-red-500"></div>
<div class="w-3 h-3 rounded-full bg-yellow-500"></div>
<div class="w-3 h-3 rounded-full bg-green-500"></div>
<span class="ml-4 text-slate-400 text-xs">Windows PowerShell - Administrator</span>
</div>
<i class="fa-solid fa-terminal text-slate-600"></i>
</div>
<!-- Terminal Body -->
<div class="flex-1 bg-[#0c0c0c] p-4 overflow-y-auto term-scroll flex flex-col" id="terminal-output">
<div class="text-slate-500 mb-2">Windows PowerShell</div>
<div class="text-slate-500 mb-4">Copyright (C) Microsoft Corporation. All rights reserved.</div>
<div class="text-slate-300 mb-2">Install the latest ASLLock or try commands below.</div>
<div class="text-slate-500 mb-4">------------------------------------------------------</div>
</div>
<!-- Terminal Input Area -->
<div class="bg-[#0c0c0c] p-4 border-t border-slate-800">
<div class="flex items-center gap-4 mb-3">
<span class="text-win-accent font-bold">PS C:\></span>
<span class="text-slate-400">Select a command:</span>
</div>
<div class="flex gap-3">
<button onclick="runCmd('lock')" class="flex-1 bg-win-term hover:bg-slate-700 text-white py-2 rounded border border-slate-700 transition-colors flex items-center justify-center gap-2">
<i class="fa-solid fa-lock text-xs text-red-400"></i> acllock lock
</button>
<button onclick="runCmd('unlock')" class="flex-1 bg-win-term hover:bg-slate-700 text-white py-2 rounded border border-slate-700 transition-colors flex items-center justify-center gap-2">
<i class="fa-solid fa-unlock text-xs text-green-400"></i> acllock unlock
</button>
<button onclick="runCmd('status')" class="flex-1 bg-win-term hover:bg-slate-700 text-white py-2 rounded border border-slate-700 transition-colors flex items-center justify-center gap-2">
<i class="fa-solid fa-circle-info text-xs text-blue-400"></i> acllock status
</button>
</div>
</div>
</div>
</section>
<!-- SECTION: INSTALLATION -->
<section id="install" class="tab-content hidden max-w-4xl mx-auto animate-fade-in">
<h2 class="text-3xl font-bold text-white mb-8">Installation</h2>
<div class="space-y-8">
<!-- Quick Install -->
<div>
<h3 class="text-xl font-bold text-white mb-4"><i class="fa-solid fa-bolt text-win-warn mr-2"></i> Quick Install</h3>
<p class="text-slate-400 mb-4">Run this one-liner in an elevated PowerShell terminal.</p>
<div class="relative group">
<pre class="bg-[#1e1e1e] p-4 rounded-lg border border-slate-700 text-win-accent font-mono overflow-x-auto">
iwr https://raw.githubusercontent.com/mini-page/asllock/main/install.ps1 | iex</pre>
<button class="absolute top-2 right-2 text-slate-500 hover:text-white" onclick="copyToClipboard('iwr https://raw.githubusercontent.com/mini-page/asllock/main/install.ps1 | iex')">
<i class="fa-regular fa-copy"></i>
</button>
</div>
</div>
<!-- Manual Install -->
<div>
<h3 class="text-xl font-bold text-white mb-4"><i class="fa-solid fa-wrench mr-2"></i> Manual Install</h3>
<ol class="list-decimal list-inside space-y-4 text-slate-300">
<li class="pl-2">
Clone the repository:
<div class="mt-2 bg-[#1e1e1e] p-3 rounded border border-slate-700 font-mono text-sm text-slate-400">
git clone https://github.com/mini-page/asllock.git
</div>
</li>
<li class="pl-2">
Navigate to the folder and run the installer as <strong>Administrator</strong>:
<div class="mt-2 bg-[#1e1e1e] p-3 rounded border border-slate-700 font-mono text-sm text-slate-400">
cd asllock<br>
.\install.ps1
</div>
</li>
</ol>
</div>
</div>
</section>
<!-- SECTION: ARCHITECTURE -->
<section id="architecture" class="tab-content hidden max-w-5xl mx-auto animate-fade-in">
<h2 class="text-3xl font-bold text-white mb-8">Architecture</h2>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
<!-- File Structure -->
<div class="bg-win-panel p-6 rounded-xl border border-slate-800">
<h3 class="text-lg font-bold text-white mb-4 font-mono"><i class="fa-solid fa-folder-tree mr-2 text-slate-500"></i>Project Structure</h3>
<div class="font-mono text-sm text-slate-400 space-y-1">
<div><i class="fa-regular fa-folder-open text-yellow-500 w-6"></i> acllock/</div>
<div class="pl-6"><i class="fa-brands fa-windows text-blue-400 w-6"></i> acllock.ps1 <span class="text-slate-600 italic"># Executable</span></div>
<div class="pl-6"><i class="fa-brands fa-windows text-blue-400 w-6"></i> acllock.cmd <span class="text-slate-600 italic"># Wrapper</span></div>
<div class="pl-6"><i class="fa-brands fa-windows text-blue-400 w-6"></i> install.ps1</div>
<div class="pl-6"><i class="fa-regular fa-folder text-yellow-500 w-6"></i> core/ <span class="text-slate-600 italic"># Logic</span></div>
<div class="pl-6"><i class="fa-regular fa-folder text-yellow-500 w-6"></i> ui/ <span class="text-slate-600 italic"># TUI</span></div>
<div class="pl-6"><i class="fa-solid fa-file-code text-slate-500 w-6"></i> tests.ps1</div>
</div>
</div>
<!-- Locking Flow Diagram -->
<div class="bg-win-panel p-6 rounded-xl border border-slate-800 flex flex-col justify-center">
<h3 class="text-lg font-bold text-white mb-6 font-mono"><i class="fa-solid fa-arrow-down-long mr-2 text-slate-500"></i>Locking Process</h3>
<div class="space-y-4 relative">
<!-- Vertical Line -->
<div class="absolute left-4 top-4 bottom-4 w-0.5 bg-slate-700"></div>
<!-- Step 1 -->
<div class="flex items-center relative z-10">
<div class="w-8 h-8 rounded-full bg-slate-800 border-2 border-slate-600 flex items-center justify-center text-xs text-white font-bold">1</div>
<div class="ml-4 p-3 bg-slate-800/50 rounded border border-slate-700 flex-1">
<div class="text-xs text-slate-500 uppercase">Backup</div>
<div class="text-sm text-white">Save original ACLs to <code class="text-win-accent">.acllock</code></div>
</div>
</div>
<!-- Step 2 -->
<div class="flex items-center relative z-10">
<div class="w-8 h-8 rounded-full bg-slate-800 border-2 border-slate-600 flex items-center justify-center text-xs text-white font-bold">2</div>
<div class="ml-4 p-3 bg-slate-800/50 rounded border border-slate-700 flex-1">
<div class="text-xs text-slate-500 uppercase">Inheritance</div>
<div class="text-sm text-white">Disable permission inheritance</div>
</div>
</div>
<!-- Step 3 -->
<div class="flex items-center relative z-10">
<div class="w-8 h-8 rounded-full bg-slate-800 border-2 border-slate-600 flex items-center justify-center text-xs text-white font-bold">3</div>
<div class="ml-4 p-3 bg-slate-800/50 rounded border border-slate-700 flex-1">
<div class="text-xs text-slate-500 uppercase">Admin Control</div>
<div class="text-sm text-white">Grant <span class="text-win-accent">Full Control</span> to Admins</div>
</div>
</div>
<!-- Step 4 -->
<div class="flex items-center relative z-10">
<div class="w-8 h-8 rounded-full bg-slate-800 border-2 border-red-500 flex items-center justify-center text-xs text-white font-bold">4</div>
<div class="ml-4 p-3 bg-red-900/10 rounded border border-red-900/30 flex-1">
<div class="text-xs text-red-400 uppercase">Deny Access</div>
<div class="text-sm text-white">Add "Everyone: Deny" entry</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
<!-- Scripts -->
<script>
// --- Navigation Logic ---
function switchTab(tabId) {
// Hide all sections
document.querySelectorAll('.tab-content').forEach(el => {
el.classList.add('hidden');
});
// Show target
const target = document.getElementById(tabId);
target.classList.remove('hidden');
// Update Sidebar Active State
document.querySelectorAll('.nav-item').forEach(btn => {
if(btn.dataset.target === tabId) {
btn.classList.add('active-nav', 'text-white');
btn.classList.remove('text-slate-400');
} else {
btn.classList.remove('active-nav', 'text-white');
btn.classList.add('text-slate-400');
}
});
// Close mobile menu if open
const sidebar = document.getElementById('sidebar');
const overlay = document.getElementById('sidebar-overlay');
if(!sidebar.classList.contains('-translate-x-full')) {
toggleSidebar();
}
}
function toggleSidebar() {
const sidebar = document.getElementById('sidebar');
const overlay = document.getElementById('sidebar-overlay');
if (sidebar.classList.contains('-translate-x-full')) {
sidebar.classList.remove('-translate-x-full');
overlay.classList.remove('hidden');
} else {
sidebar.classList.add('-translate-x-full');
overlay.classList.add('hidden');
}
}
function copyToClipboard(text = null) {
const textToCopy = text || document.getElementById('install-cmd').innerText;
navigator.clipboard.writeText(textToCopy).then(() => {
showToast('Copied to clipboard!');
});
}
function showToast(msg) {
const toast = document.createElement('div');
toast.className = 'fixed bottom-5 right-5 bg-win-accent text-white px-4 py-2 rounded shadow-lg text-sm z-50 animate-fade-in';
toast.innerText = msg;
document.body.appendChild(toast);
setTimeout(() => toast.remove(), 2000);
}
// --- Interactive Terminal Logic ---
const terminalOutput = document.getElementById('terminal-output');
function printLine(text, colorClass = 'text-slate-300', prefix = '') {
const div = document.createElement('div');
div.className = `mb-1 ${colorClass}`;
div.innerHTML = prefix ? `<span class="text-win-accent font-bold mr-2">${prefix}</span>${text}` : text;
terminalOutput.appendChild(div);
terminalOutput.scrollTop = terminalOutput.scrollHeight;
}
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function runCmd(cmd) {
const path = '"C:\\Secret\\Docs"';
// Print Input
printLine(`acllock ${cmd} ${path}`, 'text-white');
await sleep(400);
if (cmd === 'lock') {
printLine('[INFO] Checking path...', 'text-slate-500');
await sleep(300);
printLine('[INFO] Backing up current ACLs to .acllock folder...', 'text-win-warn');
await sleep(600);
printLine('[INFO] Removing inheritance...', 'text-slate-500');
await sleep(400);
printLine('[INFO] Granting Full Control to Administrators...', 'text-slate-500');
await sleep(400);
printLine('[SUCCESS] Denying access for Everyone.', 'text-green-400');
printLine('LOCKED: Access is now restricted to Admins only.', 'text-white font-bold');
printLine('Logged to: C:\\Users\\User\\AppData\\Local\\acllock\\acllock.log', 'text-slate-600 text-xs italic');
}
else if (cmd === 'unlock') {
printLine('[INFO] Checking backup...', 'text-slate-500');
await sleep(400);
printLine('[INFO] Restore point found (.acllock).', 'text-slate-500');
await sleep(400);
printLine('[INFO] Removing explicit Deny rule...', 'text-slate-500');
await sleep(400);
printLine('[SUCCESS] Restoring original permissions.', 'text-green-400');
printLine('UNLOCKED: File access restored.', 'text-white font-bold');
}
else if (cmd === 'status') {
await sleep(400);
printLine('Path: C:\\Secret\\Docs', 'text-slate-300');
printLine('Inheritance: Disabled', 'text-slate-400');
printLine('Owner: BUILTIN\\Administrators', 'text-slate-400');
printLine('Access: LOCKED (Everyone: Denied)', 'text-red-400 font-bold');
}
// Print new prompt
await sleep(200);
const prompt = document.createElement('div');
prompt.className = 'mt-2 text-win-accent font-bold';
prompt.innerText = 'PS C:\\>';
terminalOutput.appendChild(prompt);
}
</script>
</body>
</html>