-
Notifications
You must be signed in to change notification settings - Fork 294
Expand file tree
/
Copy pathindex.html
More file actions
795 lines (761 loc) · 49.6 KB
/
index.html
File metadata and controls
795 lines (761 loc) · 49.6 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
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
<!DOCTYPE html>
<html lang="zh-CN" class="scroll-smooth">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>f8x — Red/Blue Team Automation</title>
<meta name="description" content="One script to deploy 108+ security tools on any Linux. Red team, blue team, pentest, cloud — f8x handles it all.">
<link rel="icon" href="./assets/img/favicon.ico">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
bg: '#0B0F19',
surface: '#111827',
'surface-2': '#1F2937',
'surface-3': '#374151',
dim: '#94A3B8',
primary: '#3B82F6',
'primary-dim': '#2563EB',
accent: '#22C55E',
cyber: '#06B6D4',
term: '#0D1117',
'term-bar': '#161B22',
},
fontFamily: {
sans: ['Inter', 'system-ui', 'sans-serif'],
mono: ['"JetBrains Mono"', 'monospace'],
},
}
}
}
</script>
<style>
/* Glassmorphism nav */
.glass-nav {
background: rgba(11, 15, 25, 0.75);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border-bottom: 1px solid rgba(255,255,255,0.06);
}
/* Hero grid background */
.hero-grid {
background-image:
radial-gradient(circle, rgba(59,130,246,0.07) 1px, transparent 1px);
background-size: 24px 24px;
}
/* Hero center glow */
.hero-glow {
background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(59,130,246,0.12) 0%, transparent 70%);
}
/* Gradient heading */
.grad-text {
background: linear-gradient(135deg, #F1F5F9 30%, #3B82F6 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
/* Glow card */
.glow-card {
border: 1px solid rgba(255,255,255,0.06);
transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.glow-card:hover {
border-color: rgba(59,130,246,0.3);
transform: translateY(-2px);
box-shadow: 0 0 24px rgba(59,130,246,0.08);
}
/* Terminal chrome */
.term-dot { width: 12px; height: 12px; border-radius: 50%; }
.term-dot-r { background: #ff5f56; }
.term-dot-y { background: #ffbd2e; }
.term-dot-g { background: #27c93f; }
/* Scroll reveal */
.reveal {
opacity: 0;
transform: translateY(24px);
transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
opacity: 1;
transform: translateY(0);
}
/* Copy toast */
.toast {
opacity: 0;
transform: translateY(8px);
transition: opacity 0.15s ease, transform 0.15s ease;
pointer-events: none;
}
.toast.show {
opacity: 1;
transform: translateY(0);
}
/* Category pill active */
.cat-pill.active {
background: rgba(59,130,246,0.15);
border-color: rgba(59,130,246,0.4);
color: #3B82F6;
}
/* Module card filter transition */
.mod-card {
transition: opacity 0.2s ease, transform 0.2s ease;
}
.mod-card.hidden-filter {
display: none;
}
/* Scrollbar */
.catalog-grid::-webkit-scrollbar { width: 4px; }
.catalog-grid::-webkit-scrollbar-track { background: transparent; }
.catalog-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
/* Nav active link */
.nav-link { position: relative; }
.nav-link.active { color: #3B82F6; }
.nav-link.active::after {
content: '';
position: absolute;
bottom: -4px;
left: 0; right: 0;
height: 2px;
background: #3B82F6;
border-radius: 1px;
}
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
.reveal { transition: none; opacity: 1; transform: none; }
.glow-card { transition: none; }
.toast { transition: none; }
}
/* Install box glow */
.install-box {
border: 1px solid rgba(59,130,246,0.2);
background: rgba(13,17,23,0.8);
box-shadow: 0 0 40px rgba(59,130,246,0.06);
}
/* Scroll indicator bounce */
@keyframes gentle-bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(6px); }
}
.scroll-hint { animation: gentle-bounce 2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
.scroll-hint { animation: none; }
}
</style>
</head>
<body class="bg-bg text-slate-200 font-sans antialiased">
<!-- ══════════ NAV ══════════ -->
<nav class="glass-nav fixed top-0 left-0 right-0 z-50">
<div class="max-w-6xl mx-auto px-4 sm:px-6 h-14 flex items-center justify-between">
<div class="flex items-center gap-6">
<a href="#" class="flex items-center gap-2 group">
<span class="text-xl font-bold font-mono tracking-tighter">
<span class="text-primary">f</span><span class="text-white">8</span><span class="text-primary">x</span>
</span>
<span class="text-xs font-mono text-dim bg-surface-2 px-2 py-0.5 rounded-full" id="navVersion">v1.9.0</span>
</a>
<div class="hidden md:flex items-center gap-5 text-sm text-dim">
<a href="#features" class="nav-link hover:text-white transition-colors cursor-pointer" data-i18n="navFeatures">功能</a>
<a href="#catalog" class="nav-link hover:text-white transition-colors cursor-pointer" data-i18n="navCatalog">工具目录</a>
<a href="#presets" class="nav-link hover:text-white transition-colors cursor-pointer" data-i18n="navPresets">组合方案</a>
<a href="#redc" class="nav-link hover:text-white transition-colors cursor-pointer">redc</a>
<a href="#faq" class="nav-link hover:text-white transition-colors cursor-pointer">FAQ</a>
</div>
</div>
<div class="flex items-center gap-3">
<a href="https://github.com/ffffffff0x/f8x" target="_blank" rel="noreferrer"
class="hidden sm:flex items-center gap-1.5 text-sm text-dim hover:text-white transition-colors cursor-pointer">
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"/></svg>
<span>GitHub</span>
</a>
<button id="langToggle" class="text-xs font-mono text-dim hover:text-white border border-white/10 rounded px-2 py-1 hover:border-primary/40 transition-colors cursor-pointer">
EN
</button>
</div>
</div>
</nav>
<!-- ══════════ HERO ══════════ -->
<section class="relative min-h-screen flex items-center justify-center pt-14 hero-grid">
<div class="hero-glow absolute inset-0 pointer-events-none"></div>
<div class="relative z-10 text-center px-4 max-w-3xl mx-auto">
<div class="mb-6">
<span class="inline-flex items-center gap-2 text-xs font-mono text-dim bg-surface/60 border border-white/10 rounded-full px-3 py-1">
<span class="w-1.5 h-1.5 rounded-full bg-accent animate-pulse"></span>
<span data-i18n="heroBadge">开源 · Apache-2.0 · 持续维护</span>
</span>
</div>
<h1 class="text-4xl sm:text-5xl md:text-6xl font-bold tracking-tight leading-tight mb-4">
<span class="grad-text" data-i18n="heroTitle">红蓝队环境<br>自动化部署工具</span>
</h1>
<p class="text-base sm:text-lg text-dim max-w-xl mx-auto mb-8 leading-relaxed">
<span id="heroModuleCount" class="text-white font-semibold">108</span>
<span data-i18n="heroDesc"> 款安全工具,一条命令部署。覆盖渗透、防御、开发、云原生。</span>
</p>
<div class="install-box rounded-xl px-4 py-3 sm:px-6 sm:py-4 max-w-4xl mx-auto mb-6 font-mono text-sm cursor-pointer group relative"
id="installBox" role="button" tabindex="0" aria-label="Copy install command">
<div class="flex items-center gap-3">
<span class="text-accent select-none">$</span>
<code class="text-slate-300 text-xs sm:text-sm select-all whitespace-nowrap overflow-x-auto">wget -O f8x https://f8x.wgpsec.org/f8x && chmod +x f8x && bash f8x -h</code>
<svg class="w-4 h-4 text-dim group-hover:text-primary transition-colors flex-shrink-0 ml-auto" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>
</div>
<div class="toast absolute -top-10 left-1/2 -translate-x-1/2 bg-accent text-bg text-xs font-sans font-medium px-3 py-1.5 rounded-lg" id="copyToast">
<span data-i18n="copied">已复制!</span>
</div>
</div>
<div class="flex flex-wrap items-center justify-center gap-3">
<a href="https://github.com/ffffffff0x/f8x" target="_blank" rel="noreferrer"
class="inline-flex items-center gap-2 bg-primary hover:bg-primary-dim text-white text-sm font-medium px-5 py-2.5 rounded-lg transition-colors cursor-pointer">
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 22v-4a4.8 4.8 0 00-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 004 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65S8.93 17.38 9 18v4"/><path d="M9 18c-4.51 2-5-2-7-2"/></svg>
<span data-i18n="ctaGithub">查看源码</span>
</a>
<a href="https://f8x.wgpsec.org/f8x" download
class="inline-flex items-center gap-2 border border-white/15 hover:border-primary/40 text-dim hover:text-white text-sm font-medium px-5 py-2.5 rounded-lg transition-colors cursor-pointer">
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
<span data-i18n="ctaDownload">下载脚本</span>
</a>
</div>
</div>
<a href="#features" class="absolute bottom-8 left-1/2 -translate-x-1/2 scroll-hint cursor-pointer hover:text-primary transition-colors">
<svg class="w-5 h-5 text-dim" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>
</a>
</section>
<main class="max-w-6xl mx-auto px-4 sm:px-6">
<!-- ══════════ FEATURES BENTO GRID ══════════ -->
<section id="features" class="py-20 reveal">
<div class="text-center mb-12">
<h2 class="text-2xl sm:text-3xl font-bold mb-3" data-i18n="featTitle">为什么选择 f8x</h2>
<p class="text-dim text-sm max-w-lg mx-auto" data-i18n="featSub">一键部署,无需手动配置每个工具的依赖与编译环境</p>
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
<!-- Card 1 -->
<div class="glow-card bg-surface rounded-2xl p-6">
<div class="w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center mb-3">
<svg class="w-5 h-5 text-primary" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2L2 7l10 5 10-5-10-5z"/><path d="M2 17l10 5 10-5"/><path d="M2 12l10 5 10-5"/></svg>
</div>
<h3 class="font-semibold text-white mb-1" data-i18n="feat1t">多场景覆盖</h3>
<p class="text-dim text-sm leading-relaxed" data-i18n="feat1b">红队渗透、蓝队防御、开发环境、云原生、安全靶场 — 一套脚本覆盖全部场景</p>
</div>
<!-- Card 2 -->
<div class="glow-card bg-surface rounded-2xl p-6">
<div class="w-10 h-10 rounded-xl bg-accent/10 flex items-center justify-center mb-3">
<svg class="w-5 h-5 text-accent" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"/></svg>
</div>
<h3 class="font-semibold text-white mb-1" data-i18n="feat2t">即装即用</h3>
<p class="text-dim text-sm leading-relaxed" data-i18n="feat2b">自动检测 OS 和依赖,按需编译或拉取二进制,支持主流 Linux 发行版 + arm64</p>
</div>
<!-- Card 3 -->
<div class="glow-card bg-surface rounded-2xl p-6">
<div class="w-10 h-10 rounded-xl bg-cyber/10 flex items-center justify-center mb-3">
<svg class="w-5 h-5 text-cyber" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="4" y1="21" x2="4" y2="14"/><line x1="4" y1="10" x2="4" y2="3"/><line x1="12" y1="21" x2="12" y2="12"/><line x1="12" y1="8" x2="12" y2="3"/><line x1="20" y1="21" x2="20" y2="16"/><line x1="20" y1="12" x2="20" y2="3"/><line x1="1" y1="14" x2="7" y2="14"/><line x1="9" y1="8" x2="15" y2="8"/><line x1="17" y1="16" x2="23" y2="16"/></svg>
</div>
<h3 class="font-semibold text-white mb-1" data-i18n="feat3t">可插拔选项</h3>
<p class="text-dim text-sm leading-relaxed" data-i18n="feat3b">108+ 独立 flag,按需组合,减少重复配置</p>
</div>
<!-- Card 4 -->
<div class="glow-card bg-surface rounded-2xl p-6">
<div class="w-10 h-10 rounded-xl bg-amber-500/10 flex items-center justify-center mb-3">
<svg class="w-5 h-5 text-amber-400" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="6" y1="3" x2="6" y2="15"/><circle cx="18" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><path d="M18 9a9 9 0 0 1-9 9"/></svg>
</div>
<h3 class="font-semibold text-white mb-1" data-i18n="feat4t">CI/CD 友好</h3>
<p class="text-dim text-sm leading-relaxed" data-i18n="feat4b">创建 /tmp/IS_CI 即可非交互运行,完美适配 GitHub Actions、GitLab CI 等流水线</p>
</div>
</div>
</section>
<!-- ══════════ TOOL CATALOG ══════════ -->
<section id="catalog" class="py-20 reveal">
<div class="text-center mb-8">
<h2 class="text-2xl sm:text-3xl font-bold mb-3" data-i18n="catalogTitle">工具目录</h2>
<p class="text-dim text-sm" id="catalogStats">
<span id="catalogCount">108</span> <span data-i18n="catalogModules">个模块,覆盖</span> <span id="catalogCats">10</span> <span data-i18n="catalogCategories">个分类</span>
</p>
</div>
<!-- Search -->
<div class="max-w-md mx-auto mb-6">
<div class="relative">
<svg class="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-dim" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
<input type="text" id="catalogSearch" placeholder="Search tools..." data-i18n-placeholder="catalogSearch"
class="w-full bg-surface border border-white/10 rounded-lg pl-10 pr-4 py-2.5 text-sm text-white placeholder:text-dim focus:outline-none focus:border-primary/50 focus:ring-1 focus:ring-primary/20 transition-colors">
</div>
</div>
<!-- Category filters -->
<div class="flex flex-wrap justify-center gap-2 mb-8" id="catFilters">
<!-- Populated by JS -->
</div>
<!-- Module grid -->
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 catalog-grid" id="catalogGrid" style="max-height: 600px; overflow-y: auto; padding-right: 4px;">
<!-- Populated by JS -->
</div>
<div class="text-center mt-4">
<button id="catalogExpand" class="text-sm text-dim hover:text-primary transition-colors cursor-pointer hidden" data-i18n="showAll">
显示全部
</button>
</div>
</section>
<!-- ══════════ PRESETS ══════════ -->
<section id="presets" class="py-20 reveal">
<div class="text-center mb-12">
<h2 class="text-2xl sm:text-3xl font-bold mb-3" data-i18n="presetsTitle">快速组合方案</h2>
<p class="text-dim text-sm" data-i18n="presetsSub">常用场景的一键部署命令</p>
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
<!-- Preset 1 -->
<div class="glow-card bg-surface rounded-xl p-5 group">
<div class="flex items-center gap-2 mb-3">
<div class="w-2 h-2 rounded-full bg-red-400"></div>
<span class="text-sm font-semibold text-white" data-i18n="presetReconTitle">渗透全套</span>
</div>
<p class="text-xs text-dim mb-3" data-i18n="presetReconDesc">安装全部侦查 + 利用工具</p>
<div class="bg-term rounded-lg px-3 py-2 font-mono text-xs flex items-center justify-between">
<code><span class="text-accent">$</span> <span class="text-slate-300">f8x -ka -kb</span></code>
<button class="copy-btn text-dim hover:text-primary transition-colors cursor-pointer p-1" data-cmd="f8x -ka -kb" aria-label="Copy command">
<svg class="w-3.5 h-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>
</button>
</div>
</div>
<!-- Preset 2 -->
<div class="glow-card bg-surface rounded-xl p-5 group">
<div class="flex items-center gap-2 mb-3">
<div class="w-2 h-2 rounded-full bg-green-400"></div>
<span class="text-sm font-semibold text-white" data-i18n="presetDevTitle">开发环境</span>
</div>
<p class="text-xs text-dim mb-3" data-i18n="presetDevDesc">Python3, Go, Docker, Node.js, SDKMAN</p>
<div class="bg-term rounded-lg px-3 py-2 font-mono text-xs flex items-center justify-between">
<code><span class="text-accent">$</span> <span class="text-slate-300">f8x -d</span></code>
<button class="copy-btn text-dim hover:text-primary transition-colors cursor-pointer p-1" data-cmd="f8x -d" aria-label="Copy command">
<svg class="w-3.5 h-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>
</button>
</div>
</div>
<!-- Preset 3 -->
<div class="glow-card bg-surface rounded-xl p-5 group">
<div class="flex items-center gap-2 mb-3">
<div class="w-2 h-2 rounded-full bg-blue-400"></div>
<span class="text-sm font-semibold text-white" data-i18n="presetBlueTitle">蓝队防御</span>
</div>
<p class="text-xs text-dim mb-3" data-i18n="presetBlueDesc">Fail2Ban, rkhunter, anti-portscan</p>
<div class="bg-term rounded-lg px-3 py-2 font-mono text-xs flex items-center justify-between">
<code><span class="text-accent">$</span> <span class="text-slate-300">f8x -s</span></code>
<button class="copy-btn text-dim hover:text-primary transition-colors cursor-pointer p-1" data-cmd="f8x -s" aria-label="Copy command">
<svg class="w-3.5 h-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>
</button>
</div>
</div>
<!-- Preset 4 -->
<div class="glow-card bg-surface rounded-xl p-5 group">
<div class="flex items-center gap-2 mb-3">
<div class="w-2 h-2 rounded-full bg-red-400"></div>
<span class="text-sm font-semibold text-white" data-i18n="presetC2Title">C2 快速部署</span>
</div>
<p class="text-xs text-dim mb-3" data-i18n="presetC2Desc">CobaltStrike + frp + RedGuard</p>
<div class="bg-term rounded-lg px-3 py-2 font-mono text-xs flex items-center justify-between">
<code><span class="text-accent">$</span> <span class="text-slate-300">f8x -cs45 -frp -rg</span></code>
<button class="copy-btn text-dim hover:text-primary transition-colors cursor-pointer p-1" data-cmd="f8x -cs45 -frp -rg" aria-label="Copy command">
<svg class="w-3.5 h-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>
</button>
</div>
</div>
<!-- Preset 5 -->
<div class="glow-card bg-surface rounded-xl p-5 group">
<div class="flex items-center gap-2 mb-3">
<div class="w-2 h-2 rounded-full bg-slate-400"></div>
<span class="text-sm font-semibold text-white" data-i18n="presetBasicTitle">基础环境</span>
</div>
<p class="text-xs text-dim mb-3" data-i18n="presetBasicDesc">基础工具 + SSH + Zsh</p>
<div class="bg-term rounded-lg px-3 py-2 font-mono text-xs flex items-center justify-between">
<code><span class="text-accent">$</span> <span class="text-slate-300">f8x -b -ssh -zsh</span></code>
<button class="copy-btn text-dim hover:text-primary transition-colors cursor-pointer p-1" data-cmd="f8x -b -ssh -zsh" aria-label="Copy command">
<svg class="w-3.5 h-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>
</button>
</div>
</div>
<!-- Preset 6 -->
<div class="glow-card bg-surface rounded-xl p-5 group">
<div class="flex items-center gap-2 mb-3">
<div class="w-2 h-2 rounded-full bg-cyan-400"></div>
<span class="text-sm font-semibold text-white" data-i18n="presetReconLightTitle">轻量侦查</span>
</div>
<p class="text-xs text-dim mb-3" data-i18n="presetReconLightDesc">nmap, httpx, subfinder, ffuf ...</p>
<div class="bg-term rounded-lg px-3 py-2 font-mono text-xs flex items-center justify-between">
<code><span class="text-accent">$</span> <span class="text-slate-300">f8x -ka</span></code>
<button class="copy-btn text-dim hover:text-primary transition-colors cursor-pointer p-1" data-cmd="f8x -ka" aria-label="Copy command">
<svg class="w-3.5 h-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>
</button>
</div>
</div>
</div>
</section>
<!-- ══════════ REDC INTEGRATION ══════════ -->
<section id="redc" class="py-20 reveal">
<div class="glow-card bg-surface rounded-2xl p-6 sm:p-10">
<div class="grid md:grid-cols-2 gap-8 items-center">
<div>
<div class="flex items-center gap-2 mb-4">
<div class="w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center">
<svg class="w-4 h-4 text-primary" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>
</div>
<h2 class="text-xl sm:text-2xl font-bold" data-i18n="redcTitle">redc × f8x 融合</h2>
</div>
<p class="text-dim text-sm leading-relaxed mb-6" data-i18n="redcDesc">redc 是一个桌面级多云管理平台,内置 f8x 软件商店。通过 GUI 一键部署 f8x 的全部工具到任意远程主机。</p>
<a href="https://github.com/ffffffff0x/redc" target="_blank" rel="noreferrer"
class="inline-flex items-center gap-2 text-sm text-primary hover:text-primary-dim transition-colors cursor-pointer">
<span data-i18n="redcLink">了解 redc</span>
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="7" y1="17" x2="17" y2="7"/><polyline points="7 7 17 7 17 17"/></svg>
</a>
</div>
<div class="grid grid-cols-2 gap-3">
<div class="bg-bg rounded-xl p-4 border border-white/5">
<div class="w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center mb-2">
<svg class="w-4 h-4 text-primary" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>
</div>
<span class="text-xs font-medium text-white" data-i18n="redcFeat1">GUI 管理面板</span>
</div>
<div class="bg-bg rounded-xl p-4 border border-white/5">
<div class="w-8 h-8 rounded-lg bg-accent/10 flex items-center justify-center mb-2">
<svg class="w-4 h-4 text-accent" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.66 0 3-4.03 3-9s-1.34-9-3-9m0 18c-1.66 0-3-4.03-3-9s1.34-9 3-9"/></svg>
</div>
<span class="text-xs font-medium text-white" data-i18n="redcFeat2">多云远程部署</span>
</div>
<div class="bg-bg rounded-xl p-4 border border-white/5">
<div class="w-8 h-8 rounded-lg bg-cyber/10 flex items-center justify-center mb-2">
<svg class="w-4 h-4 text-cyber" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>
</div>
<span class="text-xs font-medium text-white" data-i18n="redcFeat3">AI 智能运维</span>
</div>
<div class="bg-bg rounded-xl p-4 border border-white/5">
<div class="w-8 h-8 rounded-lg bg-amber-500/10 flex items-center justify-center mb-2">
<svg class="w-4 h-4 text-amber-400" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"/><line x1="4" y1="22" x2="4" y2="15"/></svg>
</div>
<span class="text-xs font-medium text-white" data-i18n="redcFeat4">f8x 软件商店</span>
</div>
</div>
</div>
</div>
</section>
<!-- ══════════ FAQ ══════════ -->
<section id="faq" class="py-20 reveal">
<div class="text-center mb-12">
<h2 class="text-2xl sm:text-3xl font-bold mb-3">FAQ</h2>
<p class="text-dim text-sm" data-i18n="faqSub">常见问题</p>
</div>
<div class="max-w-2xl mx-auto space-y-4">
<div class="glow-card bg-surface rounded-xl px-5 py-5">
<h3 class="text-sm font-medium text-white mb-2" data-i18n="faq1q">f8x 支持哪些操作系统?</h3>
<p class="text-sm text-dim leading-relaxed" data-i18n="faq1a">支持 Ubuntu, Debian, CentOS, Fedora, Kali, AlmaLinux, Rocky Linux 等主流发行版,同时支持 x86_64 和 arm64 架构。</p>
</div>
<div class="glow-card bg-surface rounded-xl px-5 py-5">
<h3 class="text-sm font-medium text-white mb-2" data-i18n="faq2q">如何在 CI/CD 中使用?</h3>
<p class="text-sm text-dim leading-relaxed" data-i18n="faq2a">在执行 f8x 之前创建 /tmp/IS_CI 文件即可跳过所有交互确认:touch /tmp/IS_CI && bash f8x -b</p>
</div>
<div class="glow-card bg-surface rounded-xl px-5 py-5">
<h3 class="text-sm font-medium text-white mb-2" data-i18n="faq3q">f8x 和 f8x-ctf 有什么区别?</h3>
<p class="text-sm text-dim leading-relaxed" data-i18n="faq3a">f8x 是通用版本,适合日常渗透和运维;f8x-ctf 是 CTF 竞赛专用版,预装了 CTF 常用工具如 pwntools, z3, sage 等。</p>
</div>
<div class="glow-card bg-surface rounded-xl px-5 py-5">
<h3 class="text-sm font-medium text-white mb-2" data-i18n="faq4q">安装过程中遇到问题怎么办?</h3>
<p class="text-sm text-dim leading-relaxed" data-i18n="faq4a">请在 GitHub 提交 Issue,附上系统信息(f8x -info 输出)和错误日志。社区会尽快响应。</p>
</div>
<div class="glow-card bg-surface rounded-xl px-5 py-5">
<h3 class="text-sm font-medium text-white mb-2" data-i18n="faq5q">如何更新 f8x 到最新版本?</h3>
<p class="text-sm text-dim leading-relaxed" data-i18n="faq5a">运行 f8x -update 即可自动更新到最新版本。也可以重新下载脚本覆盖。</p>
</div>
</div>
</section>
</main>
<!-- ══════════ FOOTER ══════════ -->
<footer class="border-t border-white/5 py-10 mt-10">
<div class="max-w-6xl mx-auto px-4 sm:px-6">
<div class="flex flex-col sm:flex-row items-center justify-between gap-4">
<div class="flex items-center gap-3">
<span class="text-lg font-bold font-mono tracking-tighter">
<span class="text-primary">f</span><span class="text-white">8</span><span class="text-primary">x</span>
</span>
<span class="text-xs text-dim">Apache-2.0</span>
</div>
<div class="flex items-center gap-4 text-xs text-dim">
<a href="https://github.com/ffffffff0x/f8x" target="_blank" rel="noreferrer" class="hover:text-white transition-colors cursor-pointer">GitHub</a>
<a href="https://github.com/ffffffff0x/f8x/blob/main/CHANGELOG.md" target="_blank" rel="noreferrer" class="hover:text-white transition-colors cursor-pointer">Changelog</a>
<a href="https://github.com/ffffffff0x" target="_blank" rel="noreferrer" class="hover:text-white transition-colors cursor-pointer">ffffffff0x</a>
<a href="https://www.wgpsec.org" target="_blank" rel="noreferrer" class="hover:text-white transition-colors cursor-pointer">WgpSec</a>
</div>
<p class="text-xs text-dim/60">
Made by <a href="https://github.com/ffffffff0x" target="_blank" rel="noreferrer" class="hover:text-dim transition-colors">ffffffff0x</a> Team
</p>
</div>
</div>
</footer>
<!-- ══════════ JAVASCRIPT ══════════ -->
<script>
(function() {
'use strict';
// ── i18n ──
const LANG = {
zh: {
navFeatures: '功能', navCatalog: '工具目录', navPresets: '组合方案',
heroBadge: '开源 · Apache-2.0 · 持续维护',
heroTitle: '红蓝队环境<br>自动化部署工具',
heroDesc: ' 款安全工具,一条命令部署。覆盖渗透、防御、开发、云原生。',
ctaGithub: '查看源码', ctaDownload: '下载脚本', copied: '已复制!',
featTitle: '为什么选择 f8x', featSub: '一键部署,无需手动配置每个工具的依赖与编译环境',
feat1t: '多场景覆盖', feat1b: '红队渗透、蓝队防御、开发环境、云原生、安全靶场 — 一套脚本覆盖全部场景,告别逐个安装的痛苦',
feat2t: '即装即用', feat2b: '自动检测 OS 和依赖,按需编译或拉取二进制,支持主流 Linux 发行版 + arm64',
feat3t: '可插拔选项', feat3b: '108+ 独立 flag,按需组合,减少重复配置',
feat4t: 'CI/CD 友好', feat4b: '创建 /tmp/IS_CI 即可非交互运行,完美适配 GitHub Actions、GitLab CI 等自动化流水线',
catalogTitle: '工具目录', catalogModules: '个模块,覆盖', catalogCategories: '个分类',
catalogSearch: '搜索工具...', showAll: '显示全部', collapseAll: '收起',
presetsTitle: '快速组合方案', presetsSub: '常用场景的一键部署命令',
presetReconTitle: '渗透全套', presetReconDesc: '安装全部侦查 + 利用工具',
presetDevTitle: '开发环境', presetDevDesc: 'Python3, Go, Docker, Node.js, SDKMAN',
presetBlueTitle: '蓝队防御', presetBlueDesc: 'Fail2Ban, rkhunter, anti-portscan',
presetC2Title: 'C2 快速部署', presetC2Desc: 'CobaltStrike + frp + RedGuard',
presetBasicTitle: '基础环境', presetBasicDesc: '基础工具 + SSH + Zsh',
presetReconLightTitle: '轻量侦查', presetReconLightDesc: 'nmap, httpx, subfinder, ffuf ...',
redcTitle: 'redc × f8x 融合', redcDesc: 'redc 是一个桌面级多云管理平台,内置 f8x 软件商店。通过 GUI 一键部署 f8x 的全部工具到任意远程主机。',
redcLink: '了解 redc', redcFeat1: 'GUI 管理面板', redcFeat2: '多云远程部署', redcFeat3: 'AI 智能运维', redcFeat4: 'f8x 软件商店',
faqSub: '常见问题',
faq1q: 'f8x 支持哪些操作系统?', faq1a: '支持 Ubuntu, Debian, CentOS, Fedora, Kali, AlmaLinux, Rocky Linux 等主流发行版,同时支持 x86_64 和 arm64 架构。',
faq2q: '如何在 CI/CD 中使用?', faq2a: '在执行 f8x 之前创建 /tmp/IS_CI 文件即可跳过所有交互确认:touch /tmp/IS_CI && bash f8x -b',
faq3q: 'f8x 和 f8x-ctf 有什么区别?', faq3a: 'f8x 是通用版本,适合日常渗透和运维;f8x-ctf 是 CTF 竞赛专用版,预装了 CTF 常用工具如 pwntools, z3, sage 等。',
faq4q: '安装过程中遇到问题怎么办?', faq4a: '请在 GitHub 提交 Issue,附上系统信息(f8x -info 输出)和错误日志。社区会尽快响应。',
faq5q: '如何更新 f8x 到最新版本?', faq5a: '运行 f8x -update 即可自动更新到最新版本。也可以重新下载脚本覆盖。',
},
en: {
navFeatures: 'Features', navCatalog: 'Catalog', navPresets: 'Presets',
heroBadge: 'Open Source · Apache-2.0 · Actively Maintained',
heroTitle: 'Red/Blue Team<br>Automation Toolkit',
heroDesc: ' security tools deployed with one command. Covers pentest, defense, dev, and cloud.',
ctaGithub: 'View Source', ctaDownload: 'Download Script', copied: 'Copied!',
featTitle: 'Why f8x', featSub: 'One-click deployment — no manual dependency configuration needed',
feat1t: 'Multi-Scenario', feat1b: 'Red team, blue team, dev env, cloud native, vuln labs — one script covers all scenarios',
feat2t: 'Ready to Use', feat2b: 'Auto-detects OS and deps, compiles or pulls binaries on demand. Supports major Linux distros + arm64',
feat3t: 'Modular Flags', feat3b: '108+ independent flags, combine as needed, minimize repeated setup',
feat4t: 'CI/CD Friendly', feat4b: 'Create /tmp/IS_CI for non-interactive mode, works with GitHub Actions, GitLab CI and more',
catalogTitle: 'Tool Catalog', catalogModules: ' modules across ', catalogCategories: ' categories',
catalogSearch: 'Search tools...', showAll: 'Show all', collapseAll: 'Collapse',
presetsTitle: 'Quick Presets', presetsSub: 'One-liner commands for common scenarios',
presetReconTitle: 'Full Pentest', presetReconDesc: 'All recon + exploitation tools',
presetDevTitle: 'Dev Environment', presetDevDesc: 'Python3, Go, Docker, Node.js, SDKMAN',
presetBlueTitle: 'Blue Team', presetBlueDesc: 'Fail2Ban, rkhunter, anti-portscan',
presetC2Title: 'C2 Quick Deploy', presetC2Desc: 'CobaltStrike + frp + RedGuard',
presetBasicTitle: 'Basic Setup', presetBasicDesc: 'Basic tools + SSH + Zsh',
presetReconLightTitle: 'Light Recon', presetReconLightDesc: 'nmap, httpx, subfinder, ffuf ...',
redcTitle: 'redc × f8x Integration', redcDesc: 'redc is a desktop multi-cloud management platform with a built-in f8x software store. Deploy all f8x tools to any remote host via GUI.',
redcLink: 'Learn about redc', redcFeat1: 'GUI Dashboard', redcFeat2: 'Multi-Cloud Deploy', redcFeat3: 'AI Operations', redcFeat4: 'f8x App Store',
faqSub: 'Frequently Asked Questions',
faq1q: 'What OS does f8x support?', faq1a: 'Supports Ubuntu, Debian, CentOS, Fedora, Kali, AlmaLinux, Rocky Linux and more. Both x86_64 and arm64 architectures.',
faq2q: 'How to use in CI/CD?', faq2a: 'Create /tmp/IS_CI before running f8x to skip all interactive prompts: touch /tmp/IS_CI && bash f8x -b',
faq3q: 'Difference between f8x and f8x-ctf?', faq3a: 'f8x is the general version for daily pentest and ops; f8x-ctf is CTF-specific with pre-installed tools like pwntools, z3, sage.',
faq4q: 'What if I encounter issues?', faq4a: 'Submit a GitHub Issue with your system info (f8x -info output) and error log. The community will respond promptly.',
faq5q: 'How to update f8x?', faq5a: 'Run f8x -update to auto-update. Or re-download the script to overwrite.',
}
};
const CATEGORIES = {
'basic': { name: 'Basic', nameZh: '基础环境', color: 'bg-blue-500/15 text-blue-400 border-blue-500/20' },
'development': { name: 'Development', nameZh: '开发工具', color: 'bg-green-500/15 text-green-400 border-green-500/20' },
'pentest-recon': { name: 'Recon', nameZh: '侦查', color: 'bg-cyan-500/15 text-cyan-400 border-cyan-500/20' },
'pentest-exploit': { name: 'Exploit', nameZh: '利用', color: 'bg-red-500/15 text-red-400 border-red-500/20' },
'pentest-post': { name: 'Post-Exploit', nameZh: '后渗透', color: 'bg-orange-500/15 text-orange-400 border-orange-500/20' },
'red-infra': { name: 'Red Infra', nameZh: '红队基建', color: 'bg-red-500/15 text-red-400 border-red-500/20' },
'blue-team': { name: 'Blue Team', nameZh: '蓝队防御', color: 'bg-blue-500/15 text-blue-400 border-blue-500/20' },
'vuln-env': { name: 'Vuln Env', nameZh: '靶场环境', color: 'bg-amber-500/15 text-amber-400 border-amber-500/20' },
'system': { name: 'System', nameZh: '系统工具', color: 'bg-slate-500/15 text-slate-400 border-slate-500/20' },
'misc': { name: 'Misc', nameZh: '杂项', color: 'bg-slate-500/15 text-slate-400 border-slate-500/20' },
};
let currentLang = 'zh';
let catalogData = [];
let activeCategory = 'all';
let catalogExpanded = false;
// ── Apply language ──
function applyLang(lang) {
currentLang = lang;
const dict = LANG[lang];
document.querySelectorAll('[data-i18n]').forEach(el => {
const key = el.getAttribute('data-i18n');
if (dict[key]) el.innerHTML = dict[key];
});
document.querySelectorAll('[data-i18n-placeholder]').forEach(el => {
const key = el.getAttribute('data-i18n-placeholder');
if (dict[key]) el.placeholder = dict[key];
});
document.getElementById('langToggle').textContent = lang === 'zh' ? 'EN' : '中文';
if (catalogData.length) renderCatalog();
}
document.getElementById('langToggle').addEventListener('click', () => {
applyLang(currentLang === 'zh' ? 'en' : 'zh');
});
// ── Catalog ──
function fetchCatalog() {
fetch('./catalog.json?t=' + Date.now())
.then(r => r.json())
.then(data => {
catalogData = data.modules || [];
const ver = data.version || 'v1.9.0';
document.getElementById('navVersion').textContent = 'v' + ver.split(' ')[0].replace(/^v/, '');
document.getElementById('heroModuleCount').textContent = catalogData.length;
document.getElementById('catalogCount').textContent = catalogData.length;
const cats = new Set(catalogData.map(m => m.category));
document.getElementById('catalogCats').textContent = cats.size;
renderCatFilters();
renderCatalog();
})
.catch(() => {
renderCatFilters();
renderCatalog();
});
}
function renderCatFilters() {
const container = document.getElementById('catFilters');
const counts = {};
catalogData.forEach(m => { counts[m.category] = (counts[m.category] || 0) + 1; });
let html = '<button class="cat-pill active text-xs font-mono px-3 py-1.5 rounded-full border border-white/10 cursor-pointer transition-colors" data-cat="all">All (' + catalogData.length + ')</button>';
Object.entries(CATEGORIES).forEach(([key, cat]) => {
if (counts[key]) {
const label = currentLang === 'zh' ? cat.nameZh : cat.name;
html += '<button class="cat-pill text-xs font-mono px-3 py-1.5 rounded-full border border-white/10 text-dim hover:text-white cursor-pointer transition-colors" data-cat="' + key + '">' + label + ' (' + counts[key] + ')</button>';
}
});
container.innerHTML = html;
container.querySelectorAll('.cat-pill').forEach(btn => {
btn.addEventListener('click', () => {
container.querySelectorAll('.cat-pill').forEach(b => b.classList.remove('active'));
btn.classList.add('active');
activeCategory = btn.getAttribute('data-cat');
renderCatalog();
});
});
}
function renderCatalog() {
const grid = document.getElementById('catalogGrid');
const search = (document.getElementById('catalogSearch').value || '').toLowerCase();
let filtered = catalogData.filter(m => {
const catMatch = activeCategory === 'all' || m.category === activeCategory;
const includesMatch = (m.includes || []).some(t => t.name.toLowerCase().includes(search));
const searchMatch = !search ||
m.name.toLowerCase().includes(search) ||
m.flag.toLowerCase().includes(search) ||
(m.description || '').toLowerCase().includes(search) ||
(m.descriptionZh || '').toLowerCase().includes(search) ||
includesMatch;
return catMatch && searchMatch;
});
if (!filtered.length) {
grid.innerHTML = '<div class="col-span-full text-center py-12 text-dim text-sm">' + (currentLang === 'zh' ? '未找到匹配的工具' : 'No matching tools found') + '</div>';
return;
}
grid.innerHTML = filtered.map(m => {
const cat = CATEGORIES[m.category] || CATEGORIES['misc'];
const catLabel = currentLang === 'zh' ? cat.nameZh : cat.name;
const desc = currentLang === 'zh' ? (m.descriptionZh || m.description) : m.description;
const isBatch = (m.tags || []).includes('batch');
const hasIncludes = isBatch && m.includes && m.includes.length > 0;
let includesHtml = '';
if (hasIncludes) {
const toggleLabel = currentLang === 'zh' ? '包含 ' + m.includes.length + ' 个工具' : m.includes.length + ' tools included';
includesHtml = '<div class="mt-2 pt-2 border-t border-white/5">' +
'<button onclick="this.nextElementSibling.classList.toggle(\'hidden\');this.querySelector(\'svg\').classList.toggle(\'rotate-180\')" class="text-[10px] text-dim hover:text-primary transition-colors cursor-pointer inline-flex items-center gap-1">' +
'<svg class="w-3 h-3 transition-transform" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5"/></svg>' +
toggleLabel +
'</button>' +
'<div class="hidden mt-1.5 flex flex-wrap gap-1">' +
m.includes.map(t => t.url
? '<a href="' + t.url + '" target="_blank" rel="noopener noreferrer" class="text-[9px] px-1.5 py-0.5 rounded bg-white/5 border border-white/10 text-dim hover:border-primary/30 hover:text-primary transition-colors cursor-pointer">' + t.name + '</a>'
: '<span class="text-[9px] px-1.5 py-0.5 rounded bg-white/5 border border-white/10 text-dim">' + t.name + '</span>'
).join('') +
'</div>' +
'</div>';
}
return '<div class="mod-card bg-surface rounded-xl p-4 border border-white/5 hover:border-primary/20 transition-all">' +
'<div class="flex items-center gap-2 mb-2">' +
'<code class="text-primary font-mono text-xs">' + m.flag + '</code>' +
'<span class="text-[10px] font-mono px-1.5 py-0.5 rounded-full border ' + cat.color + '">' + catLabel + '</span>' +
(isBatch ? '<span class="text-[9px] px-1.5 py-0.5 rounded bg-amber-500/15 text-amber-400 border border-amber-500/20 font-medium">SUITE</span>' : '') +
'</div>' +
'<p class="text-xs text-dim leading-relaxed">' + (desc || m.name) + '</p>' +
includesHtml +
'</div>';
}).join('');
// Show/hide expand button
const expandBtn = document.getElementById('catalogExpand');
if (!catalogExpanded && filtered.length > 30) {
grid.style.maxHeight = '600px';
expandBtn.classList.remove('hidden');
expandBtn.textContent = LANG[currentLang].showAll;
} else {
grid.style.maxHeight = 'none';
expandBtn.classList.add('hidden');
}
}
document.getElementById('catalogSearch').addEventListener('input', renderCatalog);
document.getElementById('catalogExpand').addEventListener('click', function() {
const grid = document.getElementById('catalogGrid');
catalogExpanded = !catalogExpanded;
if (catalogExpanded) {
grid.style.maxHeight = 'none';
this.textContent = LANG[currentLang].collapseAll;
} else {
grid.style.maxHeight = '600px';
this.textContent = LANG[currentLang].showAll;
grid.scrollTop = 0;
}
});
// ── Copy to clipboard ──
const installBox = document.getElementById('installBox');
installBox.addEventListener('click', () => {
const cmd = 'wget -O f8x https://f8x.wgpsec.org/f8x && chmod +x f8x && bash f8x -h';
navigator.clipboard.writeText(cmd).then(() => showToast('copyToast'));
});
installBox.addEventListener('keydown', e => {
if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); installBox.click(); }
});
document.querySelectorAll('.copy-btn').forEach(btn => {
btn.addEventListener('click', e => {
e.stopPropagation();
const cmd = btn.getAttribute('data-cmd');
navigator.clipboard.writeText(cmd).then(() => {
btn.innerHTML = '<svg class="w-3.5 h-3.5 text-accent" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>';
setTimeout(() => {
btn.innerHTML = '<svg class="w-3.5 h-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"/></svg>';
}, 1500);
});
});
});
function showToast(id) {
const toast = document.getElementById(id);
toast.classList.add('show');
setTimeout(() => toast.classList.remove('show'), 1500);
}
// ── Scroll reveal ──
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('visible');
}
});
}, { threshold: 0.1, rootMargin: '0px 0px -40px 0px' });
document.querySelectorAll('.reveal').forEach(el => observer.observe(el));
// ── Nav active highlighting ──
const navLinks = document.querySelectorAll('.nav-link');
const sections = ['features', 'catalog', 'presets', 'redc', 'faq'];
const navObserver = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
navLinks.forEach(l => l.classList.remove('active'));
const link = document.querySelector('.nav-link[href="#' + entry.target.id + '"]');
if (link) link.classList.add('active');
}
});
}, { threshold: 0.2, rootMargin: '-80px 0px -60% 0px' });
sections.forEach(id => {
const el = document.getElementById(id);
if (el) navObserver.observe(el);
});
// ── Init ──
fetchCatalog();
})();
</script>
</body>
</html>