MCPcopy Create free account
hub / github.com/Xenov-X/csbot / executeSpawnPostExDll

Method executeSpawnPostExDll

workflow/executor_spawn.go:472–484  ·  view source on GitHub ↗

--- PostEx DLL --- executeSpawnPostExDll spawns a temporary process and injects postex DLL

(ctx context.Context, client *csclient.Client, beaconID string, action Action)

Source from the content-addressed store, hash-verified

470
471// executeSpawnPostExDll spawns a temporary process and injects postex DLL
472func (e *Executor) executeSpawnPostExDll(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) {
473 dllPath, ok := action.Parameters["dll"].(string)
474 if !ok {
475 return "", fmt.Errorf("dll parameter required for spawn_postex_dll")
476 }
477 args, _ := action.Parameters["args"].(string) // optional
478
479 resp, err := client.SpawnPostExDll(ctx, beaconID, dllPath, args)
480 if err != nil {
481 return "", err
482 }
483 return e.waitForOutput(ctx, client, resp.TaskID)
484}
485
486// executeInjectPostExDll injects postex DLL into a process
487func (e *Executor) executeInjectPostExDll(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) {

Callers 1

executeActionMethod · 0.95

Calls 1

waitForOutputMethod · 0.95

Tested by

no test coverage detected