service

package
v0.0.0-...-0b588c2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GSRULE_TYPE_TCP     uint8 = 0
	GSRULE_TYPE_UDP     uint8 = 1
	GSRULE_TYPE_TCP_MUX uint8 = 2
	GSRULE_TYPE_UDP_MUX uint8 = 3

	GSRULE_DATA_TYPE_MATCH    uint8 = 0
	GSRULE_DATA_TYPE_SEND     uint8 = 1
	GSRULE_DATA_TYPE_SEND_MUX uint8 = 2
	GSRULE_DATA_TYPE_PROTOCOL uint8 = 3
	GSRULE_DATA_TYPE_CPE      uint8 = 4
	GSRULE_DATA_TYPE_CPE23    uint8 = 5
	GSRULE_DATA_TYPE_CVE      uint8 = 6
	GSRULE_DATA_TYPE_CNVD     uint8 = 7
	GSRULE_DATA_TYPE_CNNVD    uint8 = 8
	GSRULE_DATA_TYPE_GO       uint8 = 9
	GSRULE_DATA_TYPE_PY       uint8 = 10
	GSRULE_DATA_TYPE_SH       uint8 = 11
	GSRULE_DATA_TYPE_OTHER    uint8 = 12
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GScanRule

type GScanRule struct {
	Version  uint8
	RuleType uint8
	// Len      uint8
	Items []GScanRuleItem
}

type GScanRuleItem

type GScanRuleItem struct {
	DataType uint8
	// Len      uint32
	Data []byte
}

type ScanEnv

type ScanEnv struct {
	LastResp []byte
	Vals     map[string][]byte
}

type ServiceInfo

type ServiceInfo struct {
	Conn       net.Conn
	Banner     []byte
	RespMap    cmap.ConcurrentMap[string, []byte]
	IsTLS      bool
	HasMatched bool
}

type ServiceResult

type ServiceResult struct {
	port.TCPResult
	CPE      string
	Protocol string
}

type ServiceScanner

type ServiceScanner struct {
	TargetCh chan *ServiceTarget
	ResultCh chan *ServiceResult
	Timeout  time.Duration
	Workers  *ants.PoolWithFunc
	Services cmap.ConcurrentMap[netip.Addr, cmap.ConcurrentMap[layers.TCPPort, ServiceInfo]]

	PortScanType uint8
	Ports        []layers.TCPPort
	// contains filtered or unexported fields
}

func GetServiceScanner

func GetServiceScanner() *ServiceScanner

func (*ServiceScanner) ScanLocalNet

func (s *ServiceScanner) ScanLocalNet() chan struct{}

func (*ServiceScanner) ScanMany

func (s *ServiceScanner) ScanMany(targetIPs []netip.Addr) chan struct{}

func (*ServiceScanner) ScanPrefix

func (s *ServiceScanner) ScanPrefix(prefix netip.Prefix) chan struct{}

type ServiceTarget

type ServiceTarget struct {
	IP   netip.Addr
	Port layers.TCPPort
	Rule GScanRule
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳