scan

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithLogger

func WithLogger(l zerolog.Logger) func(*Target) error

WithLogger adds logger specifications to scan target.

func WithPorts

func WithPorts(proto, period, rng, expected string) func(*Target) error

WithPorts adds TCP or UDP ports specifications to scan target.

Types

type Target

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

Target holds an IP and a range of ports to scan.

func New

func New(name, ip string, workers int, m metrics.MetricsManager, o ...func(*Target) error) (*Target, error)

New checks that target specification is valid, and if target is responding.

func (*Target) Name

func (t *Target) Name() string

Name returns target name.

func (*Target) Run

func (t *Target) Run()

Run should be called using `go` and will run forever running the scanning schedule.

Jump to

Keyboard shortcuts

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