Documentation ¶
Index ¶
- Variables
- func AddListener(listener *PivotListener)
- func GetListeners() []*pb.PivotListener
- func ListenerID() uint32
- func RemoveListener(id uint32)
- func RestartAllListeners(send chan<- *pb.Envelope)
- func SendToPeer(envelope *pb.Envelope) (bool, error)
- func StartListener(id uint32)
- func StopAllListeners()
- func StopListener(id uint32)
- type CreateListener
- type NetConnPivot
- type PivotListener
Constants ¶
This section is empty.
Variables ¶
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() )
var SupportedPivotListeners = map[pb.PivotType]CreateListener{ pb.PivotType_TCP: CreateTCPPivotListener, }
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 RemoveListener ¶ added in v1.5.0
func RemoveListener(id uint32)
RemoveListener - Stop a pivot listener
func RestartAllListeners ¶ added in v1.5.0
RestartAllListeners - Start all pivot listeners
func SendToPeer ¶ added in v1.5.0
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
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