diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md index e69de29..abafdef 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,10 @@ +## SecHub 网安工具集 + +### 技术栈 + +PHP: 网页实现 +Json: 存储工具集 + +### 部署 + +直接复制本项目放置于服务器上即可 \ No newline at end of file diff --git a/assets/css/style.css b/assets/css/style.css new file mode 100644 index 0000000..4a440ca --- /dev/null +++ b/assets/css/style.css @@ -0,0 +1,427 @@ +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + background: #f5f5f5; + min-height: 100vh; + padding: 20px; + transition: background-color 0.3s ease, color 0.3s ease; +} + +body.dark-mode { + background: #1a1a1a; + color: #e0e0e0; +} + +.container { + max-width: 1400px; + margin: 0 auto; +} + +header { + text-align: center; + color: #333; + margin-bottom: 30px; + padding: 20px 0; + position: relative; + transition: color 0.3s ease; +} + +body.dark-mode header { + color: #e0e0e0; +} + +header h1 { + font-size: 2rem; + margin-bottom: 8px; + color: #2c3e50; + transition: color 0.3s ease; +} + +body.dark-mode header h1 { + color: #ecf0f1; +} + +header p { + font-size: 1rem; + color: #666; + transition: color 0.3s ease; +} + +body.dark-mode header p { + color: #b0b0b0; +} + +.theme-toggle { + position: absolute; + right: 20px; + top: 50%; + transform: translateY(-50%); + background: #fff; + border: 2px solid #e0e0e0; + border-radius: 50%; + width: 45px; + height: 45px; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + font-size: 1.3rem; + transition: all 0.3s ease; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +} + +.theme-toggle:hover { + transform: translateY(-50%) scale(1.1); + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); + border-color: #3498db; +} + +body.dark-mode .theme-toggle { + background: #2c2c2c; + border-color: #444; +} + +body.dark-mode .theme-toggle:hover { + border-color: #f39c12; +} + +.theme-tooltip { + position: absolute; + bottom: -35px; + left: 50%; + transform: translateX(-50%) translateY(-10px); + background: rgba(0, 0, 0, 0.85); + color: #fff; + padding: 6px 12px; + border-radius: 6px; + font-size: 0.8rem; + white-space: nowrap; + opacity: 0; + visibility: hidden; + transition: all 0.3s ease; + pointer-events: none; + z-index: 1000; +} + +.theme-tooltip::before { + content: ''; + position: absolute; + top: -6px; + left: 50%; + transform: translateX(-50%); + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid rgba(0, 0, 0, 0.85); +} + +.theme-tooltip.show { + opacity: 1; + visibility: visible; + transform: translateX(-50%) translateY(0); +} + +.theme-toggle:hover .theme-tooltip { + opacity: 1; + visibility: visible; + transform: translateX(-50%) translateY(0); +} + +.section { + margin-bottom: 30px; +} + +.section-title { + color: #2c3e50; + font-size: 1.4rem; + margin-bottom: 15px; + padding: 10px 15px; + border-left: 4px solid #3498db; + background: #fff; + border-radius: 4px; + transition: all 0.3s ease; +} + +body.dark-mode .section-title { + color: #ecf0f1; + background: #2c2c2c; + border-left-color: #f39c12; +} + +.cards-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); + gap: 15px; +} + +.card { + background: white; + border-radius: 8px; + padding: 18px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08); + transition: all 0.3s ease; + cursor: pointer; + position: relative; + overflow: hidden; + border: 1px solid #e0e0e0; +} + +body.dark-mode .card { + background: #2c2c2c; + border-color: #444; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); +} + +.card::before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 3px; + background: linear-gradient(90deg, #3498db, #2980b9); + transform: scaleX(0); + transform-origin: left; + transition: transform 0.3s ease; +} + +body.dark-mode .card::before { + background: linear-gradient(90deg, #f39c12, #e67e22); +} + +.card:hover { + transform: translateY(-3px); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); + border-color: #3498db; +} + +body.dark-mode .card:hover { + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); + border-color: #f39c12; +} + +.card:hover::before { + transform: scaleX(1); +} + +.card-header { + margin-bottom: 12px; +} + +.card-title { + font-size: 1.1rem; + color: #2c3e50; + margin-bottom: 6px; + font-weight: 600; + transition: color 0.3s ease; +} + +body.dark-mode .card-title { + color: #ecf0f1; +} + +.card-link { + display: inline-block; + color: #3498db; + text-decoration: none; + font-size: 0.85rem; + word-break: break-all; + transition: color 0.2s ease; +} + +body.dark-mode .card-link { + color: #f39c12; +} + +.card-link:hover { + color: #2980b9; + text-decoration: underline; +} + +body.dark-mode .card-link:hover { + color: #e67e22; +} + +.card-description { + color: #666; + line-height: 1.5; + font-size: 0.9rem; + transition: color 0.3s ease; +} + +body.dark-mode .card-description { + color: #b0b0b0; +} + +.empty-state { + text-align: center; + color: #999; + padding: 30px; + background: #fff; + border-radius: 8px; + border: 1px dashed #ddd; + transition: all 0.3s ease; +} + +body.dark-mode .empty-state { + background: #2c2c2c; + border-color: #444; + color: #888; +} + +.empty-state p { + font-size: 0.95rem; +} + +footer { + text-align: center; + color: #999; + margin-top: 40px; + padding: 25px 20px; + font-size: 0.9rem; + background: #fff; + border-top: 1px solid #e0e0e0; + transition: all 0.3s ease; +} + +body.dark-mode footer { + background: #2c2c2c; + border-top-color: #444; + color: #888; +} + +.footer-content { + max-width: 1200px; + margin: 0 auto; +} + +.copyright { + margin-bottom: 10px; + color: #666; + transition: color 0.3s ease; +} + +body.dark-mode .copyright { + color: #b0b0b0; +} + +.beian-info { + display: flex; + justify-content: center; + align-items: center; + gap: 10px; + flex-wrap: wrap; + font-size: 0.85rem; +} + +.beian-link { + color: #999; + text-decoration: none; + transition: color 0.2s ease; + display: inline-flex; + align-items: center; + gap: 5px; +} + +body.dark-mode .beian-link { + color: #888; +} + +.beian-link:hover { + color: #3498db; +} + +body.dark-mode .beian-link:hover { + color: #f39c12; +} + +.beian-divider { + color: #ddd; + user-select: none; + transition: color 0.3s ease; +} + +body.dark-mode .beian-divider { + color: #555; +} + +.beian-icon { + vertical-align: middle; +} + +@media (max-width: 768px) { + header h1 { + font-size: 1.6rem; + } + + .section-title { + font-size: 1.2rem; + } + + .cards-grid { + grid-template-columns: 1fr; + } + + .card { + padding: 15px; + } + + .theme-toggle { + width: 40px; + height: 40px; + font-size: 1.1rem; + right: 10px; + } + + .theme-tooltip { + font-size: 0.75rem; + padding: 5px 10px; + bottom: -32px; + } + + footer { + padding: 20px 15px; + font-size: 0.85rem; + } + + .beian-info { + flex-direction: column; + gap: 8px; + } + + .beian-divider { + display: none; + } +} + +@media (max-width: 480px) { + body { + padding: 10px; + } + + header h1 { + font-size: 1.4rem; + } + + header p { + font-size: 0.9rem; + } + + .section-title { + font-size: 1.1rem; + padding: 8px 12px; + } + + .card-title { + font-size: 1rem; + } + + footer { + padding: 15px 10px; + font-size: 0.8rem; + } +} \ No newline at end of file diff --git a/assets/imgs/beian.png b/assets/imgs/beian.png new file mode 100644 index 0000000..2a13ba2 Binary files /dev/null and b/assets/imgs/beian.png differ diff --git a/assets/json/plugin.json b/assets/json/plugin.json new file mode 100644 index 0000000..6384c95 --- /dev/null +++ b/assets/json/plugin.json @@ -0,0 +1,20 @@ +[ + { + "section": "插件/非独立小工具" + }, + { + "name": "Nuclei Templates", + "url": "https://github.com/projectdiscovery/nuclei-templates", + "description": "社区驱动的漏洞扫描模板集合,支持多种协议和技术栈" + }, + { + "name": "CVE-Exploit", + "url": "https://github.com/trickest/cve", + "description": "最新CVE漏洞的POC和EXP收集仓库" + }, + { + "name": "Web POC", + "url": "https://github.com/dorkerdevil/Web-Pentest", + "description": "Web应用渗透测试POC脚本合集" + } +] \ No newline at end of file diff --git a/assets/json/poc.json b/assets/json/poc.json new file mode 100644 index 0000000..d456356 --- /dev/null +++ b/assets/json/poc.json @@ -0,0 +1,20 @@ +[ + { + "section": "POC/EXP" + }, + { + "name": "Nuclei Templates", + "url": "https://github.com/projectdiscovery/nuclei-templates", + "description": "社区驱动的漏洞扫描模板集合,支持多种协议和技术栈" + }, + { + "name": "CVE-Exploit", + "url": "https://github.com/trickest/cve", + "description": "最新CVE漏洞的POC和EXP收集仓库" + }, + { + "name": "Web POC", + "url": "https://github.com/dorkerdevil/Web-Pentest", + "description": "Web应用渗透测试POC脚本合集" + } +] \ No newline at end of file diff --git a/assets/json/tool.json b/assets/json/tool.json new file mode 100644 index 0000000..020309d --- /dev/null +++ b/assets/json/tool.json @@ -0,0 +1,25 @@ +[ + { + "section": "安全工具" + }, + { + "name": "Burp Suite", + "url": "https://portswigger.net/burp", + "description": "专业的Web安全测试工具集,包含代理、扫描器等多种功能模块" + }, + { + "name": "SQLMap", + "url": "https://github.com/sqlmapproject/sqlmap", + "description": "自动化SQL注入检测和利用工具,支持多种数据库类型" + }, + { + "name": "Dirsearch", + "url": "https://github.com/maurosoria/dirsearch", + "description": "高性能Web目录和文件枚举工具,支持多线程和多种输出格式" + }, + { + "name": "Nmap", + "url": "https://nmap.org/", + "description": "网络发现和安全审计工具,支持端口扫描、服务检测等功能" + } +] \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..d166f61 --- /dev/null +++ b/index.php @@ -0,0 +1,197 @@ + $data[0]['section'], + 'file' => $filename, + 'items' => array_slice($data, 1) + ]; + } else { + $sections[$filename] = [ + 'title' => pathinfo($filename, PATHINFO_FILENAME), + 'file' => $filename, + 'items' => $data + ]; + } + } + + return $sections; +} + +/** + * 渲染卡片HTML + * @param array $item 项目数据 + * @return string HTML字符串 + */ +function renderCard($item) { + $name = htmlspecialchars($item['name'] ?? '未命名'); + $url = htmlspecialchars($item['url'] ?? '#'); + $description = htmlspecialchars($item['description'] ?? '暂无简介'); + + return " +
+
+

{$name}

+ {$url} +
+

{$description}

+
"; +} + +// 自动获取栏目配置 +$sections = getSectionsConfig($jsonDir); +?> + + + + + + + SecHub - 网络安全工具集 + + + +
+
+

SecHub 网安工具集

+

一站式网络安全工具与资源导航平台

+ +
+ + $config): ?> + + +
+

+ +

+ + +
+

暂无数据,请在 中添加项目

+
+ +
+ + + +
+ +
+ + + +
+ + + + diff --git a/nginx.htaccess b/nginx.htaccess new file mode 100644 index 0000000..e69de29