scanner

package
v0.0.0-...-9f58196 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPorts []int

Functions

func DescribePort

func DescribePort(port int) string

DescribePort returns a service string if it matches a known port, otherwise it returns an empty string.

func ScanPort

func ScanPort(ip string, port int, timeout time.Duration)

ScanPort scans the target IP/port to determine if it's open or closed.

func Ulimit

func Ulimit() int64

Ulimit gets the maximum number of open files allowed by the OS.

Types

type PortScanner

type PortScanner struct {
	IP   string
	Lock *semaphore.Weighted
}

PortScanner struct

func (*PortScanner) Start

func (ps *PortScanner) Start(first, last int, timeout time.Duration)

Start creates a channel to begin the port scan.

type PortState

type PortState uint8

PortState type

const (
	PortUnknown PortState = iota
	PortOpen
	PortClosed
	PortFiltered
)

Jump to

Keyboard shortcuts

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