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

Method GetSession

internal/api/handlers/management/sessions.go:23–31  ·  view source on GitHub ↗

GetSession returns a single session with its tools.

(c *gin.Context)

Source from the content-addressed store, hash-verified

21
22// GetSession returns a single session with its tools.
23func (h *Handler) GetSession(c *gin.Context) {
24 id := c.Param("id")
25 sess := sessions.Global().Get(id)
26 if sess == nil {
27 c.JSON(404, gin.H{"error": "session not found"})
28 return
29 }
30 c.JSON(200, sess)
31}
32
33// PostSessionExec enqueues a command for execution in a session.
34func (h *Handler) PostSessionExec(c *gin.Context) {

Callers 1

handleSpiteRecvMethod · 0.80

Calls 2

GlobalFunction · 0.92
GetMethod · 0.45

Tested by

no test coverage detected