Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ingest ¶
Ingest looks up the named scanner and runs it against raw. It is the one-call entry point the CLI uses; an unknown name yields an error that lists the scanners that are registered.
Types ¶
type Ingestor ¶
type Ingestor interface {
// Name is the scanner identifier ("nmap", "zgrab2", ...). It is both the key the
// Ingestor registers under and the value stamped onto Run.Scanner.
Name() string
// Ingest parses one scanner's raw output into a scan.Run. Implementations MUST NOT
// touch the database: they only build the in-memory Run tree. Deduplication, merge and
// storage happen downstream via Scans.Create (which folds through host.IngestHosts), so
// the same identity/merge primitives are shared with every other ingest path.
Ingest(raw []byte) (*scanpb.Run, error)
}
Ingestor maps one scanner's native output into the shared scan model. Any tool that can emit bytes — nmap XML, masscan/zgrab JSON, a naabu port list — becomes a contributor to the same objects by implementing this one method. nmap.FromXML already has this shape.
Click to show internal directories.
Click to hide internal directories.