Change IP struct to string
This commit is contained in:
parent
6ad6e3429f
commit
51db0308cf
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user