port

package
v0.0.0-...-40bf051 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TCP_REGISTER_NAME       = "TCP"
	UDPREGISTER_NAME        = "UDP"
	DEFAULT_PORTS     uint8 = 0
	ALL_PORTS         uint8 = 1
	CUSTOM_PORTS      uint8 = 2
)

Variables

This section is empty.

Functions

func GetTCPScanner

func GetTCPScanner() *common.Scanner

Types

type RandArea

type RandArea [2]int

type TCPResult

type TCPResult struct {
	icmp.ICMPScanResult
	Port layers.TCPPort
}

type TCPScanner

type TCPScanner struct {
	common.IScanner
	SrcPort      layers.TCPPort
	OpenPorts    cmap.ConcurrentMap[netip.Addr, cmap.ConcurrentMap[layers.TCPPort, bool]]
	Opts         gopacket.SerializeOptions
	UseFullTCP   bool
	PortScanType uint8
	Ports        []layers.TCPPort
	UseRandom    bool
	Scanner      *common.Scanner
}

func (*TCPScanner) Close

func (t *TCPScanner) Close()

func (*TCPScanner) GenerateTarget

func (t *TCPScanner) GenerateTarget(ip netip.Addr, iface common.GSIface, s *common.Scanner)

func (*TCPScanner) GenerateTargetByPrefix

func (t *TCPScanner) GenerateTargetByPrefix(prefix netip.Prefix, iface common.GSIface, s *common.Scanner)

func (*TCPScanner) Init

func (t *TCPScanner) Init(s *common.Scanner)

func (*TCPScanner) RecvTCP

func (t *TCPScanner) RecvTCP(packet gopacket.Packet) interface{}

func (*TCPScanner) SendSYNACK

func (t *TCPScanner) SendSYNACK(target *TCPTarget)

type TCPTarget

type TCPTarget struct {
	SrcIP    []byte
	DstIP    []byte
	DstPorts *[]layers.TCPPort
	Ack      uint32
	SrcMac   net.HardwareAddr
	DstMac   net.HardwareAddr
	Handle   *pcap.Handle
}

Jump to

Keyboard shortcuts

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