diff --git a/Overlord-Server/plugins/sample/assets/sample.css b/Overlord-Server/plugins/sample/assets/sample.css deleted file mode 100644 index edc8eaf..0000000 --- a/Overlord-Server/plugins/sample/assets/sample.css +++ /dev/null @@ -1,89 +0,0 @@ -:root { - color-scheme: dark; -} - -* { - box-sizing: border-box; -} - -body { - margin: 0; - font-family: "Segoe UI", system-ui, sans-serif; - background: #0f1115; - color: #e8ecf1; -} - -.container { - max-width: 820px; - margin: 40px auto; - padding: 0 20px; -} - -.header h1 { - margin: 0 0 4px 0; - font-size: 28px; -} - -.sub { - margin: 0 0 24px 0; - color: #9aa4b2; -} - -.card { - background: #161a22; - border: 1px solid #222938; - border-radius: 12px; - padding: 18px; - margin-bottom: 18px; - box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); -} - -.row { - display: grid; - grid-template-columns: 120px 1fr; - gap: 12px; - align-items: center; - margin-bottom: 12px; -} - -.label { - color: #9aa4b2; - font-size: 14px; -} - -.input { - padding: 10px 12px; - border-radius: 8px; - border: 1px solid #2a3346; - background: #0f131b; - color: #e8ecf1; -} - -.actions { - display: flex; - gap: 10px; - margin-top: 10px; -} - -.btn { - background: #3b82f6; - color: #fff; - border: none; - padding: 10px 14px; - border-radius: 8px; - cursor: pointer; - font-weight: 600; -} - -.btn:hover { - background: #2563eb; -} - -.log { - min-height: 120px; - background: #0f131b; - border-radius: 8px; - border: 1px solid #2a3346; - padding: 12px; - white-space: pre-wrap; -} diff --git a/Overlord-Server/plugins/sample/assets/sample.html b/Overlord-Server/plugins/sample/assets/sample.html deleted file mode 100644 index 4cd2e8e..0000000 --- a/Overlord-Server/plugins/sample/assets/sample.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - Sample Plugin - - - -
-
-

Sample Plugin

-

Go Native + UI plugin

-
- -
-
- - -
- -
- - -
- -
- - -
- -
- - - - -
-
- -
-

Log

-

-      
-
- - - - diff --git a/Overlord-Server/plugins/sample/assets/sample.js b/Overlord-Server/plugins/sample/assets/sample.js deleted file mode 100644 index a82deb4..0000000 --- a/Overlord-Server/plugins/sample/assets/sample.js +++ /dev/null @@ -1,103 +0,0 @@ -const params = new URLSearchParams(window.location.search); -const clientIdInput = document.getElementById("client-id"); -const messageInput = document.getElementById("message"); -const msgBoxInput = document.getElementById("msgbox"); -const logEl = document.getElementById("log"); -const sendBtn = document.getElementById("send-btn"); -const pingBtn = document.getElementById("ping-btn"); -const msgBoxBtn = document.getElementById("msgbox-btn"); -const runCmdBtn = document.getElementById("run-cmd-btn"); - -const pluginId = "sample"; -const clientIdFromUrl = params.get("clientId") || ""; -clientIdInput.value = clientIdFromUrl; -messageInput.value = "hello from sample UI"; -msgBoxInput.value = "Hello from Overlord"; - -function log(line) { - const ts = new Date().toISOString(); - logEl.textContent = `${ts} ${line}\n` + logEl.textContent; -} - -async function sendEvent(event, payload) { - const clientId = clientIdInput.value.trim(); - if (!clientId) { - log("Missing clientId"); - return; - } - const res = await fetch(`/api/clients/${encodeURIComponent(clientId)}/plugins/${pluginId}/event`, { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ event, payload }), - }); - if (!res.ok) { - const text = await res.text(); - log(`Send failed: ${res.status} ${text}`); - return; - } - log(`Sent event: ${event}`); -} - -sendBtn.addEventListener("click", () => { - const message = messageInput.value.trim(); - sendEvent("ui_message", { message }); -}); - -pingBtn?.addEventListener("click", async () => { - const clientId = clientIdInput.value.trim(); - if (!clientId) { - log("Missing clientId"); - return; - } - const res = await fetch(`/api/clients/${encodeURIComponent(clientId)}/command`, { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ action: "ping_bulk", count: 100 }), - }); - if (!res.ok) { - const msg = await res.text(); - log(`Ping test failed: ${msg}`); - return; - } - log("Ping test x100 dispatched (single request)"); -}); - -msgBoxBtn?.addEventListener("click", async () => { - const clientId = clientIdInput.value.trim(); - if (!clientId) { - log("Missing clientId"); - return; - } - const text = msgBoxInput.value.trim() || "Hello from Overlord"; - const script = `$os = $env:OS; if ($os -ne 'Windows_NT') { exit } ; Add-Type -AssemblyName PresentationFramework; [System.Windows.MessageBox]::Show('${text.replace(/'/g, "''")}') | Out-Null`; - const res = await fetch(`/api/clients/${encodeURIComponent(clientId)}/command`, { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ action: "script_exec", script, scriptType: "powershell" }), - }); - if (!res.ok) { - const msg = await res.text(); - log(`Message box failed: ${msg}`); - return; - } - log("Message box command sent (Windows only)"); -}); - -runCmdBtn?.addEventListener("click", async () => { - const clientId = clientIdInput.value.trim(); - if (!clientId) { - log("Missing clientId"); - return; - } - const res = await fetch(`/api/clients/${encodeURIComponent(clientId)}/command`, { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ action: "screenshot" }), - }); - if (!res.ok) { - const msg = await res.text(); - log(`Command failed: ${msg}`); - return; - } - log("Command sent: screenshot"); -}); diff --git a/Overlord-Server/plugins/sample/manifest.json b/Overlord-Server/plugins/sample/manifest.json deleted file mode 100644 index c2dd18e..0000000 --- a/Overlord-Server/plugins/sample/manifest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "id": "sample", - "name": "sample", - "version": "1.0.0", - "binaries": { - "windows-amd64": "sample-windows-amd64.dll" - }, - "entry": "sample.html", - "assets": { - "html": "sample.html", - "css": "sample.css", - "js": "sample.js" - } -} \ No newline at end of file