Documentation
¶
Index ¶
- Variables
- type Generator
- func (gen *Generator) AddrWorkerCount() int
- func (gen *Generator) IsActive() bool
- func (gen *Generator) NameWorkerCount() int
- func (gen *Generator) Start()
- func (gen *Generator) StartAddrWorker()
- func (gen *Generator) StartNameWorker()
- func (gen *Generator) Stop()
- func (gen *Generator) StopAddrWorker()
- func (gen *Generator) StopNameWorker()
- func (gen *Generator) System() subsystem.ID
- func (gen *Generator) WorkerCount() int
Constants ¶
This section is empty.
Variables ¶
var Nameserver string
Nameserver contains the address of a nameserver to use for resolving generated IP addresses to names. If it is empty, the operating system's default nameserver is used.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator generates random Hosts, checking them against blacklists and ensuring that the IP address resolves to a valid PTR (i.e. that the generated Host is likely to exist on the Internet).
func New ¶
New creates a new Generator. iCnt is the number of goroutines to spawn for generating IP addresses wCnt is the number of goroutines to spawn for resolving and checking hostnames.
func (*Generator) AddrWorkerCount ¶ added in v0.3.0
AddrWorkerCount returns the number of address generator workers.
func (*Generator) NameWorkerCount ¶ added in v0.3.0
NameWorkerCount return the number name resolver workers.
func (*Generator) Start ¶
func (gen *Generator) Start()
Start sets the Generator's active flag and spawns the worker goroutines.
func (*Generator) StartAddrWorker ¶ added in v0.4.0
func (gen *Generator) StartAddrWorker()
StartAddrWorker stars another address generation worker.
func (*Generator) StartNameWorker ¶ added in v0.4.0
func (gen *Generator) StartNameWorker()
StartNameWorker starts another name resolution worker.
func (*Generator) StopAddrWorker ¶ added in v0.4.0
func (gen *Generator) StopAddrWorker()
StopAddrWorker stops one address generation worker.
func (*Generator) StopNameWorker ¶ added in v0.4.0
func (gen *Generator) StopNameWorker()
StopNameWorker stops one name resolution worker.
func (*Generator) System ¶ added in v0.3.0
System returns the ID of the subsystem, i.e. subsystem.Generator
func (*Generator) WorkerCount ¶ added in v0.3.0
WorkerCount returns the number of active workers.