scanner

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Top1000Ports = []int{}/* 1000 elements not displayed */

source nMap

View Source
var Top100Ports = []int{
	80, 23, 443, 21, 22, 25, 3389, 110, 445, 139, 143, 53, 135, 3306, 8080, 1723, 111, 995, 993, 5900, 1025, 587, 8888, 199, 1720, 465, 548, 113, 81, 6001, 10000, 514, 5060, 179, 1026, 2000, 8443, 8000, 32768, 554, 26, 1433, 49152, 2001, 515, 8008, 49154, 1027, 5666, 646, 5000, 5631, 631, 49153, 8081, 2049, 88, 79, 5800, 106, 2121, 1110, 49155, 6000, 513, 990, 5357, 427, 49156, 543, 544, 5101, 144, 7, 389, 8009, 3128, 444, 9999, 5009, 7070, 5190, 3000, 5432, 1900, 3986, 13, 1029, 9, 5051, 6646, 49157, 1028, 873, 1755, 2717, 4899, 9100, 119, 37,
}

source nMap

Functions

This section is empty.

Types

type BannerResult

type BannerResult struct {
	Port    int    `json:"port"`
	Banner  string `json:"banner,omitempty"`
	Service string `json:"service"`
	Version string `json:"version,omitempty"`
	OS      string `json:"os,omitempty"`
}

func GrabBanner

func GrabBanner(host string, port int, timeout time.Duration) (BannerResult, error)

func ParseBanner

func ParseBanner(result BannerResult) BannerResult

Took top 6 most commonly encountered services, might add on to it later

type PingResult

type PingResult struct {
	IP      string  `json:"ip"`
	Alive   bool    `json:"alive"`
	Latency float64 `json:"latency_ms,omitempty"`
	Error   string  `json:"error,omitempty"`
}

func PingHost

func PingHost(host string, timeout time.Duration) PingResult

func PingHosts

func PingHosts(hosts []string, timeout time.Duration, workers int) ([]PingResult, error)

func SweepCIDR

func SweepCIDR(cidr string, timeout time.Duration, workers int) ([]PingResult, error)

type ScanResult

type ScanResult struct {
	Port  int    `json:"port"`
	State string `json:"state"`
}

func ScanPorts

func ScanPorts(host string, ports []int, timeout time.Duration, workers int) ([]ScanResult, error)

Jump to

Keyboard shortcuts

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