MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / NewShellModule

Function NewShellModule

internal/bridge/module_shell.go:27–38  ·  view source on GitHub ↗

NewShellModule creates a ShellModule with the given command builder and optional response parser.

(
	name, spiteName string,
	buildCmd func(string, *implantpb.Request) string,
	buildResp func(string, string, *implantpb.Request) *implantpb.Spite,
)

Source from the content-addressed store, hash-verified

25
26// NewShellModule creates a ShellModule with the given command builder and optional response parser.
27func NewShellModule(
28 name, spiteName string,
29 buildCmd func(string, *implantpb.Request) string,
30 buildResp func(string, string, *implantpb.Request) *implantpb.Spite,
31) *ShellModule {
32 return &ShellModule{
33 name: name,
34 spiteName: spiteName,
35 buildCommand: buildCmd,
36 buildResponse: buildResp,
37 }
38}
39
40// Name returns the module's spite name.
41func (m *ShellModule) Name() string { return m.name }

Callers 2

TestNewShellModule_NameFunction · 0.85
defaultModulesFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestNewShellModule_NameFunction · 0.68