Documentation ¶
Index ¶
- Constants
- type Config
- type ConfigOption
- func CreateConfigOptionsByTargetNetworkOrDomain(targetRaw string, duration time.Duration) ([]ConfigOption, error)
- func WithDefaultSourceIP(ip net.IP) ConfigOption
- func WithFetchGatewayHardwareAddressTimeout(timeout time.Duration) ConfigOption
- func WithGatewayIP(ip net.IP) ConfigOption
- func WithIntervalMilliseconds(interval int) ConfigOption
- func WithNetInterface(iface *net.Interface) ConfigOption
- func WithPacketsPerSeconds(count int) ConfigOption
- func WithTcpFilter(filter func(tcp *layers.TCP) bool) ConfigOption
- func WithTcpSetter(setter func(tcp *layers.TCP)) ConfigOption
- type FinScanResult
- type Scanner
- func (s *Scanner) IsMacCached() bool
- func (s *Scanner) OnSubmitTask(i func(addr string, port int))
- func (s *Scanner) RandomScan(host string, port string, noWait bool) error
- func (s *Scanner) RegisterNoRspHandler(tag string, handler noRspHandler) error
- func (s *Scanner) RegisterRstAckHandler(tag string, handler rstAckHandler) error
- func (s *Scanner) Scan(host string, port string, noWait bool) error
- func (s *Scanner) SetRateLimit(ms float64, count int)
- func (s *Scanner) UnregisterNoRspHandler(tag string)
- func (s *Scanner) UnregisterRstAckHandler(tag string)
- func (s *Scanner) WaitChannelEmpty()
- func (s *Scanner) WaitOpenPort(ctx context.Context, handler rstAckHandler) error
- func (s *Scanner) WaitOpenPortAsync(ctx context.Context, handler rstAckHandler) error
- func (s *Scanner) WaitOpenPortWithTimeout(timeout time.Duration, handler rstAckHandler) error
- type TcpFlag
Constants ¶
View Source
const ( OPEN_STATE = iota CLOSED_STATE FILTERED_STATE UNFILTERED_STATE OPEN_FILTERED_STATE CLOSED_FILTERED_STATE )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // 发包必须的几个字段 Iface *net.Interface GatewayIP net.IP SourceIP net.IP TcpSetter func(tcp *layers.TCP) TcpFilter func(tcp *layers.TCP) bool // Fetch Gateway Hardware Address TimeoutSeconds FetchGatewayHardwareAddressTimeout time.Duration }
func NewConfig ¶
func NewConfig(options ...ConfigOption) (*Config, error)
func NewDefaultConfig ¶
func NewDefaultConfig(extra ...ConfigOption) (*Config, error)
type ConfigOption ¶
type ConfigOption func(config *Config)
func CreateConfigOptionsByTargetNetworkOrDomain ¶
func CreateConfigOptionsByTargetNetworkOrDomain( targetRaw string, duration time.Duration, ) ( []ConfigOption, error, )
func WithDefaultSourceIP ¶
func WithDefaultSourceIP(ip net.IP) ConfigOption
func WithFetchGatewayHardwareAddressTimeout ¶
func WithFetchGatewayHardwareAddressTimeout(timeout time.Duration) ConfigOption
func WithGatewayIP ¶
func WithGatewayIP(ip net.IP) ConfigOption
func WithIntervalMilliseconds ¶
func WithIntervalMilliseconds(interval int) ConfigOption
func WithNetInterface ¶
func WithNetInterface(iface *net.Interface) ConfigOption
func WithPacketsPerSeconds ¶
func WithPacketsPerSeconds(count int) ConfigOption
func WithTcpFilter ¶
func WithTcpFilter(filter func(tcp *layers.TCP) bool) ConfigOption
func WithTcpSetter ¶
func WithTcpSetter(setter func(tcp *layers.TCP)) ConfigOption
type FinScanResult ¶
func (*FinScanResult) Show ¶
func (s *FinScanResult) Show()
func (*FinScanResult) String ¶
func (s *FinScanResult) String() string
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func (*Scanner) IsMacCached ¶
func (*Scanner) OnSubmitTask ¶
func (*Scanner) RandomScan ¶
func (*Scanner) RegisterNoRspHandler ¶
func (*Scanner) RegisterRstAckHandler ¶
func (*Scanner) SetRateLimit ¶
func (*Scanner) UnregisterNoRspHandler ¶
func (*Scanner) UnregisterRstAckHandler ¶
func (*Scanner) WaitChannelEmpty ¶
func (s *Scanner) WaitChannelEmpty()
func (*Scanner) WaitOpenPort ¶
func (*Scanner) WaitOpenPortAsync ¶
Click to show internal directories.
Click to hide internal directories.