portscan

package
v0.0.0-...-75a46ef Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: BSD-3-Clause, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHost

func NewHost(hostName string) (*host, error)

Validates that a new host can be created based on hostName

func Run

func Run(task structs.Task)

func ValidIPv4

func ValidIPv4(host string) bool

Helper function to validate IPv4

Types

type CIDR

type CIDR struct {
	Range string  `json:"range"`
	Hosts []*host `json:"hosts"`
}

func NewCIDR

func NewCIDR(cidrStr string) (*CIDR, error)

func (*CIDR) FormatOpenPorts

func (cidrRange *CIDR) FormatOpenPorts() string

func (*CIDR) ScanHosts

func (cidrRange *CIDR) ScanHosts(portList []PortRange, waitTime time.Duration, job *structs.Job)

type PortRange

type PortRange struct {
	Start int
	End   int
}

type PortScanParams

type PortScanParams struct {
	Hosts []string `json:"hosts"` // Can also be a cidr
	Ports string   `json:"ports"`
}

Jump to

Keyboard shortcuts

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