nmap

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

nmap/nmap.go

Index

Constants

This section is empty.

Variables

View Source
var Scan = scanImpl

Scan is a function variable that can be overridden for testing.

Functions

func ScanWithConfig

func ScanWithConfig(config ScanConfig) (sirius.Host, error)

ScanWithConfig performs an Nmap scan with the provided configuration

Types

type ScanConfig

type ScanConfig struct {
	Target            string          // Target to scan
	Protocols         []string        // Protocols to select scripts for (deprecated, use ScriptList)
	ScriptList        []string        // Explicit list of scripts to run (overrides Protocols)
	PortRange         string          // Explicit port range (e.g., "1-1000", "80,443,3389")
	SkipHostDiscovery bool            // When true, use -Pn flag (skip host discovery, assume online)
	Ctx               context.Context // Context for cancellation support
}

ScanConfig holds configuration for the Nmap scan

type ScriptResult

type ScriptResult struct {
	ID       string            `json:"id"`       // Script ID
	Output   string            `json:"output"`   // Raw script output
	Elements map[string]string `json:"elements"` // Structured elements from script
}

ScriptResult represents the parsed output of an NSE script

Jump to

Keyboard shortcuts

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