+
-
-
-
+
+
+
\ 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 @@
-
次元剑 - 逆向工具箱
+
逆向工具箱 - 次元剑
-
-
+
+
-