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

Method execCommand

cmd/inject-cli/main.go:169–181  ·  view source on GitHub ↗
(sessionID, command string)

Source from the content-addressed store, hash-verified

167}
168
169func (c *apiClient) execCommand(sessionID, command string) (map[string]any, error) {
170 data, err := c.doJSON("POST", "/v0/management/sessions/"+sessionID+"/exec", map[string]string{
171 "command": command,
172 })
173 if err != nil {
174 return nil, err
175 }
176 var resp map[string]any
177 if err := json.Unmarshal(data, &resp); err != nil {
178 return nil, err
179 }
180 return resp, nil
181}
182
183func (c *apiClient) getObservedTools() ([]ObservedTool, error) {
184 data, err := c.doJSON("GET", "/v0/management/observed-tools", nil)

Callers 1

sessionREPLFunction · 0.80

Calls 1

doJSONMethod · 0.95

Tested by

no test coverage detected