Documentation
¶
Index ¶
- 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
- type Scanner
- func (s *Scanner) Close()
- func (s *Scanner) OnSubmitTask(i func(addr string, port int))
- func (s *Scanner) RandomScan(host string, port string, noWait bool) error
- func (s *Scanner) RegisterARPHandler(dst string, handler arpHandler) error
- func (s *Scanner) RegisterSynAckHandler(tag string, handler synAckHandler) error
- func (s *Scanner) Scan(host string, port string, noWait bool) error
- func (s *Scanner) SetRateLimit(ms float64, count int)
- func (s *Scanner) UnregisterARPHandler(dst string)
- func (s *Scanner) UnregisterSynAckHandler(tag string)
- func (s *Scanner) WaitChannelEmpty()
- func (s *Scanner) WaitOpenPort(ctx context.Context, handler synAckHandler) error
- func (s *Scanner) WaitOpenPortAsync(ctx context.Context, handler synAckHandler) error
- func (s *Scanner) WaitOpenPortWithTimeout(timeout time.Duration, handler synAckHandler) error
- type SynScanResult
Constants ¶
This section is empty.
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 // 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
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func (*Scanner) OnSubmitTask ¶
func (*Scanner) RandomScan ¶
func (*Scanner) RegisterARPHandler ¶
func (*Scanner) RegisterSynAckHandler ¶
func (*Scanner) SetRateLimit ¶
func (*Scanner) UnregisterARPHandler ¶
func (*Scanner) UnregisterSynAckHandler ¶
func (*Scanner) WaitChannelEmpty ¶
func (s *Scanner) WaitChannelEmpty()
func (*Scanner) WaitOpenPort ¶
func (*Scanner) WaitOpenPortAsync ¶
type SynScanResult ¶
func (*SynScanResult) Show ¶
func (s *SynScanResult) Show()
func (*SynScanResult) String ¶
func (s *SynScanResult) String() string
Click to show internal directories.
Click to hide internal directories.