scanner

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 8 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
	SSHStatus    bool
	TELNETStatus 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 Supports both CIDR notation (e.g., 10.10.0.0/24) and IP ranges (e.g., 10.10.0.0-10.10.2.254)

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