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, )
| 25 | |
| 26 | // NewShellModule creates a ShellModule with the given command builder and optional response parser. |
| 27 | func 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. |
| 41 | func (m *ShellModule) Name() string { return m.name } |
no outgoing calls