utils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package utils offer a set of helpers for the scanner

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFreeTCPPort

func GetFreeTCPPort() (int, error)

Listen on port 0 to get a free port assigned by the system. Get the actual address, including the assigned port.

func GetServiceName added in v1.0.1

func GetServiceName(port, proto string) (string, error)

GetServiceName opens the services.csv downloaded from https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.csv and returns the service name for a given port number and protocol

Types

type ServiceInfo added in v1.0.1

type ServiceInfo struct {
	ServiceName string
	PortNumber  string
	Protocol    string
}

ServiceInfo represents information about a service

Jump to

Keyboard shortcuts

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