scanner

package
v1.13.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommonPorts = []int{
	21,
	22,
	25,
	53,
	80,
	110,
	143,
	443,
	465,
	587,
	993,
	995,
	3306,
	5432,
	6379,
	8080,
	8443,
	9000,
	11211,
}

CommonPorts defines the ports to scan

View Source
var DefaultProbeConfig = ProbeConfig{
	TLSSkipVerify: true,
	DevMode:       true,
}

DefaultProbeConfig returns the default probe configuration Note: Service probing inherently requires InsecureSkipVerify to detect services with self-signed or invalid certificates

Functions

This section is empty.

Types

type ProbeConfig added in v1.10.0

type ProbeConfig struct {
	// TLSSkipVerify allows skipping TLS verification during probes.
	// This is only for service detection, not for establishing secure connections.
	// Default: true (required for probing unknown services)
	TLSSkipVerify bool
	// DevMode enables less secure options. Must be true for TLSSkipVerify to work.
	DevMode bool
}

ProbeConfig holds configuration for service probing

type ScanResult

type ScanResult struct {
	Services       []Service
	RuleCategories []string // Suricata rule categories to enable
}

ScanResult contains all detected services

func DeepScan

func DeepScan(host string, ports []int) (*ScanResult, error)

DeepScan performs comprehensive service detection with protocol probes

func ScanLocalhost

func ScanLocalhost() (*ScanResult, error)

ScanLocalhost scans localhost for running services

func (*ScanResult) GetServiceSummary

func (sr *ScanResult) GetServiceSummary() string

GetServiceSummary returns a human-readable summary

type Service

type Service struct {
	Port     int
	Protocol string // tcp/udp
	Name     string // http, https, ssh, mysql, dns, etc.
	Banner   string // Service banner/version if detected
}

Service represents a detected network service

func ProbeService

func ProbeService(host string, port int) (*Service, error)

ProbeService performs deep protocol detection on a service

Jump to

Keyboard shortcuts

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