gomap

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanSocketBind

func CanSocketBind(laddr string) bool

func CreateHostRange

func CreateHostRange(netw string) []string

createHostRange converts a input ip addr string to a slice of ips on the cidr

func GetLocalIP

func GetLocalIP() (string, error)

getLocalRange returns local ip range or defaults on error to most common

func GetLocalRange

func GetLocalRange() string

getLocalRange returns local ip range or defaults on error to most common

Types

type IPScanResult

type IPScanResult struct {
	Hostname string
	IP       []net.IP
	Results  []portResult
}

IPScanResult contains the results of a scan on a single ip

func ScanIP

func ScanIP(hostname string, proto string, fastscan bool, stealth bool, port int) (*IPScanResult, error)

ScanIP scans a single IP for open ports

func (*IPScanResult) Json

func (results *IPScanResult) Json() (string, error)

Contains a marshaled struct containing the results for a ip scan

func (*IPScanResult) String

func (results *IPScanResult) String() string

String with the results of a single scanned IP

type JsonIP

type JsonIP struct {
	IP       string
	Hostname string
	Active   bool
	Ports    []string
}

JsonIP contains the results for a single JSON entry

type JsonRange

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

JsonRange contains a slice of of JsonIP results

type RangeScanResult

type RangeScanResult []*IPScanResult

RangeScanResult contains multiple IPScanResults

func ScanRange

func ScanRange(proto string, fastscan bool, stealth bool, port int) (RangeScanResult, error)

ScanRange scans every address on a CIDR for open ports

func (RangeScanResult) Json

func (results RangeScanResult) Json() (string, error)

Contains a marshaled struct containing the results for a range scan

func (RangeScanResult) String

func (results RangeScanResult) String() string

String with the results of multiple scanned IP's

Jump to

Keyboard shortcuts

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