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.
Click to show internal directories.
Click to hide internal directories.