Documentation
¶
Index ¶
Constants ¶
const SOCKFMT = "/opt/scanner/%s/executor.sock"
SOCKFMT is the unix domain socket to bind to
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LocalClient ¶
type LocalClient struct {
// contains filtered or unexported fields
}
func NewLocalClient ¶
func NewLocalClient() *LocalClient
func (*LocalClient) Init ¶
func (e *LocalClient) Init(config []byte) error
Init the scanner (config not used atm)
func (*LocalClient) PortScan ¶
func (e *LocalClient) PortScan(ctx context.Context, targetIP string, packetsPerSecond int, ports []int32) (*ScanResults, error)
type ScanResults ¶
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func New ¶
func New() *Scanner
New returns a new scanner with a default timeout of 1 minute after send completion
func NewWithMAC ¶
func NewWithMAC(srcMac, dstMac net.HardwareAddr, device, srcIP string) *Scanner
NewWithMAC builds a new scanner with provided src/dst macs for routing with a default timeout of 1 minute after send completion
func (*Scanner) ScanIPv4 ¶
func (s *Scanner) ScanIPv4(ctx context.Context, targetIP string, packetsPerSecond int, ports []int32) (*ScanResults, error)
ScanIPv4 scans an IPv4 address
func (*Scanner) SetTimeout ¶
SetTimeout for when to shutdown the pcap handle after send completes (default is 1 minute or if all ports respond)
type Service ¶
func NewService ¶
func NewService() *Service
type SocketClient ¶
type SocketClient struct {
// contains filtered or unexported fields
}
SocketClient portscans by calling over domain socket
func NewSocketClient ¶
func NewSocketClient(env string) *SocketClient
NewSocketClient builds a client to the socket server to issue port scan requests
func (*SocketClient) Init ¶
func (e *SocketClient) Init(config []byte) error
Init the scanner (config not used atm)
func (*SocketClient) PortScan ¶
func (e *SocketClient) PortScan(ctx context.Context, targetIP string, packetsPerSecond int, ports []int32) (*ScanResults, error)
PortScan by calling the socket server to scan for us, marshal results and return