q understand urls, and strips them
This commit is contained in:
parent
74cf502baf
commit
1e795e3dd1
|
@ -182,6 +182,13 @@ Flags:
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, v := range qname {
|
for _, v := range qname {
|
||||||
|
if strings.HasPrefix(v, "http://") {
|
||||||
|
v = v[7:]
|
||||||
|
if v[len(v)-1] == '/' {
|
||||||
|
v = v[:len(v)-1]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m.Question[0] = dns.Question{dns.Fqdn(v), qtype, qclass}
|
m.Question[0] = dns.Question{dns.Fqdn(v), qtype, qclass}
|
||||||
m.Id = dns.Id()
|
m.Id = dns.Id()
|
||||||
if *query {
|
if *query {
|
||||||
|
|
Loading…
Reference in New Issue