Documentation ¶
Index ¶
- Constants
- func AllFlags(pkt *layers.TCP) string
- func BPFFilter(r *scan.Range) (filter string, maxPacketLength int)
- func EmptyFlags(*layers.TCP) string
- func SYNACKBPFFilter(r *scan.Range) (filter string, maxPacketLength int)
- func TrueFilter(*layers.TCP) bool
- type PacketFiller
- type PacketFillerOption
- func WithACK() PacketFillerOption
- func WithCWR() PacketFillerOption
- func WithECE() PacketFillerOption
- func WithFIN() PacketFillerOption
- func WithFillerVPNmode(vpnMode bool) PacketFillerOption
- func WithNS() PacketFillerOption
- func WithPSH() PacketFillerOption
- func WithRST() PacketFillerOption
- func WithSYN() PacketFillerOption
- func WithURG() PacketFillerOption
- type PacketFilterFunc
- type PacketFlagsFunc
- type ScanMethod
- type ScanMethodOption
- type ScanResult
Constants ¶
View Source
const ( SYNScanType = "tcpsyn" FINScanType = "tcpfin" NULLScanType = "tcpnull" XmasScanType = "tcpxmas" FlagsScanType = "tcpflags" )
View Source
const MaxPacketLength = 1518
Set to typical maximum Ethernet frame size = MTU (1500 bytes) + Ethernet header (14 bytes) + FCS (4 bytes)
Variables ¶
This section is empty.
Functions ¶
func EmptyFlags ¶
func TrueFilter ¶
Types ¶
type PacketFiller ¶
type PacketFiller struct { SYN bool ACK bool FIN bool RST bool PSH bool URG bool ECE bool CWR bool NS bool // contains filtered or unexported fields }
func NewPacketFiller ¶
func NewPacketFiller(opts ...PacketFillerOption) *PacketFiller
func (*PacketFiller) Fill ¶
func (f *PacketFiller) Fill(packet gopacket.SerializeBuffer, r *scan.Request) (err error)
type PacketFillerOption ¶
type PacketFillerOption func(f *PacketFiller)
func WithACK ¶
func WithACK() PacketFillerOption
func WithCWR ¶
func WithCWR() PacketFillerOption
func WithECE ¶
func WithECE() PacketFillerOption
func WithFIN ¶
func WithFIN() PacketFillerOption
func WithFillerVPNmode ¶
func WithFillerVPNmode(vpnMode bool) PacketFillerOption
func WithNS ¶
func WithNS() PacketFillerOption
func WithPSH ¶
func WithPSH() PacketFillerOption
func WithRST ¶
func WithRST() PacketFillerOption
func WithSYN ¶
func WithSYN() PacketFillerOption
func WithURG ¶
func WithURG() PacketFillerOption
type PacketFilterFunc ¶
type PacketFlagsFunc ¶
type ScanMethod ¶
type ScanMethod struct { scan.PacketSource // contains filtered or unexported fields }
func NewScanMethod ¶
func NewScanMethod(scanType string, psrc scan.PacketSource, results scan.ResultChan, opts ...ScanMethodOption) *ScanMethod
func (*ScanMethod) ProcessPacketData ¶
func (s *ScanMethod) ProcessPacketData(data []byte, _ *gopacket.CaptureInfo) (err error)
func (*ScanMethod) Results ¶
func (s *ScanMethod) Results() <-chan scan.Result
type ScanMethodOption ¶
type ScanMethodOption func(s *ScanMethod)
func WithPacketFilterFunc ¶
func WithPacketFilterFunc(pktFilter PacketFilterFunc) ScanMethodOption
func WithPacketFlagsFunc ¶
func WithPacketFlagsFunc(pktFlags PacketFlagsFunc) ScanMethodOption
func WithScanVPNmode ¶
func WithScanVPNmode(vpnMode bool) ScanMethodOption
type ScanResult ¶
type ScanResult struct { ScanType string `json:"scan"` IP string `json:"ip"` Port uint16 `json:"port"` Flags string `json:"flags,omitempty"` }
func (*ScanResult) ID ¶
func (r *ScanResult) ID() string
func (ScanResult) MarshalEasyJSON ¶
func (v ScanResult) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ScanResult) MarshalJSON ¶
func (v ScanResult) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ScanResult) String ¶
func (r *ScanResult) String() string
func (*ScanResult) UnmarshalEasyJSON ¶
func (v *ScanResult) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ScanResult) UnmarshalJSON ¶
func (v *ScanResult) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
Click to show internal directories.
Click to hide internal directories.