nmap

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromXML

func FromXML(data []byte) (*scan.Run, error)

FromXML - Given the output of an Nmap Scan as a string in XML format, parse it and return a Run with its contents. If the unmarshalling fails, it returns both the model and the error, so always check the latter.

The run keeps its verbatim input as RawXML: it is the scanner's authoritative output, so it serves both as the decisive run-dedup fingerprint (AreScansIdentical: two nmap scans of one target at different times carry the same Args/Version and would otherwise field-collide, but their raw output differs) and as the per-run snapshot that `scan diff` re-parses to see drift that host unification has folded away in the stored rows.

Types

type Run

type Run scan.Run

Run - The results of an Nmap scan that has been ran. This object is the root of the complete output XML tree of the scan.

func FromRun

func FromRun(pb *scan.Run) *Run

FromRun - If you have ran a Scan and parsed its XML output into an scan.Run protobuf type, you can create a scan out of it.

Jump to

Keyboard shortcuts

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