shell

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

type Listener struct {
	// contains filtered or unexported fields
}

Listener is a built-in TCP reverse shell listener with session management.

func New

func New() *Listener

func (*Listener) GeneratePayload

func (l *Listener) GeneratePayload(targetOS, payloadType string) (string, error)

GeneratePayload returns a reverse shell command. payloadType maps to the PAYLOAD option (e.g. "reverse_bash", "reverse_python"). Falls back to bash for linux, powershell for windows.

func (*Listener) Interact

func (l *Listener) Interact(id int) error

Interact enters interactive mode for the given session.

func (*Listener) Kill

func (l *Listener) Kill(id int) error

Kill terminates a session by ID.

func (*Listener) Name

func (l *Listener) Name() string

func (*Listener) Sessions

func (l *Listener) Sessions() []*session.Session

Sessions returns all alive sessions.

func (*Listener) Setup

func (l *Listener) Setup(lhost string, lport int) error

func (*Listener) Shutdown

func (l *Listener) Shutdown() error

func (*Listener) WaitForSession

func (l *Listener) WaitForSession(timeout time.Duration) error

WaitForSession blocks until a session connects or the timeout expires. For backward compatibility, it accepts the first session and enters interactive mode.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL