Documentation ¶
Overview ¶
Package netUtil contains all the publicly exposed networking functionality of gort like the port scanning types and functionality provided in 'netUtil.pScan'.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Port ¶
type Port struct { // PortNo is the number of the target port. // A port number is a 16-bit unsigned integer and thus can range from 0 to 65535. PortNo uint16 // Protocol is the transport protocol of the port (either TCP or UDP). Protocol string // Service is the default service running on a given port as specified by IANA. Service string // Description is a short description of the Service. Description string }
Port represents a single target port.
func NewPort ¶
NewPort returns a pointer to a new instance of Port. portNo is the port number of the new Port and proto is the transport protocol used by it. service is the default service running on a given port as specified by IANA and desc is a short description of that service. To initialize a new port you usually should use ParsePortString as this method will try to lookup the service and description of the given ports automatically.
type Ports ¶
type Ports []*Port
Ports is a list of Port pointers.
func ParsePortString ¶
ParsePortString parses ports and returns the newly initialized Ports.
ports is comma separated list of values that can be in either of the following formats: - A single port: 23 - A range of ports: 23-100
The parameter proto specifies the transport protocol of the given ports and dataFolder is the path to the folder which contains the 'service-names-port-numbers.xml' file by IANA that is used for port service lookups. (The file can be found under https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml).
Directories ¶
Path | Synopsis |
---|---|
Package macLookup provides a wrapper around the vendor lookup API of 'https://macvendors.co'
|
Package macLookup provides a wrapper around the vendor lookup API of 'https://macvendors.co' |
Package pScan provides all the port scanning capability and the Target and Targets type on which those scans can be performed.
|
Package pScan provides all the port scanning capability and the Target and Targets type on which those scans can be performed. |