scanner

package
v0.0.0-...-4a56adb Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedProtocol = errors.New("unsupported protocol")

ErrUnsupportedProtocol returned when requested to scan an unsupported protocol

Functions

func ReadKeaConfig

func ReadKeaConfig() (content []byte, err error)

ReadKeaConfig reads the config configuration file and returns its data

func ScanNetworks

func ScanNetworks(subnetsToScan []string, site []string)

ScanNetworks scan specific or all networks and try to find chassis, blades and servers

func ScanNetworksWorker

func ScanNetworksWorker()

ScanNetworksWorker scan specific or all networks and try to find chassis, blades and servers

Types

type Dhcp4

type Dhcp4 struct {
	Subnet4 []*Subnet4 `json:"subnet4"`
}

Dhcp4 contains the dhcp information for ipv4 networks

type Kea

type Kea struct {
	Dhcp4 *Dhcp4 `json:"Dhcp4"`
}

Kea is the main entry for parsing the kea config file

type OptionData

type OptionData struct {
	Data string `json:"data"`
	Name string `json:"name"`
}

OptionData contains the options send to the clients during the dhcp request

type Result

type Result int

Result is the result of the probe; the appropriate "IsXXXX()" function should be used to evaluate it.

func Probe

func Probe(protocol, host string, port int) (r Result, err error)

Probe determines whether the specified port on the on the specified host is potentially accepting input via the specified network protocol.

func (Result) String

func (r Result) String() string

String returns the probe result as a string.

type Subnet4

type Subnet4 struct {
	OptionData []*OptionData `json:"option-data"`
	Subnet     string        `json:"subnet"`
}

Subnet4 contains all the subnets managed by Kea

type ToScan

type ToScan struct {
	CIDR string `json:"cidr"`
	Site string `json:"site"`
}

ToScan payload message to scan a network

func ListSubnets

func ListSubnets(subnetsToQuery []string, site []string) (subnets []*ToScan)

ListSubnets all or a list of given subnets

func LoadSubnets

func LoadSubnets(source string, subnetsToScan []string, site []string) (subnets []*ToScan)

func LoadSubnetsFromKea

func LoadSubnetsFromKea(content []byte) (subnets []*ToScan)

LoadSubnetsFromKea from kea.cfg

Jump to

Keyboard shortcuts

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