diff --git a/v1/pkg/dns/a.go b/v1/pkg/dns/a.go index b8d3946..a0502d7 100644 --- a/v1/pkg/dns/a.go +++ b/v1/pkg/dns/a.go @@ -4,7 +4,6 @@ import ( "errors" "fmt" "math/rand" - "net" "strings" "github.com/miekg/dns" @@ -42,7 +41,7 @@ func (q *Query) A() { } // Store IPs - var ips []net.IP + var ips []string // Go through answers for _, answer := range resp.Answer { @@ -53,7 +52,7 @@ func (q *Query) A() { } // Append IPv4 - ips = append(ips, record.A) + ips = append(ips, record.A.String()) } // No IPs found diff --git a/v1/pkg/dns/aaaa.go b/v1/pkg/dns/aaaa.go index 82810ae..04e987f 100644 --- a/v1/pkg/dns/aaaa.go +++ b/v1/pkg/dns/aaaa.go @@ -4,7 +4,6 @@ import ( "errors" "fmt" "math/rand" - "net" "strings" "github.com/miekg/dns" @@ -42,7 +41,7 @@ func (q *Query) AAAA() { } // Store IPs - var ips []net.IP + var ips []string // Go through answers for _, answer := range resp.Answer { @@ -53,7 +52,7 @@ func (q *Query) AAAA() { } // Append IPv6 - ips = append(ips, record.AAAA) + ips = append(ips, record.AAAA.String()) } // No IPs found diff --git a/v1/pkg/dns/dns.go b/v1/pkg/dns/dns.go index f54fa12..0e98a46 100644 --- a/v1/pkg/dns/dns.go +++ b/v1/pkg/dns/dns.go @@ -2,7 +2,6 @@ package dns import ( "math/rand" - "net" "time" "github.com/miekg/dns" @@ -21,8 +20,8 @@ type Query struct { type Result struct { Domain string // Target domain Subdomain string // Target subdomain - IPv4 []net.IP // IPv4 hosts - IPv6 []net.IP // IPv6 hosts + IPv4 []string // IPv4 hosts + IPv6 []string // IPv6 hosts Error error // Error response }