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

Method SetPoisonActive

internal/sessions/manager.go:216–228  ·  view source on GitHub ↗

SetPoisonActive sets the poison-active state for a session. When taskID > 0, a poison cycle is active; 0 clears the poison state.

(sessionID string, active bool, taskID uint32)

Source from the content-addressed store, hash-verified

214// SetPoisonActive sets the poison-active state for a session.
215// When taskID > 0, a poison cycle is active; 0 clears the poison state.
216func (m *Manager) SetPoisonActive(sessionID string, active bool, taskID uint32) {
217 sess := m.Get(sessionID)
218 if sess == nil {
219 return
220 }
221 sess.mu.Lock()
222 defer sess.mu.Unlock()
223 if active {
224 sess.poisonTaskID = taskID
225 } else {
226 sess.poisonTaskID = 0
227 }
228}
229
230// IsPoisonActive reports whether the session has an active poison cycle.
231func (m *Manager) IsPoisonActive(sessionID string) bool {

Callers 2

PrepareInjectionMethod · 0.80
testSetupFunction · 0.80

Calls 1

GetMethod · 0.95

Tested by 1

testSetupFunction · 0.64