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 ¶
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() )
View Source
var SupportedPivotListeners = map[pb.PivotType]CreateListener{ pb.PivotType_TCP: CreateTCPPivotListener, }
Functions ¶
func GetListeners ¶
func GetListeners() []*pb.PivotListener
GetListeners - Get a list of active listeners
func RestartAllListeners ¶
RestartAllListeners - Start all pivot listeners
func SendToPeer ¶
SendToPeer - Forward an envelope to a peer
Types ¶
type CreateListener ¶
CreateListener - Generic interface to a start listener function
type NetConnPivot ¶
NetConnPivot - A generic pivot connection to a peer via net.Conn
func (*NetConnPivot) DownstreamPeerID ¶
func (p *NetConnPivot) DownstreamPeerID() int64
DownstreamPeerID - ID of peer pivot
func (*NetConnPivot) RemoteAddress ¶
func (p *NetConnPivot) RemoteAddress() string
RemoteAddress - Remote address of peer
func (*NetConnPivot) Start ¶
func (p *NetConnPivot) Start(pivots *sync.Map)
Start - Starts the pivot connection handler
func (*NetConnPivot) ToProtobuf ¶
func (p *NetConnPivot) ToProtobuf() *pb.NetConnPivot
ToProtobuf - Protobuf of pivot peer
type PivotListener ¶
type PivotListener struct { ID uint32 Type pb.PivotType Listener net.Listener PivotConnections *sync.Map // PeerID (int64) -> NetConnPivot BindAddress string Upstream chan<- *pb.Envelope Options []bool }
PivotListener - A pivot listener
func CreateTCPPivotListener ¶
func CreateTCPPivotListener(address string, upstream chan<- *pb.Envelope, opts ...bool) (*PivotListener, error)
CreateTCPPivotListener - Start a TCP listener
func (*PivotListener) ToProtobuf ¶
func (l *PivotListener) ToProtobuf() *pb.PivotListener
ToProtobuf - Get the protobuf version of the pivot listener
Click to show internal directories.
Click to hide internal directories.