port

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TopTcpPorts = []uint16{}/* 1002 elements not displayed */

TopTcpPorts 常见端口 ref https://github.com/robertdavidgraham/masscan/blob/master/src/main-conf.c

Functions

func IsInPortRange

func IsInPortRange(port uint16, portRanges [][]uint16) bool

IsInPortRange 判断port是否在端口范围里

func ParsePortRangeStr

func ParsePortRangeStr(portStr string) (out [][]uint16, err error)

ParsePortRangeStr 解析端口字符串

func ShuffleParseAndMergeTopPorts

func ShuffleParseAndMergeTopPorts(portStr string) (ports []uint16, err error)

ShuffleParseAndMergeTopPorts shuffle parse portStr and merge TopTcpPorts

Types

type HttpInfo added in v1.3.0

type HttpInfo struct {
	StatusCode int      // 状态码
	ContentLen int      // 相应包大小
	Url        string   // Url
	Location   string   // 302、301重定向路径
	Title      string   // 标题
	Server     string   // 服务名
	TlsCN      string   // tls使用者名称
	TlsDNS     []string // tlsDNS列表
	Fingers    []string // 识别到的web指纹
}

HttpInfo Http服务基础信息

func (*HttpInfo) String added in v1.3.0

func (hi *HttpInfo) String() string

type OpenIpPort

type OpenIpPort struct {
	Ip       net.IP
	Port     uint16
	Service  string
	Banner   []byte
	HttpInfo *HttpInfo
}

OpenIpPort retChan

func (OpenIpPort) String added in v1.3.0

func (op OpenIpPort) String() string

type Option

type Option struct {
	Rate        int    // 每秒速度限制, 单位: s, 会在1s内平均发送, 相当于每个包之间的延迟
	Timeout     int    // TCP连接响应延迟, 单位: ms
	NextHop     string // pcap dev name
	FingerPrint bool   // 服务探测
	Httpx       bool   // HttpInfo 探测
}

Option ...

type Scanner

type Scanner interface {
	Close()
	Wait()
	Scan(ip net.IP, dst uint16) error
	WaitLimiter() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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