scan

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Port  int
	Type  ResultType
	Error error
}

Result is a port or an error returned from the scanner

type ResultType

type ResultType int

ResultType is the type of result returned

const (
	ResultPort ResultType = iota
	ResultError
)

Types of results retured

type Scanner

type Scanner struct {
	Latency time.Duration
	// contains filtered or unexported fields
}

Scanner is a scanner that scans for ports using SYN packets.

func NewScanner

func NewScanner(host net.IP, timeout time.Duration, retries, rate int) (*Scanner, error)

NewScanner creates a new full port scanner that scans all ports using SYN packets.

func (*Scanner) ConnectVerify

func (s *Scanner) ConnectVerify(host string, ports map[int]struct{}) map[int]struct{}

ConnectVerify is used to verify if ports are accurate using a connect request

func (*Scanner) Scan

func (s *Scanner) Scan(wordlist map[int]struct{}) (map[int]struct{}, error)

Scan scans a single host and returns the results

Jump to

Keyboard shortcuts

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