Spaces:
Running
Running
Update index.html
Browse files- index.html +185 -407
index.html
CHANGED
@@ -3,28 +3,26 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>
|
7 |
<style>
|
8 |
:root {
|
9 |
-
--primary: #
|
10 |
-
--
|
11 |
-
--
|
12 |
-
--
|
13 |
-
--light: #F7FAFC;
|
14 |
-
--shadow: rgba(0, 0, 0, 0.1);
|
15 |
}
|
16 |
|
17 |
* {
|
18 |
margin: 0;
|
19 |
padding: 0;
|
20 |
box-sizing: border-box;
|
21 |
-
font-family: '
|
22 |
}
|
23 |
|
24 |
body {
|
25 |
-
background:
|
26 |
-
color: var(--
|
27 |
-
|
28 |
padding: 2rem;
|
29 |
}
|
30 |
|
@@ -33,474 +31,254 @@
|
|
33 |
margin: 0 auto;
|
34 |
}
|
35 |
|
36 |
-
|
|
|
37 |
text-align: center;
|
38 |
-
padding: 2rem;
|
39 |
-
background: white;
|
40 |
-
border-radius: 1rem;
|
41 |
-
box-shadow: 0 4px 6px var(--shadow);
|
42 |
margin-bottom: 2rem;
|
|
|
43 |
}
|
44 |
|
45 |
-
.
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
.generator-form {
|
52 |
-
display: grid;
|
53 |
-
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
54 |
-
gap: 2rem;
|
55 |
-
}
|
56 |
-
|
57 |
-
.form-section {
|
58 |
-
background: white;
|
59 |
-
padding: 1.5rem;
|
60 |
-
border-radius: 1rem;
|
61 |
-
box-shadow: 0 4px 6px var(--shadow);
|
62 |
-
}
|
63 |
-
|
64 |
-
.form-section h2 {
|
65 |
-
color: var(--secondary);
|
66 |
-
margin-bottom: 1rem;
|
67 |
-
font-size: 1.5rem;
|
68 |
}
|
69 |
|
70 |
-
.
|
71 |
-
margin-bottom:
|
72 |
}
|
73 |
|
74 |
-
|
75 |
display: block;
|
76 |
margin-bottom: 0.5rem;
|
77 |
-
color: var(--
|
78 |
-
font-weight: 500;
|
79 |
}
|
80 |
|
81 |
select, input {
|
82 |
width: 100%;
|
83 |
padding: 0.75rem;
|
84 |
-
|
85 |
-
border
|
86 |
-
|
87 |
-
|
88 |
-
}
|
89 |
-
|
90 |
-
select:focus, input:focus {
|
91 |
-
border-color: var(--primary);
|
92 |
outline: none;
|
93 |
-
box-shadow: 0 0 0 3px rgba(255, 159, 176, 0.2);
|
94 |
-
}
|
95 |
-
|
96 |
-
.traits-container {
|
97 |
-
display: grid;
|
98 |
-
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
99 |
-
gap: 0.5rem;
|
100 |
-
margin-top: 0.5rem;
|
101 |
}
|
102 |
|
103 |
-
|
104 |
-
|
105 |
-
background: var(--light);
|
106 |
-
border: 1px solid #E2E8F0;
|
107 |
-
border-radius: 2rem;
|
108 |
-
cursor: pointer;
|
109 |
-
text-align: center;
|
110 |
-
transition: all 0.3s ease;
|
111 |
-
}
|
112 |
-
|
113 |
-
.trait-chip.selected {
|
114 |
-
background: var(--primary);
|
115 |
-
color: white;
|
116 |
-
border-color: var(--primary);
|
117 |
}
|
118 |
|
119 |
-
|
120 |
background: var(--primary);
|
121 |
-
color:
|
122 |
-
border: none;
|
123 |
padding: 1rem 2rem;
|
124 |
-
border
|
125 |
-
|
126 |
-
font-weight: 600;
|
127 |
cursor: pointer;
|
128 |
-
|
129 |
transition: all 0.3s ease;
|
130 |
margin-top: 1rem;
|
131 |
}
|
132 |
|
133 |
-
|
134 |
transform: translateY(-2px);
|
135 |
-
box-shadow: 0
|
136 |
}
|
137 |
|
138 |
-
.
|
139 |
margin-top: 2rem;
|
140 |
-
background:
|
141 |
-
padding: 2rem;
|
142 |
-
border-radius: 1rem;
|
143 |
-
box-shadow: 0 4px 6px var(--shadow);
|
144 |
-
}
|
145 |
-
|
146 |
-
.name-card {
|
147 |
-
background: var(--light);
|
148 |
padding: 1.5rem;
|
149 |
-
border-radius:
|
150 |
-
|
151 |
-
display: flex;
|
152 |
-
justify-content: space-between;
|
153 |
-
align-items: center;
|
154 |
-
transition: all 0.3s ease;
|
155 |
}
|
156 |
|
157 |
-
.
|
158 |
-
|
159 |
-
background: #F0F7FF;
|
160 |
-
}
|
161 |
-
|
162 |
-
.name-details h3 {
|
163 |
color: var(--primary);
|
164 |
-
|
165 |
-
margin-bottom: 0.5rem;
|
166 |
-
}
|
167 |
-
|
168 |
-
.name-meaning {
|
169 |
-
font-size: 0.9rem;
|
170 |
-
color: #666;
|
171 |
}
|
172 |
|
173 |
-
.
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
.personality-tag {
|
181 |
-
background: var(--secondary);
|
182 |
-
color: white;
|
183 |
-
padding: 0.25rem 0.75rem;
|
184 |
-
border-radius: 1rem;
|
185 |
font-size: 0.8rem;
|
186 |
}
|
187 |
|
188 |
-
.
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
.favorite-btn:hover {
|
197 |
-
transform: scale(1.2);
|
198 |
-
}
|
199 |
-
|
200 |
-
.favorites-section {
|
201 |
-
margin-top: 2rem;
|
202 |
-
background: white;
|
203 |
-
padding: 2rem;
|
204 |
-
border-radius: 1rem;
|
205 |
-
box-shadow: 0 4px 6px var(--shadow);
|
206 |
-
}
|
207 |
-
|
208 |
-
.favorites-section h2 {
|
209 |
-
color: var(--primary);
|
210 |
-
margin-bottom: 1rem;
|
211 |
-
}
|
212 |
-
|
213 |
-
@keyframes fadeIn {
|
214 |
-
from { opacity: 0; transform: translateY(10px); }
|
215 |
-
to { opacity: 1; transform: translateY(0); }
|
216 |
-
}
|
217 |
-
|
218 |
-
.name-card {
|
219 |
-
animation: fadeIn 0.5s ease forwards;
|
220 |
}
|
221 |
|
222 |
@media (max-width: 768px) {
|
223 |
-
|
224 |
padding: 1rem;
|
225 |
}
|
226 |
-
|
227 |
-
.generator-form {
|
228 |
-
grid-template-columns: 1fr;
|
229 |
-
}
|
230 |
}
|
231 |
</style>
|
232 |
</head>
|
233 |
<body>
|
|
|
|
|
234 |
<div class="container">
|
235 |
-
<
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
<
|
245 |
-
|
246 |
-
<option value="all">All</option>
|
247 |
-
<option value="boy">Boy</option>
|
248 |
-
<option value="girl">Girl</option>
|
249 |
-
<option value="neutral">Gender Neutral</option>
|
250 |
-
</select>
|
251 |
-
</div>
|
252 |
-
|
253 |
-
<div class="input-group">
|
254 |
-
<label for="origin">Cultural Background</label>
|
255 |
-
<select id="origin" multiple>
|
256 |
-
<option value="english">English</option>
|
257 |
-
<option value="french">French</option>
|
258 |
-
<option value="spanish">Spanish</option>
|
259 |
-
<option value="italian">Italian</option>
|
260 |
-
<option value="greek">Greek</option>
|
261 |
-
<option value="celtic">Celtic</option>
|
262 |
-
<option value="nordic">Nordic</option>
|
263 |
-
<option value="hebrew">Hebrew</option>
|
264 |
-
<option value="arabic">Arabic</option>
|
265 |
-
<option value="persian">Persian</option>
|
266 |
-
<option value="indian">Indian</option>
|
267 |
-
<option value="chinese">Chinese</option>
|
268 |
-
<option value="japanese">Japanese</option>
|
269 |
-
<option value="korean">Korean</option>
|
270 |
-
</select>
|
271 |
-
</div>
|
272 |
</div>
|
273 |
|
274 |
-
<div class="form-
|
275 |
-
<
|
276 |
-
<
|
277 |
-
<
|
278 |
-
<
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
<div class="trait-chip" data-trait="strong">Strong</div>
|
283 |
-
<div class="trait-chip" data-trait="artistic">Artistic</div>
|
284 |
-
<div class="trait-chip" data-trait="adventurous">Adventurous</div>
|
285 |
-
<div class="trait-chip" data-trait="peaceful">Peaceful</div>
|
286 |
-
<div class="trait-chip" data-trait="wise">Wise</div>
|
287 |
-
</div>
|
288 |
-
</div>
|
289 |
</div>
|
290 |
|
291 |
-
<div class="form-
|
292 |
-
<
|
293 |
-
<
|
294 |
-
<label>Select Personality Traits</label>
|
295 |
-
<div class="traits-container" id="fatherTraits">
|
296 |
-
<div class="trait-chip" data-trait="protective">Protective</div>
|
297 |
-
<div class="trait-chip" data-trait="loyal">Loyal</div>
|
298 |
-
<div class="trait-chip" data-trait="brave">Brave</div>
|
299 |
-
<div class="trait-chip" data-trait="gentle">Gentle</div>
|
300 |
-
<div class="trait-chip" data-trait="ambitious">Ambitious</div>
|
301 |
-
<div class="trait-chip" data-trait="wise">Wise</div>
|
302 |
-
<div class="trait-chip" data-trait="humorous">Humorous</div>
|
303 |
-
<div class="trait-chip" data-trait="athletic">Athletic</div>
|
304 |
-
</div>
|
305 |
-
</div>
|
306 |
</div>
|
307 |
-
</div>
|
308 |
|
309 |
-
|
310 |
-
|
311 |
-
<div class="results-section" id="results">
|
312 |
-
<!-- Generated names will appear here -->
|
313 |
-
</div>
|
314 |
|
315 |
-
|
316 |
-
|
317 |
-
|
|
|
318 |
</div>
|
319 |
</div>
|
320 |
|
321 |
<script>
|
322 |
-
//
|
323 |
-
const
|
324 |
-
|
325 |
-
creative: ['Leonardo', 'Byron', 'Vincent', 'Aiden'],
|
326 |
-
intelligent: ['Solomon', 'Ethan', 'Adrian', 'Theodore'],
|
327 |
-
strong: ['Alexander', 'Thor', 'Viktor', 'Bruno'],
|
328 |
-
protective: ['William', 'Guardian', 'Ward', 'Reign'],
|
329 |
-
brave: ['Valor', 'Leo', 'Wyatt', 'Ethan'],
|
330 |
-
gentle: ['Oliver', 'Liam', 'Noah', 'Benjamin'],
|
331 |
-
wise: ['Sage', 'Solomon', 'Alvis', 'Kenneth']
|
332 |
-
},
|
333 |
-
girl: {
|
334 |
-
creative: ['Luna', 'Aurora', 'Aria', 'Maya'],
|
335 |
-
intelligent: ['Sophia', 'Athena', 'Claire', 'Ada'],
|
336 |
-
caring: ['Grace', 'Hannah', 'Lily', 'Mira'],
|
337 |
-
artistic: ['Melody', 'Violet', 'Iris', 'Aria'],
|
338 |
-
peaceful: ['Serena', 'Dove', 'Paz', 'Shanti'],
|
339 |
-
wise: ['Sophia', 'Minerva', 'Sage', 'Alena']
|
340 |
-
},
|
341 |
-
neutral: {
|
342 |
-
creative: ['Alex', 'River', 'Sky', 'Phoenix'],
|
343 |
-
strong: ['Morgan', 'Kai', 'Atlas', 'Storm'],
|
344 |
-
wise: ['Sage', 'Quinn', 'Blair', 'Eden'],
|
345 |
-
peaceful: ['Harmony', 'Peace', 'Robin', 'Dawn']
|
346 |
-
}
|
347 |
-
};
|
348 |
-
|
349 |
-
// Name meanings database
|
350 |
-
const nameMeanings = {
|
351 |
-
'Alexander': 'Defender of the people',
|
352 |
-
'Sophia': 'Wisdom',
|
353 |
-
'Luna': 'Moon',
|
354 |
-
'Ethan': 'Strong, enduring',
|
355 |
-
'Grace': 'Elegance and divine favor',
|
356 |
-
// Add more meanings as needed
|
357 |
-
};
|
358 |
-
|
359 |
-
let favorites = new Set();
|
360 |
-
let selectedTraits = {
|
361 |
-
mother: new Set(),
|
362 |
-
father: new Set()
|
363 |
-
};
|
364 |
-
|
365 |
-
// Setup trait selection
|
366 |
-
document.querySelectorAll('.trait-chip').forEach(chip => {
|
367 |
-
chip.addEventListener('click', () => {
|
368 |
-
const parent = chip.parentElement.id;
|
369 |
-
const trait = chip.dataset.trait;
|
370 |
-
const traitSet = parent === 'motherTraits' ? selectedTraits.mother : selectedTraits.father;
|
371 |
-
|
372 |
-
chip.classList.toggle('selected');
|
373 |
-
if (traitSet.has(trait)) {
|
374 |
-
traitSet.delete(trait);
|
375 |
-
} else {
|
376 |
-
traitSet.add(trait);
|
377 |
-
}
|
378 |
-
});
|
379 |
-
});
|
380 |
-
|
381 |
-
function generateNames() {
|
382 |
-
const gender = document.getElementById('gender').value;
|
383 |
-
const origins = Array.from(document.getElementById('origin').selectedOptions).map(option => option.value);
|
384 |
-
|
385 |
-
let names = new Set();
|
386 |
-
const traits = [...selectedTraits.mother, ...selectedTraits.father];
|
387 |
-
|
388 |
-
// Generate names based on selected traits
|
389 |
-
traits.forEach(trait => {
|
390 |
-
if (gender === 'all' || gender === 'neutral') {
|
391 |
-
if (nameDatabase.neutral[trait]) {
|
392 |
-
nameDatabase.neutral[trait].forEach(name => names.add(name));
|
393 |
-
}
|
394 |
-
}
|
395 |
-
if (gender === 'all' || gender === 'boy') {
|
396 |
-
if (nameDatabase.boy[trait]) {
|
397 |
-
nameDatabase.boy[trait].forEach(name => names.add(name));
|
398 |
-
}
|
399 |
-
}
|
400 |
-
if (gender === 'all' || gender === 'girl') {
|
401 |
-
if (nameDatabase.girl[trait]) {
|
402 |
-
nameDatabase.girl[trait].forEach(name => names.add(name));
|
403 |
-
}
|
404 |
-
}
|
405 |
-
});
|
406 |
-
|
407 |
-
displayResults(Array.from(names));
|
408 |
-
}
|
409 |
|
410 |
-
|
411 |
-
|
412 |
-
resultsDiv.innerHTML = '<h2>Suggested Names</h2>';
|
413 |
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
|
419 |
-
|
420 |
-
|
421 |
-
nameCard.className = 'name-card';
|
422 |
-
nameCard.style.animationDelay = `${index * 0.1}s`;
|
423 |
-
|
424 |
-
const relatedTraits = findRelatedTraits(name);
|
425 |
-
const meaning = nameMeanings[name] || 'A beautiful name';
|
426 |
-
|
427 |
-
nameCard.innerHTML = `
|
428 |
-
<div class="name-details">
|
429 |
-
<h3>${name}</h3>
|
430 |
-
<div class="name-meaning">${meaning}</div>
|
431 |
-
<div class="personality-tags">
|
432 |
-
${relatedTraits.map(trait =>
|
433 |
-
`<span class="personality-tag">${trait}</span>`
|
434 |
-
).join('')}
|
435 |
-
</div>
|
436 |
-
</div>
|
437 |
-
<button class="favorite-btn" onclick="toggleFavorite('${name}')">
|
438 |
-
${favorites.has(name) ? '❤️' : '🤍'}
|
439 |
-
</button>
|
440 |
-
`;
|
441 |
-
|
442 |
-
resultsDiv.appendChild(nameCard);
|
443 |
-
});
|
444 |
}
|
445 |
|
446 |
-
function
|
447 |
-
|
448 |
-
|
449 |
-
Object.entries(nameDatabase).forEach(([gender, traitGroups]) => {
|
450 |
-
Object.entries(traitGroups).forEach(([trait, names]) => {
|
451 |
-
if (names.includes(name)) {
|
452 |
-
traits.add(trait);
|
453 |
-
}
|
454 |
-
});
|
455 |
-
});
|
456 |
-
|
457 |
-
return Array.from(traits);
|
458 |
-
}
|
459 |
|
460 |
-
|
461 |
-
|
462 |
-
favorites.delete(name);
|
463 |
-
} else {
|
464 |
-
favorites.add(name);
|
465 |
-
}
|
466 |
-
updateFavorites();
|
467 |
-
generateNames(); // Refresh current results
|
468 |
-
}
|
469 |
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
|
474 |
-
|
475 |
-
|
476 |
-
return;
|
477 |
-
}
|
478 |
|
479 |
-
|
480 |
-
|
481 |
-
nameCard.className = 'name-card';
|
482 |
-
const relatedTraits = findRelatedTraits(name);
|
483 |
-
const meaning = nameMeanings[name] || 'A beautiful name';
|
484 |
-
|
485 |
-
nameCard.innerHTML = `
|
486 |
-
<div class="name-details">
|
487 |
-
<h3>${name}</h3>
|
488 |
-
<div class="name-meaning">${meaning}</div>
|
489 |
-
<div class="personality-tags">
|
490 |
-
${relatedTraits.map(trait =>
|
491 |
-
`<span class="personality-tag">${trait}</span>`
|
492 |
-
).join('')}
|
493 |
-
</div>
|
494 |
-
</div>
|
495 |
-
<button class="favorite-btn" onclick="toggleFavorite('${name}')">❤️</button>
|
496 |
-
`;
|
497 |
-
|
498 |
-
favoritesList.appendChild(nameCard);
|
499 |
-
});
|
500 |
}
|
501 |
|
502 |
-
|
503 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
504 |
</script>
|
505 |
</body>
|
506 |
</html>
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Flipper Zero Code Generator</title>
|
7 |
<style>
|
8 |
:root {
|
9 |
+
--primary: #00ff9d;
|
10 |
+
--dark: #1a1a1a;
|
11 |
+
--light: #f0f0f0;
|
12 |
+
--accent: #ff003c;
|
|
|
|
|
13 |
}
|
14 |
|
15 |
* {
|
16 |
margin: 0;
|
17 |
padding: 0;
|
18 |
box-sizing: border-box;
|
19 |
+
font-family: 'Courier New', monospace;
|
20 |
}
|
21 |
|
22 |
body {
|
23 |
+
background: var(--dark);
|
24 |
+
color: var(--light);
|
25 |
+
line-height: 1.6;
|
26 |
padding: 2rem;
|
27 |
}
|
28 |
|
|
|
31 |
margin: 0 auto;
|
32 |
}
|
33 |
|
34 |
+
h1 {
|
35 |
+
color: var(--primary);
|
36 |
text-align: center;
|
|
|
|
|
|
|
|
|
37 |
margin-bottom: 2rem;
|
38 |
+
text-shadow: 0 0 10px rgba(0,255,157,0.5);
|
39 |
}
|
40 |
|
41 |
+
.generator {
|
42 |
+
background: rgba(255,255,255,0.05);
|
43 |
+
padding: 2rem;
|
44 |
+
border-radius: 10px;
|
45 |
+
box-shadow: 0 0 20px rgba(0,0,0,0.3);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
}
|
47 |
|
48 |
+
.form-group {
|
49 |
+
margin-bottom: 1.5rem;
|
50 |
}
|
51 |
|
52 |
+
label {
|
53 |
display: block;
|
54 |
margin-bottom: 0.5rem;
|
55 |
+
color: var(--primary);
|
|
|
56 |
}
|
57 |
|
58 |
select, input {
|
59 |
width: 100%;
|
60 |
padding: 0.75rem;
|
61 |
+
background: var(--dark);
|
62 |
+
border: 1px solid var(--primary);
|
63 |
+
color: var(--light);
|
64 |
+
border-radius: 5px;
|
|
|
|
|
|
|
|
|
65 |
outline: none;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
}
|
67 |
|
68 |
+
select:focus, input:focus {
|
69 |
+
box-shadow: 0 0 10px rgba(0,255,157,0.3);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
}
|
71 |
|
72 |
+
button {
|
73 |
background: var(--primary);
|
74 |
+
color: var(--dark);
|
|
|
75 |
padding: 1rem 2rem;
|
76 |
+
border: none;
|
77 |
+
border-radius: 5px;
|
|
|
78 |
cursor: pointer;
|
79 |
+
font-weight: bold;
|
80 |
transition: all 0.3s ease;
|
81 |
margin-top: 1rem;
|
82 |
}
|
83 |
|
84 |
+
button:hover {
|
85 |
transform: translateY(-2px);
|
86 |
+
box-shadow: 0 5px 15px rgba(0,255,157,0.4);
|
87 |
}
|
88 |
|
89 |
+
.output {
|
90 |
margin-top: 2rem;
|
91 |
+
background: rgba(0,0,0,0.3);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
padding: 1.5rem;
|
93 |
+
border-radius: 5px;
|
94 |
+
position: relative;
|
|
|
|
|
|
|
|
|
95 |
}
|
96 |
|
97 |
+
.code {
|
98 |
+
font-family: 'Courier New', monospace;
|
|
|
|
|
|
|
|
|
99 |
color: var(--primary);
|
100 |
+
white-space: pre-wrap;
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
}
|
102 |
|
103 |
+
.copy-btn {
|
104 |
+
position: absolute;
|
105 |
+
top: 10px;
|
106 |
+
right: 10px;
|
107 |
+
background: var(--accent);
|
108 |
+
color: var(--light);
|
109 |
+
padding: 0.5rem 1rem;
|
|
|
|
|
|
|
|
|
|
|
110 |
font-size: 0.8rem;
|
111 |
}
|
112 |
|
113 |
+
.matrix-bg {
|
114 |
+
position: fixed;
|
115 |
+
top: 0;
|
116 |
+
left: 0;
|
117 |
+
width: 100%;
|
118 |
+
height: 100%;
|
119 |
+
z-index: -1;
|
120 |
+
opacity: 0.1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
}
|
122 |
|
123 |
@media (max-width: 768px) {
|
124 |
+
body {
|
125 |
padding: 1rem;
|
126 |
}
|
|
|
|
|
|
|
|
|
127 |
}
|
128 |
</style>
|
129 |
</head>
|
130 |
<body>
|
131 |
+
<canvas class="matrix-bg" id="matrix"></canvas>
|
132 |
+
|
133 |
<div class="container">
|
134 |
+
<h1>🔓 Flipper Zero Code Generator</h1>
|
135 |
+
|
136 |
+
<div class="generator">
|
137 |
+
<div class="form-group">
|
138 |
+
<label>Attack Type</label>
|
139 |
+
<select id="attackType">
|
140 |
+
<option value="wifi">WiFi Attack</option>
|
141 |
+
<option value="rfid">RFID Clone</option>
|
142 |
+
<option value="subghz">SubGHz Replay</option>
|
143 |
+
<option value="nfc">NFC Manipulation</option>
|
144 |
+
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
</div>
|
146 |
|
147 |
+
<div class="form-group">
|
148 |
+
<label>Target Protocol</label>
|
149 |
+
<select id="protocol">
|
150 |
+
<option value="wpa2">WPA2</option>
|
151 |
+
<option value="wpa3">WPA3</option>
|
152 |
+
<option value="wps">WPS</option>
|
153 |
+
<option value="wep">WEP (Legacy)</option>
|
154 |
+
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
</div>
|
156 |
|
157 |
+
<div class="form-group">
|
158 |
+
<label>Custom Parameters</label>
|
159 |
+
<input type="text" id="params" placeholder="Enter custom parameters">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
</div>
|
|
|
161 |
|
162 |
+
<button onclick="generateCode()">Generate Code</button>
|
|
|
|
|
|
|
|
|
163 |
|
164 |
+
<div class="output" id="output" style="display: none;">
|
165 |
+
<button class="copy-btn" onclick="copyCode()">Copy</button>
|
166 |
+
<pre class="code" id="codeOutput"></pre>
|
167 |
+
</div>
|
168 |
</div>
|
169 |
</div>
|
170 |
|
171 |
<script>
|
172 |
+
// Matrix rain effect
|
173 |
+
const canvas = document.getElementById('matrix');
|
174 |
+
const ctx = canvas.getContext('2d');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
|
176 |
+
canvas.width = window.innerWidth;
|
177 |
+
canvas.height = window.innerHeight;
|
|
|
178 |
|
179 |
+
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#$%^&*';
|
180 |
+
const fontSize = 14;
|
181 |
+
const columns = canvas.width/fontSize;
|
182 |
+
const drops = [];
|
183 |
|
184 |
+
for(let x = 0; x < columns; x++) {
|
185 |
+
drops[x] = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
}
|
187 |
|
188 |
+
function drawMatrix() {
|
189 |
+
ctx.fillStyle = 'rgba(0, 0, 0, 0.05)';
|
190 |
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
|
192 |
+
ctx.fillStyle = '#00ff9d';
|
193 |
+
ctx.font = fontSize + 'px monospace';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
|
195 |
+
for(let i = 0; i < drops.length; i++) {
|
196 |
+
const text = chars[Math.floor(Math.random() * chars.length)];
|
197 |
+
ctx.fillText(text, i*fontSize, drops[i]*fontSize);
|
198 |
|
199 |
+
if(drops[i]*fontSize > canvas.height && Math.random() > 0.975)
|
200 |
+
drops[i] = 0;
|
|
|
|
|
201 |
|
202 |
+
drops[i]++;
|
203 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
}
|
205 |
|
206 |
+
setInterval(drawMatrix, 33);
|
207 |
+
|
208 |
+
// Code generation
|
209 |
+
function generateCode() {
|
210 |
+
const attackType = document.getElementById('attackType').value;
|
211 |
+
const protocol = document.getElementById('protocol').value;
|
212 |
+
const params = document.getElementById('params').value;
|
213 |
+
|
214 |
+
const codeTemplates = {
|
215 |
+
wifi: `Flipper Zero WiFi Attack Script
|
216 |
+
Protocol: ${protocol}
|
217 |
+
Parameters: ${params}
|
218 |
+
|
219 |
+
sub: ${protocol}_attack
|
220 |
+
while(true)
|
221 |
+
wifi_scan()
|
222 |
+
target_found = find_network("${params}")
|
223 |
+
if target_found
|
224 |
+
launch_attack("${protocol}", "${params}")
|
225 |
+
wait(1000)
|
226 |
+
end
|
227 |
+
end
|
228 |
+
`,
|
229 |
+
rfid: `Flipper Zero RFID Clone Script
|
230 |
+
Mode: Read & Emulate
|
231 |
+
Frequency: 125kHz
|
232 |
+
|
233 |
+
sub: clone_card
|
234 |
+
card_data = scan_rfid()
|
235 |
+
if card_data
|
236 |
+
save_data("${params}")
|
237 |
+
emulate(card_data)
|
238 |
+
end
|
239 |
+
`,
|
240 |
+
subghz: `Flipper Zero SubGHz Script
|
241 |
+
Frequency: 433.92MHz
|
242 |
+
Mode: Capture & Replay
|
243 |
+
|
244 |
+
sub: capture_signal
|
245 |
+
while(true)
|
246 |
+
signal = listen(433.92)
|
247 |
+
if signal_detected
|
248 |
+
save_signal("${params}")
|
249 |
+
replay_signal()
|
250 |
+
end
|
251 |
+
end
|
252 |
+
`,
|
253 |
+
nfc: `Flipper Zero NFC Script
|
254 |
+
Mode: Emulation
|
255 |
+
Type: NTAG215
|
256 |
+
|
257 |
+
sub: nfc_routine
|
258 |
+
card = scan_nfc()
|
259 |
+
if card
|
260 |
+
clone_uid("${params}")
|
261 |
+
emulate_tag()
|
262 |
+
end
|
263 |
+
`
|
264 |
+
};
|
265 |
+
|
266 |
+
const output = document.getElementById('output');
|
267 |
+
const codeOutput = document.getElementById('codeOutput');
|
268 |
+
output.style.display = 'block';
|
269 |
+
codeOutput.textContent = codeTemplates[attackType];
|
270 |
+
}
|
271 |
+
|
272 |
+
function copyCode() {
|
273 |
+
const codeOutput = document.getElementById('codeOutput');
|
274 |
+
navigator.clipboard.writeText(codeOutput.textContent);
|
275 |
+
|
276 |
+
const copyBtn = document.querySelector('.copy-btn');
|
277 |
+
copyBtn.textContent = 'Copied!';
|
278 |
+
setTimeout(() => {
|
279 |
+
copyBtn.textContent = 'Copy';
|
280 |
+
}, 2000);
|
281 |
+
}
|
282 |
</script>
|
283 |
</body>
|
284 |
</html>
|