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