Documentation
¶
Overview ¶
Package listener is a small Go reverse-shell session manager. It owns a TCP listener, a session registry, command execution and basic file transfer. It is intentionally not a C2: no persistence, no staging, no evasion.
Index ¶
- Constants
- type Manager
- func (m *Manager) Download(ctx context.Context, sessionID, path string) ([]byte, error)
- func (m *Manager) Exec(ctx context.Context, sessionID, command string) (string, error)
- func (m *Manager) Sessions() []SessionInfo
- func (m *Manager) Start(addr string) (string, error)
- func (m *Manager) Stop() error
- func (m *Manager) Upload(ctx context.Context, sessionID, path string, data []byte) (int, error)
- type Session
- type SessionInfo
Constants ¶
View Source
const ( DefaultReadTimeout = 30 * time.Second UploadChunkSize = 32 * 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager() *Manager
func (*Manager) Exec ¶
Exec sends one command and reads until a unique marker is echoed. It is serialized per session. Commands should be non-interactive.
func (*Manager) Sessions ¶
func (m *Manager) Sessions() []SessionInfo
Click to show internal directories.
Click to hide internal directories.