scan

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ScanResult

type ScanResult struct {
	Host      string
	Port      int
	Open      bool
	Latency   time.Duration
	Timestamp time.Time
}

ScanResult represents the result of a port scan

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

Scanner provides fast TCP port scanning with a worker pool

func NewScanner

func NewScanner(workerCount int) *Scanner

NewScanner creates a new port scanner with the specified number of workers

func (*Scanner) GetOpenPortsForHost

func (s *Scanner) GetOpenPortsForHost(host string, db *storage.Database) ([]int, error)

GetOpenPortsForHost retrieves all open ports found for a specific host

func (*Scanner) ScanHosts

func (s *Scanner) ScanHosts(ctx context.Context, hosts []string, ports []int, db *storage.Database)

ScanHosts scans a list of hosts for open ports

Jump to

Keyboard shortcuts

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