go modules
parent
8ddae53079
commit
dad9446bc0
|
@ -23,7 +23,7 @@ var DefaultResolvers = []string{
|
||||||
|
|
||||||
// Resolver is a struct for resolving DNS names
|
// Resolver is a struct for resolving DNS names
|
||||||
type Resolver struct {
|
type Resolver struct {
|
||||||
DnsClient *dnsx.DNSX
|
DNSClient *dnsx.DNSX
|
||||||
Resolvers []string
|
Resolvers []string
|
||||||
rand *rand.Rand
|
rand *rand.Rand
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ func (r *ResolutionPool) InitWildcards(domain string) error {
|
||||||
for i := 0; i < maxWildcardChecks; i++ {
|
for i := 0; i < maxWildcardChecks; i++ {
|
||||||
uid := xid.New().String()
|
uid := xid.New().String()
|
||||||
|
|
||||||
hosts, err := r.DnsClient.Lookup(uid + "." + domain)
|
hosts, err := r.DNSClient.Lookup(uid + "." + domain)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ func (r *ResolutionPool) resolveWorker() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
hosts, err := r.DnsClient.Lookup(task.Host)
|
hosts, err := r.DNSClient.Lookup(task.Host)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
r.Results <- Result{Type: Error, Host: task.Host, Source: task.Source, Error: err}
|
r.Results <- Result{Type: Error, Host: task.Host, Source: task.Source, Error: err}
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -63,7 +63,7 @@ func (r *Runner) initializeActiveEngine() error {
|
||||||
|
|
||||||
r.resolverClient = resolve.New()
|
r.resolverClient = resolve.New()
|
||||||
var err error
|
var err error
|
||||||
r.resolverClient.DnsClient, err = dnsx.New(dnsx.Options{BaseResolvers: resolvers})
|
r.resolverClient.DNSClient, err = dnsx.New(dnsx.Options{BaseResolvers: resolvers})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue