aliveCheck

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 20 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckSYNAvailable

func CheckSYNAvailable() bool

CheckSYNAvailable 检测当前环境是否支持 SYN 扫描

func HostAliveCheck

func HostAliveCheck(ip string, ping bool, timeout time.Duration, fuzz bool) (endFlag bool)

HostAliveCheck 主机存活检测

func PortCheck

func PortCheck(addr string, timeout time.Duration) bool

PortCheck 端口存活检测(传统全连接模式) SYN 高速扫描请使用 SynScanner 批量扫描接口

func RunIcmpLocal

func RunIcmpLocal(ip string, conn *icmp.PacketConn) bool

Types

type SynScanner

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

SynScanner SYN 扫描器

func NewSynScanner

func NewSynScanner(firstIp net.IP, rate int) (*SynScanner, error)

NewSynScanner 创建 SYN 扫描器 firstIp: 用于路由选择的第一个目标 IP(仅第一次有效,后续复用缓存) rate: 每秒发包数,推荐 20000-50000,SYN 扫描可以跑很高的速率

func (*SynScanner) Close

func (ss *SynScanner) Close()

Close 关闭扫描器

func (*SynScanner) GetResults

func (ss *SynScanner) GetResults() <-chan string

GetResults 获取存活端口结果通道

func (*SynScanner) Scan

func (ss *SynScanner) Scan(dstIp net.IP, dstPort int) error

Scan 扫描单个 IP 和端口

func (*SynScanner) Wait

func (ss *SynScanner) Wait()

Wait 等待剩余响应

Jump to

Keyboard shortcuts

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