From e58195147f68e45bd379e20a1bbaa74e60c02a97 Mon Sep 17 00:00:00 2001 From: MasonLiu <2857911564@qq.com> Date: Sun, 31 May 2026 14:00:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=AB=98=E5=AF=86=E5=BA=A6?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/css/style.css | 97 +++++- assets/db/sechub.db | Bin 28672 -> 0 bytes assets/json/collection.json | 20 ++ assets/json/intranet.json | 25 ++ assets/json/mobile.json | 15 + assets/json/plugin.json | 10 + assets/json/poc.json | 20 ++ assets/json/proxy.json | 30 ++ assets/json/scanner.json | 40 +++ assets/json/shell.json | 15 + assets/json/template.json | 10 + assets/json/tools.json | 20 ++ db.php | 38 +++ index.php | 604 ++++++++++++++++++++++++++++++------ simple.php | 347 +++++++++++++++++++++ 15 files changed, 1184 insertions(+), 107 deletions(-) delete mode 100644 assets/db/sechub.db create mode 100644 assets/json/collection.json create mode 100644 assets/json/intranet.json create mode 100644 assets/json/mobile.json create mode 100644 assets/json/plugin.json create mode 100644 assets/json/poc.json create mode 100644 assets/json/proxy.json create mode 100644 assets/json/scanner.json create mode 100644 assets/json/shell.json create mode 100644 assets/json/tools.json create mode 100644 simple.php diff --git a/assets/css/style.css b/assets/css/style.css index 0c32de1..09973ef 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -157,25 +157,25 @@ body.dark-mode .search-result-title { .theme-toggle { position: absolute; - right: 20px; + right: 65px; top: 20px; background: white; - border: 2px solid #e2e8f0; + border: 1px solid #e2e8f0; border-radius: 50%; - width: 45px; - height: 45px; + width: 40px; + height: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center; - font-size: 1.3rem; + font-size: 1.2rem; transition: all 0.3s ease; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); } .theme-toggle:hover { transform: scale(1.1); - box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); border-color: #4299e1; } @@ -188,6 +188,75 @@ body.dark-mode .theme-toggle:hover { border-color: #63b3ed; } +/* 视图切换按钮 */ +.view-toggle { + position: absolute; + right: 15px; + top: 20px; + background: white; + border: 1px solid #e2e8f0; + border-radius: 50%; + width: 40px; + height: 40px; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + font-size: 1.2rem; + transition: all 0.3s ease; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); +} + +.view-toggle:hover { + transform: scale(1.1); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); + border-color: #4299e1; +} + +body.dark-mode .view-toggle { + background: #2d3748; + border-color: #4a5568; +} + +body.dark-mode .view-toggle:hover { + border-color: #63b3ed; +} + +.view-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; +} + +.view-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); +} + +.view-toggle:hover .view-tooltip { + opacity: 1; + visibility: visible; + transform: translateX(-50%) translateY(0); +} + .theme-tooltip { position: absolute; bottom: -35px; @@ -560,7 +629,7 @@ body.dark-mode .beian-divider { width: 40px; height: 40px; font-size: 1.1rem; - right: 10px; + right: 65px; top: 10px; } @@ -570,6 +639,20 @@ body.dark-mode .beian-divider { bottom: -32px; } + .view-toggle { + width: 40px; + height: 40px; + font-size: 1.1rem; + right: 10px; + top: 10px; + } + + .view-tooltip { + font-size: 0.75rem; + padding: 5px 10px; + bottom: -32px; + } + .section-header { flex-direction: column; align-items: flex-start; diff --git a/assets/db/sechub.db b/assets/db/sechub.db deleted file mode 100644 index 54ff8ba287d8025f013bf47dc4301c69354060eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 28672 zcmeI5|4$QV9LMiyX#r_FLrBM*^A={1NGVcWBHMI;w}l9Z&~6%&HKjfAwDjur>hza| zI_np{SQXF>5hZHG;R^1H5!g}?!{TaaNUIa@bTBJc2=jh*e_EW633+)oxY&N$ZZFSx z1jgrv|6+GSznt}rG_{ldtj5*gr0QHPEg;sd6t+5R8k^H%!$IHbW0!hddcu`$v=$VQ z(X}etAm@c2Lkd_ZK(4DgCdpiRozYrSLPm>Ku7^Tgz#Tds@Vfn6d&-7Bg>}lV7eHNY z?*Qv(mWHgWseX@(UT$csYTZk6JL==Yf%vywQ6UWKitj+g6i+AloqtI7jV$uu#Yek z95$Wl8DS|kpMw=9B!C2v01`j~NB{{S0VIF~kN^^RJqSeJ&Celrtn;`W4k>nVcKW`3 z{_3#YeODgq7AIojgIi+s!Iw-M)x5jzpdbW8)pmP3D;x~Bm3z4kyN}}!GrW&E%KGh4 z%ht>U1STXvR-EdW`$wh8%k!Nv>DTVL@d0RI?&P2}bXPooX8y{l%8JSlZ53N>jtZ(` zOLf)O>dLANMUl7HfV|>e`&W=x_XTaEj|Kf4=z3nFz_Z@Npvmq%%1A?<(xnNgFU`cH zUxwwulORgG*hBAamiq65sM+a0ajGwajtoT+XI?I`!xoOLUqM?_*z0Fl%E@#D{cuMy zltEyS=MKSLQXd=gaz`2dxILi8*n~ukeDjgmGc|wbp4c@Ck~Qtp*)b^=lSW6RtB*lA zFnu=DBlV95;A2@hR&$d6_CnwBk3I_o>xvDsVgG22^0D1^MA{B!ZKs|23DAm01`j~NB{{S0VIF~kN^@u0!RP}Ac5xy zY}Xly4TTQ9L%FUlS1!PnO!8y)ZQ5LiL+{ksl8a#qL{;_Hs*kgb#QFk=hYNKz9M;Lz zmZD3Oix;A6Nh48Qq(rMPL}(4D+2qPgZM>gcywFA-^hsy=jj;S}nS~W5B!C2v01`j~ zNB{{S0VIF~kN^@u0!ZMMAz;#NP#^WHw*++gy7kIT0CgkFtSin1dsp{Kmter2_OL^fCP{L5s{~>I diff --git a/assets/json/collection.json b/assets/json/collection.json new file mode 100644 index 0000000..e892292 --- /dev/null +++ b/assets/json/collection.json @@ -0,0 +1,20 @@ +[ + { + "section": "合集/导航" + }, + { + "name": "404星链计划", + "url": "https://github.com/knownsec/404StarLink", + "description": "知道创宇404实验室网安工具收集册" + }, + { + "name": "Vulhub", + "url": "https://github.com/vulhub/vulhub", + "description": "基于Docker的漏洞复现工程,也可以在其中搜寻漏洞利用脚本" + }, + { + "name": "Sechub", + "url": "https://git.masonliu.com/MasonLiu/SecHub", + "description": "由本人开发的网安工具集网站" + } +] \ No newline at end of file diff --git a/assets/json/intranet.json b/assets/json/intranet.json new file mode 100644 index 0000000..0ae340b --- /dev/null +++ b/assets/json/intranet.json @@ -0,0 +1,25 @@ +[ + { + "section": "内网渗透工具" + }, + { + "name": "Suo5", + "url": "https://github.com/zema1/suo5", + "description": "高性能网站代理脚本" + }, + { + "name": "FRP", + "url": "https://github.com/fatedier/frp", + "description": "一个快速反向代理工具" + }, + { + "name": "fscan", + "url": "https://github.com/shadow1ng/fscan", + "description": "内网高速扫描工具(易被发现)" + }, + { + "name": "fscan结果美化工具", + "url": "https://github.com/ZororoZ/fscanOutput", + "description": "fscan结果美化工具" + } +] \ No newline at end of file diff --git a/assets/json/mobile.json b/assets/json/mobile.json new file mode 100644 index 0000000..71054e0 --- /dev/null +++ b/assets/json/mobile.json @@ -0,0 +1,15 @@ +[ + { + "section": "移动端渗透工具" + }, + { + "name": "Magisk", + "url": "https://github.com/topjohnwu/Magisk", + "description": "安卓root工具,一代神器" + }, + { + "name": "Frida", + "url": "https://github.com/frida/frida", + "description": "移动端内核Hook工具" + } +] \ No newline at end of file diff --git a/assets/json/plugin.json b/assets/json/plugin.json new file mode 100644 index 0000000..e8a0e04 --- /dev/null +++ b/assets/json/plugin.json @@ -0,0 +1,10 @@ +[ + { + "section": "插件/非工具" + }, + { + "name": "HaE", + "url": "https://github.com/gh0stkey/HaE", + "description": "HaE是一款可以快速挖掘目标指纹和关键信息的Burp插件" + } +] \ No newline at end of file diff --git a/assets/json/poc.json b/assets/json/poc.json new file mode 100644 index 0000000..32a87e0 --- /dev/null +++ b/assets/json/poc.json @@ -0,0 +1,20 @@ +[ + { + "section": "POC/EXP" + }, + { + "name": "CVE-2026-31431", + "url": "https://copy.fail/", + "description": "基于复制功能的Linux系统提权漏洞" + }, + { + "name": "MS17-010检测工具", + "url": "https://github.com/TeskeVirtualSystem/MS17010Test", + "description": "Windows可用,快速检测永恒之蓝漏洞" + }, + { + "name": "CVE-2023-32315", + "url": "https://github.com/vulhub/vulhub/tree/master/openfire/CVE-2023-32315", + "description": "Openfire任意用户添加漏洞" + } +] \ No newline at end of file diff --git a/assets/json/proxy.json b/assets/json/proxy.json new file mode 100644 index 0000000..f945598 --- /dev/null +++ b/assets/json/proxy.json @@ -0,0 +1,30 @@ +[ + { + "section": "代理工具/集成平台" + }, + { + "name": "Burp Suite", + "url": "https://portswigger.net/burp", + "description": "经典,功能强大的Web应用安全测试工具,建议自行搜索破解版" + }, + { + "name": "Yakit", + "url": "https://github.com/yaklang/yakit", + "description": "交互式应用安全测试平台" + }, + { + "name": "Reqable", + "url": "https://reqable.com/zh-CN/", + "description": "多平台协同抓包分析以及API调试平台,支持Python脚本" + }, + { + "name": "Fiddler", + "url": "https://www.telerik.com/fiddler", + "description": "HTTP调试代理工具,一般用于PC抓取移动端报文" + }, + { + "name": "Proxifier", + "url": "https://www.proxifier.com/", + "description": "功能强大的网络代理工具,支持HTTP/HTTPS/SOCKS代理" + } +] \ No newline at end of file diff --git a/assets/json/scanner.json b/assets/json/scanner.json new file mode 100644 index 0000000..cb67e87 --- /dev/null +++ b/assets/json/scanner.json @@ -0,0 +1,40 @@ +[ + { + "section": "多功能扫描器" + }, + { + "name": "Nuclei", + "url": "https://github.com/projectdiscovery/nuclei", + "description": "(POC/EXP扫描工具)Nuclei 是一个快速、灵活且可扩展的漏洞扫描工具" + }, + { + "name": "arog", + "url": "https://github.com/zan8in/afrog", + "description": "(POC/EXP扫描工具)基于Go语言开发的开源漏扫系统" + }, + { + "name": "Pocsuite3", + "url": "https://github.com/knownsec/pocsuite3", + "description": "(POC/EXP扫描工具)基于Python开发的开源漏扫系统" + }, + { + "name": "xray", + "url": "https://github.com/chaitin/xray", + "description": "(POC/EXP扫描工具)长亭开发的漏洞扫描工具,支持被动扫描" + }, + { + "name": "Nikto", + "url": "https://github.com/sullo/nikto", + "description": "Web服务器扫描工具" + }, + { + "name": "OpenVAS", + "url": "https://github.com/greenbone/openvas", + "description": "自动化开源漏洞扫描工具" + }, + { + "name": "Goby", + "url": "https://gobies.org/", + "description": "自动化漏洞扫描工具,建议自行上网搜索红队破解版" + } +] \ No newline at end of file diff --git a/assets/json/shell.json b/assets/json/shell.json new file mode 100644 index 0000000..9c3a14c --- /dev/null +++ b/assets/json/shell.json @@ -0,0 +1,15 @@ +[ + { + "section": "Shell管理工具" + }, + { + "name": "AntSword蚁剑", + "url": "https://github.com/AntSwordProject/antSword", + "description": "AntSword蚁剑是一个功能强大的Shell管理工具,尤其是在PHP场景下" + }, + { + "name": "Godzilla哥斯拉", + "url": "https://github.com/BeichenDream/Godzilla", + "description": "多语言支持的强大Shell管理工具" + } +] \ No newline at end of file diff --git a/assets/json/template.json b/assets/json/template.json index a7ad07e..64adc9b 100644 --- a/assets/json/template.json +++ b/assets/json/template.json @@ -2,6 +2,16 @@ { "section": "栏目名称" }, + { + "name": "工具名称", + "url": "工具链接", + "description": "工具描述" + }, + { + "name": "工具名称", + "url": "工具链接", + "description": "工具描述" + }, { "name": "工具名称", "url": "工具链接", diff --git a/assets/json/tools.json b/assets/json/tools.json new file mode 100644 index 0000000..00ff2a8 --- /dev/null +++ b/assets/json/tools.json @@ -0,0 +1,20 @@ +[ + { + "section": "工具" + }, + { + "name": "Dirsearch", + "url": "https://github.com/maurosoria/dirsearch", + "description": "经典网站路径扫描爆破工具" + }, + { + "name": "Dirmap", + "url": "https://github.com/H4ckForJob/dirmap", + "description": "网站路径扫描爆破工具" + }, + { + "name": "Sqlmap", + "url": "https://github.com/sqlmapproject/sqlmap", + "description": "主流的强大SQL注入神器" + } +] \ No newline at end of file diff --git a/db.php b/db.php index 369da77..8e984c7 100644 --- a/db.php +++ b/db.php @@ -8,6 +8,7 @@ class SecHubDatabase { private $dbPath; private $jsonDir; private $db; + private $needsInitialSync = false; public function __construct($dbPath, $jsonDir) { $this->dbPath = $dbPath; @@ -20,18 +21,43 @@ class SecHubDatabase { */ private function initDatabase() { try { + // 检查数据库文件是否存在 + $dbExists = file_exists($this->dbPath); + $this->db = new PDO('sqlite:' . $this->dbPath); $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $this->db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); // 创建同步日志表 $this->createSyncLogTable(); + + // 如果数据库文件是新创建的,或者没有任何业务数据表,标记需要同步 + if (!$dbExists || $this->isEmptyDatabase()) { + $this->needsInitialSync = true; + } } catch (PDOException $e) { error_log("数据库连接失败: " . $e->getMessage()); throw $e; } } + /** + * 检查数据库是否为空(没有业务数据表) + */ + private function isEmptyDatabase() { + try { + $sql = "SELECT count(*) as table_count FROM sqlite_master + WHERE type='table' + AND name NOT LIKE 'sqlite_%' + AND name != 'json_sync_log'"; + $stmt = $this->db->query($sql); + $result = $stmt->fetch(); + return $result['table_count'] == 0; + } catch (Exception $e) { + return true; + } + } + /** * 创建同步日志表 */ @@ -52,6 +78,18 @@ class SecHubDatabase { * 检查并同步JSON数据到数据库 */ public function syncJsonToDatabase() { + // 如果是初始同步,强制同步所有文件 + if ($this->needsInitialSync) { + $jsonFiles = glob($this->jsonDir . '*.json'); + + foreach ($jsonFiles as $file) { + $this->syncSingleFile($file); + } + $this->needsInitialSync = false; + return; + } + + // 正常增量同步 $jsonFiles = glob($this->jsonDir . '*.json'); foreach ($jsonFiles as $file) { diff --git a/index.php b/index.php index c132862..8dfd623 100644 --- a/index.php +++ b/index.php @@ -1,6 +1,6 @@ -
-

{$name}

- {$url} -
-

{$description}

- "; -} - // 初始化数据库并同步数据 try { $database = new SecHubDatabase($dbPath, $jsonDir); + + if (!file_exists($dbPath)) { + error_log("数据库文件不存在,将在同步时创建"); + } + $database->syncJsonToDatabase(); // 获取栏目配置 @@ -55,14 +40,475 @@ try { - SecHub - 网络安全工具集 - + SecHub(简洁版) +

SecHub 网安工具集

-

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

+

高密度浏览模式 | 一屏查看更多工具

@@ -76,30 +522,24 @@ try { +
- $config): ?> + $config): ?> getItemsBySection($key); - // 获取对应的JSON文件名 $jsonFile = $key . '.json'; ?>
-
-

- -

- - -
+

+ +

暂无数据

-
+
- +
+
+

+ +
+

+
@@ -146,19 +592,19 @@ try { return div.innerHTML; } - // 渲染卡片函数(用于搜索结果) - function renderCardJS(item) { + // 渲染紧凑卡片(用于搜索结果) + function renderCompactCardJS(item) { const name = item.name || '未命名'; const url = item.url || '#'; const description = item.description || '暂无简介'; return ` -
-
-

${escapeHtml(name)}

- ${escapeHtml(url)} +
+
+

${escapeHtml(name)}

+ ${escapeHtml(url)}
-

${escapeHtml(description)}

+

${escapeHtml(description)}

`; } @@ -173,7 +619,6 @@ try { if (keyword.length === 0) { searchResults.style.display = 'none'; - showAllSections(); return; } @@ -213,11 +658,11 @@ try { sectionDiv.appendChild(title); const cardsGrid = document.createElement('div'); - cardsGrid.className = 'cards-grid'; + cardsGrid.className = 'compact-grid'; section.items.forEach(item => { const cardDiv = document.createElement('div'); - cardDiv.innerHTML = renderCardJS(item); + cardDiv.innerHTML = renderCompactCardJS(item); cardsGrid.appendChild(cardDiv.firstElementChild); }); @@ -228,45 +673,26 @@ try { searchResults.style.display = 'block'; } - function showAllSections() { - // 不需要做任何事,因为栏目一直显示 - } - - function hideAllSections() { - // 不需要隐藏栏目 - } - - // 下载JSON文件 - function downloadJson(filename) { - const url = `assets/json/${filename}`; - const link = document.createElement('a'); - link.href = url; - link.download = filename; - document.body.appendChild(link); - link.click(); - document.body.removeChild(link); - } - // 单项搜索功能 document.querySelectorAll('.section-search').forEach(input => { input.addEventListener('input', function() { const section = this.dataset.section; - const keyword = this.value.trim(); + const keyword = this.value.trim().toLowerCase(); const cardsGrid = document.querySelector(`[data-section-items="${section}"]`); if (!cardsGrid) return; - const cards = cardsGrid.querySelectorAll('.card'); + const cards = cardsGrid.querySelectorAll('.compact-card'); cards.forEach(card => { - const title = card.querySelector('.card-title').textContent.toLowerCase(); - const description = card.querySelector('.card-description').textContent.toLowerCase(); - const link = card.querySelector('.card-link').textContent.toLowerCase(); + const title = card.querySelector('.compact-card-title').textContent.toLowerCase(); + const description = card.querySelector('.compact-card-description').textContent.toLowerCase(); + const link = card.querySelector('.compact-card-link').textContent.toLowerCase(); if (keyword === '' || - title.includes(keyword.toLowerCase()) || - description.includes(keyword.toLowerCase()) || - link.includes(keyword.toLowerCase())) { + title.includes(keyword) || + description.includes(keyword) || + link.includes(keyword)) { card.style.display = 'block'; } else { card.style.display = 'none'; @@ -279,9 +705,6 @@ try { document.addEventListener('click', function(e) { if (!e.target.closest('.search-container')) { searchResults.style.display = 'none'; - if (globalSearchInput.value.trim() === '') { - showAllSections(); - } } }); @@ -300,14 +723,6 @@ try { themeIcon.textContent = '☀️'; } - // 首次访问显示提示 - if (!localStorage.getItem('themeHintShown')) { - setTimeout(() => { - showThemeHint(); - localStorage.setItem('themeHintShown', 'true'); - }, 1500); - } - // 切换主题 themeToggle.addEventListener('click', function() { body.classList.toggle('dark-mode'); @@ -320,18 +735,7 @@ try { localStorage.setItem('theme', 'light'); } }); - - // 显示提示函数 - function showThemeHint() { - const tooltip = themeToggle.querySelector('.theme-tooltip'); - tooltip.classList.add('show'); - - // 3秒后隐藏提示 - setTimeout(() => { - tooltip.classList.remove('show'); - }, 3000); - } })(); - \ No newline at end of file + diff --git a/simple.php b/simple.php new file mode 100644 index 0000000..7197a61 --- /dev/null +++ b/simple.php @@ -0,0 +1,347 @@ + +
+

{$name}

+ {$url} +
+

{$description}

+
"; +} + +// 初始化数据库并同步数据 +try { + $database = new SecHubDatabase($dbPath, $jsonDir); + + // 检查数据库文件是否存在,如果不存在会在新建时自动创建 + if (!file_exists($dbPath)) { + error_log("数据库文件不存在,将在同步时创建"); + } + + $database->syncJsonToDatabase(); + + // 获取栏目配置 + $sections = $database->getSectionsConfig(); +} catch (Exception $e) { + error_log("数据库初始化失败: " . $e->getMessage()); + $sections = []; +} +?> + + + + + + + + SecHub - 网络安全工具集 + + + +
+
+

SecHub 网安工具集

+

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

+ + +
+ +
+
+ + + +
+ + $config): ?> + getItemsBySection($key); + // 获取对应的JSON文件名 + $jsonFile = $key . '.json'; + ?> + +
+
+
+

+ +

+ + +
+ + +
+ + +
+

暂无数据

+
+ +
+ + + +
+ +
+ + + +
+ + + + \ No newline at end of file