gen-services

command
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Command gen-services turns the IANA service-names-port-numbers CSV snapshot into a Go map literal for internal/output/service.go.

Usage:

gen-services -in data/iana-service-names-port-numbers.csv \
             -out internal/output/service.go

The generator:

  • Reads only TCP rows with a non-blank service name.
  • Normalises names (lowercase, strips whitespace, first token only).
  • Prefers the first IANA assignment for a given port (earliest row).
  • Emits every assigned TCP port (~6k entries; binary delta ~150 KB). The -max flag caps the count when set > 0, prioritising ports that appear in internal/portscan/top100 first so well-known high-numbered ports (3389, 8080, 8443) survive any truncation.

Jump to

Keyboard shortcuts

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