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

Method getSessions

cmd/inject-cli/main.go:143–155  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

141}
142
143func (c *apiClient) getSessions() ([]SessionSummary, error) {
144 data, err := c.doJSON("GET", "/v0/management/sessions", nil)
145 if err != nil {
146 return nil, err
147 }
148 var resp struct {
149 Sessions []SessionSummary `json:"sessions"`
150 }
151 if err := json.Unmarshal(data, &resp); err != nil {
152 return nil, err
153 }
154 return resp.Sessions, nil
155}
156
157func (c *apiClient) getSession(id string) (*SessionDetail, error) {
158 data, err := c.doJSON("GET", "/v0/management/sessions/"+id, nil)

Callers 2

cachedSessionIDsMethod · 0.95
cmdSessionsFunction · 0.80

Calls 1

doJSONMethod · 0.95

Tested by

no test coverage detected