diff --git a/README.md b/README.md index 14e4716..9f7a5d8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -

次元剑(MetaSword)

+

次 元 剑(MetaSword)

+

code size languages @@ -6,26 +7,60 @@ last commit
Author

-ASwordx64 -

- -

- 次元剑(MetaSword) 无名工匠精心打造的一款逆向工程与渗透测试的网络安全工具箱,结合了历代前辈与现代创新者的智慧,次元剑,如同一把锋利的剑,助你在网络安全领域披荆斩棘。 -

+ +MetaSword + +## 简介 + +在浩瀚如星空的网络世界里,有一把神剑,它的名字深深印在那些敢于挑战者的心中。 “次元剑(MetaSword)”,它的诞生,早已超越了技术的范畴,力量与智慧的象征,是数不清的传奇故事交织而成的。创造者已经消失在历史的长河中,渐渐的被遗忘 。。。 + +次元剑,它见证了时代的变迁,承载着前人奋斗的足迹,每一代工匠的锤炼,都让它更加锋利。从最初的锻造到今天,它经历了无数次的进化与提升,每一次的蜕变,都是对未来挑战的预演。 + +它的锋利,永远不会随着时间的推移而削弱。随着科技的飞速进步,它不断蜕变,每一次更新,都是一次力量的觉醒。无论是面对艰难的逆向工程,还是扑朔迷离的渗透测试,次元剑总能以无可匹敌的敏捷,帮助使用者克服所有的困难,打破障碍,突破极限。 + +次元剑真正的力量,不是技术的完美,是来源于使用者的勇气与智慧。 +只有那些敢于迎接挑战、敢于突破常规的人,才能真正激发出次元剑的无尽潜能。 + +“手握次元剑,踏破九重天” ## 功能展示 +![Dynamic Logo](https://meta.natapp4.cc/usr/uploads/2024/11/2043666321.png) + ### 动态 Logo -![Dynamic Logo](https://meta.natapp4.cc/usr/uploads/2024/06/3818802690.png) + +![Dynamic Logo](https://meta.natapp4.cc/usr/uploads/2024/11/1238572648.png) ### 工具分类 -![Tool Categories](https://meta.natapp4.cc/usr/uploads/2024/06/826731562.png) -- **逆向工程工具**:包括反汇编、动态调试与静态分析工具(IDA Pro、x64dbg、dnspy) -- **渗透测试工具**:包括抓包工具(Yakit、Burp Suite)及护网打点工具、CTF等工具 -- **友好用户界面**:直观设计,操作简单,初学者也能快速上手 +![Tool Categories](https://meta.natapp4.cc/usr/uploads/2024/11/1349289929.png) + +- **逆向工程工具** + - 提供一站式的反汇编、动态调试与静态分析支持。 + - 常用工具包括: + - IDA Pro + - x64dbg + - dnSpy + +- **渗透测试工具** + - 提供全方位的渗透测试支持,包括抓包、护网打点及 CTF 工具。 + - 常用工具包括: + - Yakit + - Burp Suite + +- **友好用户界面** + - 界面直观,操作简单。 + - 无论是专业人士还是初学者,都能快速上手。 + +## 特点 + +- 工具集成:集合行业领先工具,发现网络安全问题。 +- 易用性:简洁的设计风格,降低用户的学习门槛。 +- 全面性:涵盖从逆向分析到渗透测试的所有关键环节。 + + +## 探索次元剑的力量 +> 无论你是想揭示隐藏的漏洞,还是学习网络安全技能,次元剑都能为你提供可靠支持。 -无论你是网络安全专家还是新手,拥有一个功能全面的工具箱是必不可少的。 -
-次元剑能帮助你揭示更多的安全隐患,提升你的网络安全能力。 +让我们一起 “手握次元剑,仗梦走星辰” 吧。 diff --git a/app/Frida/FridaRun.exe b/app/Frida/FridaRun.exe index 1862c9b..a0da960 100644 Binary files a/app/Frida/FridaRun.exe and b/app/Frida/FridaRun.exe differ diff --git a/app/Frida/box.png b/app/Frida/box.png deleted file mode 100644 index 9bb0183..0000000 Binary files a/app/Frida/box.png and /dev/null differ diff --git a/app/Frida/css/main.css b/app/Frida/css/main.css index e45c587..0f1d8bc 100644 --- a/app/Frida/css/main.css +++ b/app/Frida/css/main.css @@ -1,18 +1,157 @@ * { - margin: 0; - padding: 0; - + margin: 0px; + padding: 0px; + /* box-sizing: border-box; */ + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; } body { - display: flex; - flex-direction: column; - height: calc(100vh - 30px); - margin: 0; overflow: hidden; + padding: 5px; +} + +.frida-IDE-logo { + width: 37px; + margin-left: 5px; +} + +.frida-IDE-title { + font-weight: bold; +} + +.frida-IDE-topview { + position: fixed; + right: 5px; + display: flex; + gap: 3px; + align-items: center; +} + +#frida-IDE-processSearch{ + width: 93%; + height: 18px; + margin: 3px auto; + padding: 5px 8px; + font-size: 13px; + border: 2px solid #d9d9d9; + border-radius: 5px; + outline: none; + font-size: 15px; +} + +.frida-IDE-PID { + width: 70px; + height: 22px; + padding: 0 0px; + margin-right: 10px; + border: none; + outline: none; + background-color: #373c47; + color: #979797; + border-radius: 5px; + font-size: 15px; + text-align: center; + font-family: fantasy; + margin-left: 10px; + -webkit-app-region: no-drag; +} + +.frida-IDE-search { + border: none; + padding: 5px 10px; + background: #333843; + font-size: 15px; + margin-left: 10px; + border-radius: 5px; + filter: opacity(0.8); + transition: background-color 0.2s ease-in-out; + float: left; + -webkit-app-region: no-drag; +} + +.frida-IDE-search:hover { + background-color: #2d4557; +} + +.frida-IDE-search:active { + background-color: #22262c; +} + +.frida-IDE-search>img { + width: 25px; + filter: brightness(1); + pointer-events: none; +} + + +.frida-IDE-switch { + position: relative; + display: inline-block; + width: 45px; + height: 18px; + margin-right: 10px; +} + +.frida-IDE-switch input { + opacity: 0; + width: 0; + height: 0; +} + +.frida-IDE-topButton { + width: 35px; + height: 25px; + border: none; + border-radius: 5px; + background-color: #2c3f4b; + color: white; + font-size: 16px; + font-weight: bold; + cursor: pointer; + float: left; + display: inline-block; + margin-right: 5px; + text-align: center; + -webkit-app-region: no-drag; +} + +.frida-IDE-topButton:active { + background-color: #1b2a34; +} + +.frida-IDE-topButton:hover { + background-color: #3a4d5c; +} + +.frida-IDE-topButton:active { + background-color: #1b2a34; +} + +.minimize-btn { + font-size: 18px; +} +.close-btn { + font-size: 18px; + color: #f56666; +} + + +.frida-IDE-topbar-view { + width: 100%; + height: var(--top-bar); + background-color: #22262e; + color: #fff; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); + display: flex; + align-items: center; + border-radius: 8px 8px 0px 0px; + -webkit-app-region: drag; } -#dropArea { +#frida-IDE-dropArea { width: 150px; padding: 30px 40px; border: 2px dashed #777777; @@ -24,33 +163,42 @@ body { top: 50%; left: 50%; transform: translate(-100px, -50px); - filter: opacity(0.8); + filter: opacity(0.5); display: flex; justify-content: center; } -#dropArea > img { + +#frida-IDE-dropArea>img { width: 70px; height: 70px; } - -#editor { - width: 100%; - height: calc(100vh - 30px); - position: fixed; - top: 35px; +.frida-IDE-table-container { + max-height: 230px; overflow-y: auto; + overflow-x: hidden; } -.run-top-view { - position: fixed; +.frida-IDE-table-container::-webkit-scrollbar { + width: 6px; +} + +.frida-IDE-table-container::-webkit-scrollbar-thumb { + background-color: #888; + border-radius: 4px; +} + +.frida-IDE-table-container::-webkit-scrollbar-track { + background-color: #f1f1f1; +} + +#editor { width: 100%; - height: 35px; - background: #282c34; - display: flex; - align-items: center; - z-index: 1; + height: calc(100vh - 45px); + overflow-y: auto; + border-radius: 0px 0px 10px 10px; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); } .ace_scrollbar::-webkit-scrollbar { @@ -65,21 +213,7 @@ body { background: #2c3f4b; } -.switch { - position: relative; - display: inline-block; - width: 45px; - height: 18px; - margin-right: 10px; -} - -.switch input { - opacity: 0; - width: 0; - height: 0; -} - -.slider { +.frida-IDE-slider { position: absolute; cursor: pointer; float: right; @@ -90,9 +224,10 @@ body { background-color: #2c3f4b; transition: .4s; border-radius: 34px; + -webkit-app-region: no-drag; } -.slider:before { +.frida-IDE-slider:before { position: absolute; content: ""; height: 18px; @@ -103,40 +238,20 @@ body { border-radius: 50%; } -input:checked+.slider { +input:checked+.frida-IDE-slider { background-color: #2c3f4b; } -input:checked+.slider:before { +input:checked+.frida-IDE-slider:before { background-color: rgb(0, 154, 214); transform: translateX(25px); } -.Pidinput { - width: 70px; - height: 22px; - padding: 0 0px; - margin-right: 10px; - border: none; - outline: none; - background-color: #2f343f; - color: #979797; - border-radius: 5px; - font-size: 15px; - text-align: center; - font-family: fantasy; - margin-left: 10px; -} - -.overlay-image { +.frida-IDE-overlay-image { position: fixed; right: 0px; - bottom: -14px; + bottom: 3px; width: 200px; - z-index: 2; - -moz-user-select: none; - -ms-user-select: none; - -webkit-user-select: none; pointer-events: none; filter: opacity(0.5); animation: fadeIn 0.5s ease-in-out forwards; @@ -152,54 +267,30 @@ input:checked+.slider:before { } } - -.draggable { +.frida-IDE-draggable { position: absolute; top: 50px; left: 50px; - width: 350px; + width: 328px; background-color: #f9f9f9; - padding: 10px; z-index: 10; display: none; border-radius: 8px; overflow: hidden; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); } - -.table-container { - max-height: 230px; - overflow-y: auto; - overflow-x: hidden; - -} - -.table-container::-webkit-scrollbar { - width: 6px; -} - -.table-container::-webkit-scrollbar-thumb { - background-color: #888; - border-radius: 4px; -} - -.table-container::-webkit-scrollbar-track { - background-color: #f1f1f1; -} - - -.draggable table { +.frida-IDE-draggable table { width: 100%; border-collapse: collapse; } - -.draggable th { +.frida-IDE-draggable th { background-color: #f2f2f2; text-align: left; } -.draggable tr:hover { +.frida-IDE-draggable tr:hover { background-color: #ddd; } @@ -223,46 +314,28 @@ tbody tr:hover { background-color: #f5f5f5; } -#processSearch { - width: 94%; - height: 10px; - margin: 8px auto; - padding: 10px 10px; - font-size: 15px; - border: 2px solid #595959; - border-radius: 8px; - outline: none; -} - -.window-close-btn { +.frida-IDE-window-closebtn { width: 35px; - height: 21px; + height: 100%; float: right; border: none; - border-radius: 5px; + font-weight: bold; + color: grey; } -.processbutton { - border: none; - padding: 5px 10px; - color: #c1c1c1; - background: #282c34; - font-size: 15px; - margin-left: 10px; - border-radius: 5px; - filter: opacity(0.7); +.frida-IDE-window-closebtn:active { + color: #c34747; } -.processbutton:active { - background-color: #22262c; +.frida-IDE-window-header { + width: 100%; + height: 33px; } -.processbutton > img { - width: 25px; - filter: brightness(1); - pointer-events: none; +.frida-IDE-Listwindow { + padding: 5px 15px 10px 15px; } -.window-title { - font-size: 16px; -} +#frida-IDE-processes { + font-size: 15px; +} \ No newline at end of file diff --git a/app/Frida/image/GL.png b/app/Frida/image/GL.png new file mode 100644 index 0000000..abde27f Binary files /dev/null and b/app/Frida/image/GL.png differ diff --git a/app/Frida/image/box.png b/app/Frida/image/box.png new file mode 100644 index 0000000..3737f2b Binary files /dev/null and b/app/Frida/image/box.png differ diff --git a/app/Frida/image/logo.png b/app/Frida/image/logo.png new file mode 100644 index 0000000..5614568 Binary files /dev/null and b/app/Frida/image/logo.png differ diff --git a/app/Frida/search.png b/app/Frida/image/search.png similarity index 100% rename from app/Frida/search.png rename to app/Frida/image/search.png diff --git a/app/Frida/index.html b/app/Frida/index.html index 7ca61dc..1fd2aa2 100644 --- a/app/Frida/index.html +++ b/app/Frida/index.html @@ -2,9 +2,10 @@ + Frida IDE @@ -15,40 +16,54 @@ - -
- - - +
+
+ +

Frida IDE

+
+ + + + + + +
+
-
-
function main() { - console.log("Hello, Frida!"); +
function main() { + console.log("Hello, MetaSword!"); } main();
- + + -
-
- 进程列表 - -
-
- + +
+
+
-
- - - -
+ +
+
+ +
+
+ + + +
+
+
- - + + + \ No newline at end of file diff --git a/app/Frida/js/main.js b/app/Frida/js/fridaEditor.js similarity index 98% rename from app/Frida/js/main.js rename to app/Frida/js/fridaEditor.js index bd9becb..fad52ac 100644 --- a/app/Frida/js/main.js +++ b/app/Frida/js/fridaEditor.js @@ -1,9 +1,9 @@ var editor = ace.edit("editor"); editor.session.setMode("ace/mode/javascript"); -var currentFontSize = 19; +var currentFontSize = 20; var minFontSize = 15; -var maxFontSize = 60; +var maxFontSize = 35; editor.setOptions({ fontSize: currentFontSize + "px", @@ -218,6 +218,6 @@ function formatCode() { editor.commands.addCommand({ name: 'formatCode', - bindKey: { win: 'Ctrl-Alt-F', mac: 'Command-Alt-F' }, + bindKey: { win: 'Shift-Alt-F'}, exec: formatCode -}); +}); \ No newline at end of file diff --git a/app/Frida/js/Function.js b/app/Frida/js/fridaFunc.js similarity index 79% rename from app/Frida/js/Function.js rename to app/Frida/js/fridaFunc.js index 7c999e3..d90f225 100644 --- a/app/Frida/js/Function.js +++ b/app/Frida/js/fridaFunc.js @@ -1,8 +1,33 @@ +const { spawn, exec } = require("child_process"); const fs = require('fs'); const path = require('path'); +const { ipcRenderer } = require('electron'); + +const dropZone = document.getElementById('frida-IDE-dropZone'); +const maximizeButton = document.getElementById("maximizeButton"); +const closeButtons = document.getElementById("closeButton"); +const minimizeButton = document.getElementById("minimize-btn"); + +let isMaximized = false; +maximizeButton.addEventListener("click", () => { + isMaximized = !isMaximized; + if (isMaximized) { + ipcRenderer.send('frida-maximizeWindow'); + document.body.style.backgroundColor = "#22262e"; + } else { + ipcRenderer.send('frida-unmaximizeWindow'); + document.body.style.backgroundColor = ""; + } +}); -const { spawn, exec } = require("child_process"); -var dropZone = document.getElementById('drop-zone'); + +minimizeButton.addEventListener("click", () => { + ipcRenderer.send('frida-minimizeWindow'); +}); + +closeButtons.addEventListener("click", () => { + window.close(); +}); function showDropZone() { Object.assign(dropZone.style, { @@ -15,6 +40,7 @@ function showDropZone() { function hideDropZone() { dropZone.style.visibility = 'hidden'; } + function handleDragEnter(e) { e.preventDefault(); var items = e.dataTransfer.items; @@ -34,27 +60,22 @@ function handleDragOver(e) { e.preventDefault(); } - function handleDrop(e) { e.preventDefault(); hideDropZone(); - var files = e.dataTransfer.files; if (files.length > 0) { var file = files[0]; - if (file.name.endsWith('.js')) { ScriptPath = file.path; - }else { + } else { ExePath = file.path; } - if (file.name.endsWith('.exe')) { processExec = true; - document.getElementsByClassName("slider")[0].click(); + document.getElementsByClassName("frida-IDE-slider")[0].click(); return; } - var reader = new FileReader(); reader.onload = function (event) { try { @@ -67,15 +88,14 @@ function handleDrop(e) { } } - document.body.addEventListener('dragenter', handleDragEnter); document.body.addEventListener('dragleave', handleDragLeave); document.body.addEventListener('dragover', handleDragOver); document.body.addEventListener('drop', handleDrop); var fridapath = __dirname; -var toggleButton = document.getElementById('toggleButton'); -var Pidinput = document.querySelector(".Pidinput"); +var toggleButton = document.getElementById('frida-IDE-toggleButton'); +var Pidinput = document.querySelector(".frida-IDE-PID"); var processExec = false; var ExePath = null; var ScriptPath = null; @@ -102,10 +122,10 @@ toggleButton.addEventListener('change', function () { switch (state) { case 1: // checked == true, processExec == false - command = `powershell -Command "Start-Process cmd -ArgumentList '/c title Frida Running && ${fridapath}/FridaRun -p ${pid} -s ${filePath}' -Verb RunAs"`; + command = `powershell -Command "Start-Process cmd -ArgumentList '/c title Frida Terminal && ${fridapath}/FridaRun -p ${pid} -s ${filePath}' -Verb RunAs"`; break; case 3: // checked == true, processExec == true - command = `powershell -Command "Start-Process cmd -ArgumentList '/c title Frida Running && ${fridapath}/FridaRun -f ${ExePath} -s ${filePath}' -Verb RunAs"`; + command = `powershell -Command "Start-Process cmd -ArgumentList '/c title Frida Terminal && ${fridapath}/FridaRun -f ${ExePath} -s ${filePath}' -Verb RunAs"`; break; case 0: // checked == false, processExec == false case 2: // checked == false, processExec == true @@ -116,7 +136,7 @@ toggleButton.addEventListener('change', function () { command = `powershell -WindowStyle Hidden -Command "Start-Process powershell -ArgumentList '-Command \\"Stop-Process -Name FridaRun -Force; Stop-Process -Name ${programName} -Force\\"' -Verb RunAs -WindowStyle Hidden"`; } processExec = false; - + break; default: return; @@ -126,16 +146,15 @@ toggleButton.addEventListener('change', function () { return; } }); - + }); }); - -var button = document.querySelector('.processbutton'); +var button = document.querySelector('.frida-IDE-search'); button.addEventListener('click', async function () { try { const fastlistProcess = spawn(`${fridapath}/Fastlist`); - var processTableBody = document.querySelector('#processes'); + var processTableBody = document.querySelector('#frida-IDE-processes'); processTableBody.innerHTML = ''; fastlistProcess.stdout.on('data', (data) => { var lines = data.toString().split('\n'); @@ -151,7 +170,6 @@ button.addEventListener('click', async function () { } }); }); - processListWindow.style.display = 'block'; centerElement(processListWindow); } catch (error) { @@ -159,15 +177,13 @@ button.addEventListener('click', async function () { } }); - function addProcessToList(pid, name) { - var processTableBody = document.querySelector('#processes'); + var processTableBody = document.querySelector('#frida-IDE-processes'); var newRow = document.createElement('tr'); newRow.innerHTML = ` ${pid} - ${name} - `; + ${name}`; processTableBody.appendChild(newRow); newRow.addEventListener('click', function (event) { var radioButton = newRow.querySelector('input[type="radio"]'); @@ -175,19 +191,17 @@ function addProcessToList(pid, name) { radioButton.checked = true; } Pidinput.value = radioButton.value; - // console.log("Selected PID:", Pidinput.value); }); var radioButton = newRow.querySelector('input[type="radio"]'); radioButton.addEventListener('click', function (event) { Pidinput.value = radioButton.value; - // console.log("Selected PID:", Pidinput.value); }); } -var windowHeader = document.querySelector('.window-header'); -var processListWindow = document.getElementById('processListWindow'); +var windowHeader = document.querySelector('.frida-IDE-window-header'); +var processListWindow = document.getElementById('frida-IDE-ProcessWindow'); windowHeader.addEventListener('mousedown', function (e) { e.preventDefault(); @@ -233,8 +247,7 @@ function centerElement(elmnt) { elmnt.style.left = ((mainWindowWidth - elmntWidth) / 2) + 'px'; } - -var searchInput = document.getElementById('processSearch'); +var searchInput = document.getElementById('frida-IDE-processSearch'); var throttleTimeout; var throttleInterval = 10; searchInput.addEventListener('input', function () { @@ -244,10 +257,9 @@ searchInput.addEventListener('input', function () { }, throttleInterval); }); - function searchProcess() { var searchText = searchInput.value.toLowerCase(); - var processRows = document.querySelectorAll('#processes tr'); + var processRows = document.querySelectorAll('#frida-IDE-processes tr'); processRows.forEach(function (row) { var processName = row.querySelector('td:nth-child(3)').innerText.toLowerCase(); if (processName.includes(searchText)) { @@ -258,8 +270,8 @@ function searchProcess() { }); } -var closeButton = document.querySelector('.window-close-btn'); +var closeButton = document.querySelector('.frida-IDE-window-closebtn'); closeButton.addEventListener('click', function () { - var processListWindow = document.getElementById('processListWindow'); + var processListWindow = document.getElementById('frida-IDE-ProcessWindow'); processListWindow.style.display = 'none'; }); \ No newline at end of file diff --git a/app/Frida/logo.png b/app/Frida/logo.png deleted file mode 100644 index 8b10af7..0000000 Binary files a/app/Frida/logo.png and /dev/null differ diff --git a/app/Frida/script/main.js b/app/Frida/script/main.js index c255e60..f1b0f2b 100644 --- a/app/Frida/script/main.js +++ b/app/Frida/script/main.js @@ -1,4 +1,4 @@ function main() { - console.log("Hello, Frida!"); + console.log("Hello, MetaSword!"); } main(); \ No newline at end of file diff --git a/app/config/config.xml b/app/config/config.xml new file mode 100644 index 0000000..87a0ecf --- /dev/null +++ b/app/config/config.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/app/config/css/main.css b/app/config/css/main.css new file mode 100644 index 0000000..05aa18a --- /dev/null +++ b/app/config/css/main.css @@ -0,0 +1,223 @@ +* { + margin: 0; + padding: 0; + box-sizing: border-box; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; +} + +body { + color: #fff; +} + +.settings-panel { + background: #181818; + border-radius: 10px 10px 10px 10px; + padding: 15px; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); + height: 100vh; + transform: scale(0.99); + overflow-y: hidden; + white-space: nowrap; + display: flex; + align-items: baseline; + scroll-behavior: smooth; +} + +.settings-panel h1 { + font-size: 28px; + font-weight: bold; + text-align: center; + color: #f39c12; + margin-bottom: 30px; +} + +.setting-card { + width: 100%; + display: inline-block; + background: #222; + padding: 20px; + border-radius: 15px; + margin-right: 15px; + transition: all 0.3s ease; + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); +} + +.settings-panel::-webkit-scrollbar { + height: 9px; +} + +.settings-panel::-webkit-scrollbar-track { + background: #2e2e2e; + border-radius: 0px 0px 10px 10px; +} + +.settings-panel::-webkit-scrollbar-thumb { + background: #f39c12; + border-radius: 0px 0px 10px 10px; + border: 2px solid #2e2e2e; +} + +.settings-panel::-webkit-scrollbar-thumb:hover { + background: #e67e22; +} + +.setting-card:hover { + background: #252525; + transform: translateY(-2px); + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); +} + +.setting-card h3 { + font-size: 18px; + color: #f39c12; + margin-bottom: 20px; + text-align: center; +} + +.setting-card label { + display: block; + margin-top: 10px; + margin-bottom: 5px; + font-size: 15px; +} + +.setting-card button { + margin-top: 10px; + margin-bottom: 10px; +} + +.button { + width: 100%; + border: none; + padding: 5px; + border-radius: 10px; + font-size: 15px; + color: white; + cursor: pointer; + transition: all 0.3s ease; + text-align: center; + background: linear-gradient(135deg, #f39c12, #e67e22); +} + +.button:active { + transform: scale(0.98); +} + +.setting-card input[type="range"] { + margin-top: 15px; + width: 100%; + -webkit-appearance: none; + appearance: none; + height: 8px; + background: #444; + border-radius: 10px; + outline: none; + transition: background 0.3s ease; +} + +.setting-card input[type="range"]:hover { + background: #f39c12; +} + +.setting-card input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + appearance: none; + height: 20px; + width: 20px; + border-radius: 50%; + background: #f39c12; + cursor: pointer; +} + +.range-value { + margin-top: 10px; + font-size: 14px; +} + +.button-panel { + position: absolute; + top: 3px; + left: 0; + width: 100%; + display: flex; + justify-content: space-between; + z-index: 10; + padding: 0 17px; + -webkit-app-region: drag; + align-items: center; +} + +.close-btn, +.fullscreen-btn { + background-color: transparent; + border: none; + color: #fff; + font-size: 30px; + cursor: pointer; + transition: all 0.3s ease; + -webkit-app-region: no-drag; +} + +.close-btn:hover, +.fullscreen-btn:hover { + color: #f39c12; + transform: scale(1.1); +} + +.setting-card:first-child { + margin-top: 30px; + margin-left: 15px; +} + +.setting-card:nth-child(2) { + margin-top: 0; +} + +#popup-message { + color: #000000; + font-size: 16px; +} + +.popup { + display: none; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + justify-content: center; + align-items: center; + z-index: 1000; + border-radius: 10px; + transform: scale(0.99); +} + +.popup-content { + background-color: white; + padding: 20px; + border-radius: 5px; + width: 300px; + text-align: center; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); +} + +#popup-ok { + margin-top: 13px; + padding: 8px 20px; + color: white; + border: none; + border-radius: 5px; + cursor: pointer; + background: linear-gradient(135deg, #f39c12, #e67e22); + font-weight: bold; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); + transition: all 0.5s; +} + +#popup-ok:hover { + transform: scale(0.95); +} \ No newline at end of file diff --git a/app/config/index.html b/app/config/index.html new file mode 100644 index 0000000..123d3a8 --- /dev/null +++ b/app/config/index.html @@ -0,0 +1,216 @@ + + + + + + + 设置面板 + + + + +
+ + +
+ +
+
+

动画设置

+ + + + + +
当前值:1.1
+
+ +
+

主题设置

+ + +
+ +
+

版本更新

+ + +
+
+ + + + + + + \ No newline at end of file diff --git a/app/home.js b/app/home.js index 918127e..24ce865 100644 --- a/app/home.js +++ b/app/home.js @@ -3,7 +3,7 @@ const fs = require('fs'); const path = require('path'); const xml2js = require('xml2js'); -let logoWindow, mainWindow, fridaIDEWindow; +let logoWindow, mainWindow, fridaIDEWindow, controlWindow; let isToggling = false; // 常用的 WebPreferences 配置 @@ -14,12 +14,11 @@ const commonWebPreferences = { devTools: true, }; -// 创建窗口的通用方法 -const createWindow = ({ width, height, frame, resizable, transparent, - alwaysOnTop, fullscreen, skipTaskbar, minWidth, minHeight }) => { +// 创建窗口通用方法 +const createWindow = ({ width, height, frame = true, resizable = true, transparent = false, + alwaysOnTop = false, fullscreen = false, skipTaskbar = false, minWidth, minHeight }) => { const window = new BrowserWindow({ - width, height, frame, resizable, transparent, - alwaysOnTop, fullscreen, skipTaskbar, + width, height, frame, resizable, transparent, alwaysOnTop, fullscreen, skipTaskbar, webPreferences: commonWebPreferences, }); if (minWidth && minHeight) window.setMinimumSize(minWidth, minHeight); @@ -27,6 +26,7 @@ const createWindow = ({ width, height, frame, resizable, transparent, if (window === logoWindow) logoWindow = null; if (window === mainWindow) mainWindow = null; if (window === fridaIDEWindow) fridaIDEWindow = null; + if (window === controlWindow) controlWindow = null; }); return window; }; @@ -35,8 +35,10 @@ const createWindow = ({ width, height, frame, resizable, transparent, const createTransparentWindow = () => { const { width, height } = screen.getPrimaryDisplay().size; logoWindow = createWindow({ - width, height, frame: false, resizable: false, transparent: true, - skipTaskbar: false, fullscreen: true, alwaysOnTop: false + width, height, frame: false, + resizable: false, transparent: true, + skipTaskbar: true, fullscreen: true, + alwaysOnTop: false }); logoWindow.loadFile(path.resolve(__dirname, 'logo.html')); logoWindow.setIgnoreMouseEvents(true); @@ -45,8 +47,9 @@ const createTransparentWindow = () => { // 创建主应用窗口 const createMainWindow = () => { mainWindow = createWindow({ - width: 550, height: 343, frame: false, resizable: false, transparent: true, - alwaysOnTop: false, minWidth: 480, minHeight: 320 + width: 550, height: 343, frame: false, + resizable: false, transparent: true, + alwaysOnTop: false }); mainWindow.loadFile(path.resolve(__dirname, 'index.html')); globalShortcut.register('Ctrl+P', () => mainWindow.webContents.openDevTools()); @@ -55,26 +58,48 @@ const createMainWindow = () => { // 创建 Frida IDE 窗口 const createFridaIDEWindow = () => { fridaIDEWindow = createWindow({ - width: 750, height: 800, frame: true, resizable: true, + width: 730, height: 800, + transparent: true, + frame: false, resizable: true, }); fridaIDEWindow.loadFile(path.resolve(__dirname, 'Frida', 'index.html')); fridaIDEWindow.setMinimumSize(480, 320); Menu.setApplicationMenu(null); + // globalShortcut.register('Ctrl+L', () => fridaIDEWindow.webContents.openDevTools()); }; -// 注册 IPC 事件处理函数 +// 创建 控制面板 窗口 +const createControlWindow = () => { + controlWindow = createWindow({ + width: 550, height: 343, frame: false, resizable: false, + transparent: true, + }); + controlWindow.loadFile(path.resolve(__dirname, 'config', 'index.html')); + Menu.setApplicationMenu(null); + // globalShortcut.register('Ctrl+K', () => controlWindow.webContents.openDevTools()); +}; + +// 注册 IPC 事件 +let originalBounds; const registerIpcHandlers = () => { ipcMain.on('close-transparent', () => { logoWindow.close(); }); ipcMain.on('createMainWindow', createMainWindow); ipcMain.on('createFridaIDEWindow', createFridaIDEWindow); - ipcMain.on('close-app', app.quit); - ipcMain.on('minimize-window', () => { - const focusedWindow = BrowserWindow.getFocusedWindow(); - if (focusedWindow) focusedWindow.minimize(); + ipcMain.on('createControlWindow', createControlWindow); + ipcMain.on('frida-minimizeWindow', () => { fridaIDEWindow.minimize(); }); + ipcMain.on('minimize-mainwindow', () => { mainWindow.minimize(); }); + ipcMain.on('close-mainwindow', app.quit); + + ipcMain.on('frida-maximizeWindow', () => { + originalBounds = fridaIDEWindow.getBounds(); + fridaIDEWindow.maximize(); + }); + ipcMain.on('frida-unmaximizeWindow', () => { + fridaIDEWindow.setBounds(originalBounds); }); }; -// 切换主窗口的显示和隐藏 +// 切换主窗口显示隐藏 const toggleMainWindowVisibility = () => { if (isToggling) return; isToggling = true; @@ -84,31 +109,32 @@ const toggleMainWindowVisibility = () => { } else { createMainWindow(); } - setTimeout(() => { isToggling = false; }, 300); }; -// 读取和解析 XML 文件 +// 加载配置文件工具列表 const loadToolsList = async () => { - const ToolsListPath = path.join(__dirname, '..', '..', 'Tools', 'Toolslist.xml'); + const ToolsListPath = path.join(__dirname, 'config', 'config.xml'); try { const data = await fs.promises.readFile(ToolsListPath, 'utf8'); const result = await xml2js.parseStringPromise(data); - const tagsContent = result.root.tags[0]?._?.trim().toLowerCase(); - if (tagsContent !== 'close') { + + const settings = result.config.settings[0].tag; + const animationTag = settings.find(tag => tag.$.name === 'AnimationStart'); + + const animationStatus = animationTag ? animationTag.$.value.trim().toLowerCase() : 'disabled'; + if (animationStatus === 'enabled') { createTransparentWindow(); - } else { + } else if (animationStatus === 'disabled') { createMainWindow(); + } else { + console.warn(`Unknown status: ${animationStatus}`); } } catch (err) { - console.error('XML error.', err); + console.error('XML error:', err); } }; -// 处理应用事件 -app.on('window-all-closed', () => { - if (process.platform !== 'darwin') app.quit(); -}); app.whenReady().then(() => { loadToolsList(); @@ -116,12 +142,17 @@ app.whenReady().then(() => { globalShortcut.register('F1', toggleMainWindowVisibility); }); -// 在应用激活时创建透明窗口 +// 处理应用事件 +app.on('window-all-closed', () => { + if (process.platform !== 'darwin') app.quit(); +}); + +// 应用激活创建透明窗口 app.on('activate', () => { if (BrowserWindow.getAllWindows().length === 0) createTransparentWindow(); }); -// 应用退出时注销全局快捷键 +// 应用退出注销全局快捷键 app.on('will-quit', () => { globalShortcut.unregisterAll(); -}); +}); \ No newline at end of file diff --git a/app/index.html b/app/index.html index f66267a..7de1d0a 100644 --- a/app/index.html +++ b/app/index.html @@ -3,106 +3,118 @@ - 次元剑 - 逆向工具箱 + 逆向工具箱 - 次元剑 - - + + -
-
+
+
-

次元剑

-
-
+

次元剑

-
-
-
+
+
-
+
+
+
+ +
-
-
-
-
-
+
+
- - -