mirror of
https://github.com/nxtrace/NTrace-core.git
synced 2025-08-12 06:26:39 +00:00
21 lines
420 B
Go
21 lines
420 B
Go
package util
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func TestDNS(t *testing.T) {
|
|
resolver := DNSSB()
|
|
ips, _ := resolver.LookupHost(context.Background(), "www.bing.com")
|
|
fmt.Println(ips)
|
|
}
|
|
|
|
func TestDomainLookUp(t *testing.T) {
|
|
ips, _ := DomainLookUp("pek-4134.endpoint.nxtrace.org.", "all", "", false)
|
|
fmt.Println(ips)
|
|
ips, _ = DomainLookUp("pek-4134.endpoint.nxtrace.org.", "4", "", false)
|
|
fmt.Println(ips)
|
|
}
|