Repository navigation
Expand file tree
/
Copy pathsecurity_features.html
More file actions
269 lines (227 loc) · 4.84 KB
/
Copy pathsecurity_features.html
File metadata and controls
269 lines (227 loc) · 4.84 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Security Practice Lab</title>
<style>
:root{
--bg:#0b0f1a;
--panel:#111827;
--border:#1f2937;
--fg:#e5e7eb;
--muted:#9ca3af;
--accent:#3b82f6;
--done:#22c55e;
}
*{
box-sizing:border-box;
margin:0;
padding:0;
font-family: Inter, system-ui, sans-serif;
}
body{
min-height:100vh;
background:var(--bg);
display:flex;
align-items:center;
justify-content:center;
color:var(--fg);
}
.container{
width:420px;
background:linear-gradient(180deg,#0f172a,#020617);
border:1px solid var(--border);
border-radius:18px;
padding:28px;
box-shadow:0 30px 60px rgba(0,0,0,.6);
}
header{
text-align:center;
margin-bottom:22px;
}
header h1{
font-size:22px;
letter-spacing:.12em;
}
header p{
margin-top:6px;
font-size:13px;
color:var(--muted);
}
.progress-wrap{
margin:18px 0;
}
.progress-bar-bg{
background:#111827;
border-radius:10px;
overflow:hidden;
}
.progress-bar{
height:12px;
width:0%;
background:linear-gradient(135deg,#22c55e,#16a34a);
transition:width .6s ease;
}
.progress-text{
font-size:12px;
color:#9aa3d1;
margin-top:6px;
}
ul{
list-style:none;
display:grid;
gap:14px;
}
.tool{
display:flex;
justify-content:space-between;
align-items:center;
padding:14px 16px;
background:#020617;
border:1px solid var(--border);
border-radius:14px;
text-decoration:none;
color:inherit;
transition:.25s;
}
.tool:hover{
border-color:var(--accent);
}
.left{
display:flex;
flex-direction:column;
}
.name{
font-size:15px;
font-weight:600;
}
.desc{
font-size:12px;
color:var(--muted);
margin-top:4px;
}
.badge{
font-size:11px;
padding:4px 8px;
border-radius:999px;
border:1px solid var(--border);
color:var(--muted);
}
.badge.done{
color:var(--done);
border-color:#14532d;
}
#quizWrapper{
display:none;
margin-top:22px;
}
#quizBtn{
width:100%;
padding:14px;
border-radius:14px;
border:none;
font-weight:800;
background:linear-gradient(135deg,#22c55e,#16a34a);
color:#020617;
cursor:pointer;
}
footer{
margin-top:18px;
font-size:11px;
color:#6b7280;
text-align:center;
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>SECURITY PRACTICE LAB</h1>
<div class="progress-wrap">
<div class="progress-bar-bg">
<div id="progressBar" class="progress-bar"></div>
</div>
<div id="progressText" class="progress-text">0% completed</div>
</div>
<p>Ethical security learning • theory-first • safe simulations</p>
</header>
<ul>
<li>
<a class="tool" href="/nmap" target="_blank" data-phase="reconnaissance">
<div class="left">
<div class="name">Reconnaissance</div>
<div class="desc">Hosts, ports, services, attack surface</div>
</div>
<span class="badge">PHASE 1</span>
</a>
</li>
<li>
<a class="tool" href="/netcat" target="_blank" data-phase="enumeration">
<div class="left">
<div class="name">Enumeration</div>
<div class="desc">Service behavior, banners, manual probing</div>
</div>
<span class="badge">PHASE 2</span>
</a>
</li>
<li>
<a class="tool" href="/sqlmap" target="_blank" data-phase="exploitation">
<div class="left">
<div class="name">Exploitation Awareness</div>
<div class="desc">Vulnerabilities & exploit logic</div>
</div>
<span class="badge">PHASE 3</span>
</a>
</li>
<li>
<a class="tool" href="/password_cracking" target="_blank" data-phase="credential_attacks">
<div class="left">
<div class="name">Credential Attacks</div>
<div class="desc">Hydra, John, hashes & real breaches</div>
</div>
<span class="badge">PHASE 4</span>
</a>
</li>
</ul>
<div id="quizWrapper">
<button id="quizBtn" onclick="window.open('/quiz','_blank')">
🎓 Start Final Quiz
</button>
</div>
<footer>
Authorized learning only • No misuse
</footer>
</div>
<script>
/* ===== PHASES (single source of truth) ===== */
const REQUIRED_PHASES = [
"reconnaissance",
"enumeration",
"exploitation",
"credential_attacks"
];
/* ===== Progress calculation ===== */
const completed = REQUIRED_PHASES.filter(
p => localStorage.getItem(`lesson:${p}`) === "done"
).length;
const percent = Math.round((completed / REQUIRED_PHASES.length) * 100);
document.getElementById("progressBar").style.width = percent + "%";
document.getElementById("progressText").textContent =
`${percent}% completed`;
/* ===== Badge update ===== */
document.querySelectorAll("[data-phase]").forEach(el => {
const phase = el.dataset.phase;
const badge = el.querySelector(".badge");
if (localStorage.getItem(`lesson:${phase}`) === "done") {
badge.textContent = "COMPLETED";
badge.classList.add("done");
}
});
/* ===== Quiz unlock ===== */
if (percent === 100) {
document.getElementById("quizWrapper").style.display = "block";
}
</script>
</body>
</html>