scanner

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	IP        string
	Hostname  string
	Port22    bool
	Port23    bool
	SSHPort   int // SSH port
	Status    string
	Username  string // SSH username
	Password  string // SSH password
	Connected bool   // SSH connection status
}

Device represents a discovered device

func ScanSingleHost

func ScanSingleHost(ctx context.Context, ip string) (*Device, error)

ScanSingleHost scans a single host for SSH/Telnet ports

func ScanSubnet

func ScanSubnet(ctx context.Context, subnet string, progressCallback func(string)) ([]Device, error)

ScanSubnet scans a subnet for devices with SSH (22) or Telnet (23) ports open

type PortResult

type PortResult struct {
	Port    int
	State   string
	Service string
}

PortResult represents the structure that gomap returns for each port This is based on the gomap library's internal structure

Jump to

Keyboard shortcuts

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