scanner

package
v0.0.0-...-a98f5d9 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_SCANN_TIMEOUT     = 10  // default scan timeout
	DEFAULT_SCANN_CONCURRENCY = 255 // default scan concurrency
)

Variables

This section is empty.

Functions

func Collect

func Collect[T any](channel <-chan T) []T

func GenerateIPV4FullNetworkSegmentAddresses

func GenerateIPV4FullNetworkSegmentAddresses(ipv4Gateway string) []string

Types

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

Scanner defines the structure of the network scanner

func New

func New() *Scanner

New creates a network scanner

func (*Scanner) ScannIPV4

func (own *Scanner) ScannIPV4(gateways ...string) (<-chan string, error)

func (*Scanner) ScannIPV4Port

func (own *Scanner) ScannIPV4Port(port int, gateways ...string) (<-chan string, error)

func (*Scanner) Stop

func (own *Scanner) Stop() error

Stop stops the current sanning

func (*Scanner) WithConcurrency

func (own *Scanner) WithConcurrency(concurrency int64) *Scanner

func (*Scanner) WithInterval

func (own *Scanner) WithInterval(interval int64) *Scanner

WithInterval sets the loop interval of scanning, and default not loop

func (*Scanner) WithTimeout

func (own *Scanner) WithTimeout(timeout int64) *Scanner

Jump to

Keyboard shortcuts

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