protocols

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapTCPProtocolHandlers added in v1.0.1

func MapTCPProtocolHandlers(log interfaces.Logger, h interfaces.Honeypot) map[string]TCPHandlerFunc

MapTCPProtocolHandlers map protocol handlers to corresponding protocol

func MapUDPProtocolHandlers added in v1.0.1

func MapUDPProtocolHandlers(log interfaces.Logger, h interfaces.Honeypot) map[string]UDPHandlerFunc

MapUDPProtocolHandlers map protocol handlers to corresponding protocol

Types

type BufferedConn

type BufferedConn struct {
	net.Conn // So that most methods are embedded
	// contains filtered or unexported fields
}

BufferedConn provides an interface to peek at a connection

func Peek

func Peek(conn net.Conn, length int) ([]byte, BufferedConn, error)

Peek reads `length` amount of data from the connection

func (BufferedConn) Read

func (b BufferedConn) Read(p []byte) (int, error)

type TCPHandlerFunc added in v1.0.1

type TCPHandlerFunc func(ctx context.Context, conn net.Conn, md connection.Metadata) error

type UDPHandlerFunc added in v1.0.1

type UDPHandlerFunc func(ctx context.Context, srcAddr, dstAddr *net.UDPAddr, data []byte, md connection.Metadata) error

Directories

Path Synopsis
tcp
rdp
smb

Jump to

Keyboard shortcuts

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