pivots

package
v1.15.16 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: GPL-3.0 Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrFailedWrite - Failed to write to a connection
	ErrFailedWrite = errors.New("failed to write")
	// ErrFailedKeyExchange - Failed to exchange session and/or peer keys
	ErrFailedKeyExchange = errors.New("failed key exchange")

	// MyPeerID - This implant's Peer ID, a per-execution instance ID
	MyPeerID = generatePeerID()
)

Functions

func AddListener added in v1.5.0

func AddListener(listener *PivotListener)

AddListener - Add a listener

func GetListeners added in v1.4.9

func GetListeners() []*pb.PivotListener

GetListeners - Get a list of active listeners

func ListenerID added in v1.5.0

func ListenerID() uint32

ListenerID - Generate a new pivot id

func RemoveListener added in v1.5.0

func RemoveListener(id uint32)

RemoveListener - Stop a pivot listener

func RestartAllListeners added in v1.5.0

func RestartAllListeners(send chan<- *pb.Envelope)

RestartAllListeners - Start all pivot listeners

func SendToPeer added in v1.5.0

func SendToPeer(envelope *pb.Envelope) (bool, error)

SendToPeer - Forward an envelope to a peer

func StartListener added in v1.5.0

func StartListener(id uint32)

StartListener - Stop a pivot listener

func StopAllListeners added in v1.5.0

func StopAllListeners()

StopAllListeners - Stop all pivot listeners

func StopListener added in v1.5.0

func StopListener(id uint32)

StopListener - Stop a pivot listener

Types

type CreateListener added in v1.5.0

type CreateListener func(string, chan<- *pb.Envelope) (*PivotListener, error)

CreateListener - Generic interface to a start listener function

type NetConnPivot added in v1.5.0

type NetConnPivot struct {
	Downstream chan *pb.Envelope
	// contains filtered or unexported fields
}

NetConnPivot - A generic pivot connection to a peer via net.Conn

func (*NetConnPivot) Close added in v1.5.0

func (p *NetConnPivot) Close() error

Close - Close connection to peer

func (*NetConnPivot) DownstreamPeerID added in v1.5.0

func (p *NetConnPivot) DownstreamPeerID() int64

DownstreamPeerID - ID of peer pivot

func (*NetConnPivot) RemoteAddress added in v1.5.0

func (p *NetConnPivot) RemoteAddress() string

RemoteAddress - Remote address of peer

func (*NetConnPivot) Start added in v1.5.0

func (p *NetConnPivot) Start(pivots *sync.Map)

Start - Starts the pivot connection handler

func (*NetConnPivot) ToProtobuf added in v1.5.0

func (p *NetConnPivot) ToProtobuf() *pb.NetConnPivot

ToProtobuf - Protobuf of pivot peer

type PivotListener added in v1.4.9

type PivotListener struct {
	ID               uint32
	Type             pb.PivotType
	Listener         net.Listener
	PivotConnections *sync.Map // PeerID (int64) -> NetConnPivot
	BindAddress      string
	Upstream         chan<- *pb.Envelope
}

PivotListener - A pivot listener

func CreateTCPPivotListener added in v1.5.0

func CreateTCPPivotListener(address string, upstream chan<- *pb.Envelope) (*PivotListener, error)

CreateTCPPivotListener - Start a TCP listener

func (*PivotListener) Start added in v1.5.0

func (p *PivotListener) Start()

Start - Start the pivot listener

func (*PivotListener) Stop added in v1.5.0

func (l *PivotListener) Stop()

Stop - Stop the pivot listener

func (*PivotListener) ToProtobuf added in v1.5.0

func (l *PivotListener) ToProtobuf() *pb.PivotListener

ToProtobuf - Get the protobuf version of the pivot listener

Jump to

Keyboard shortcuts

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