Update: I extracted the CLI configurations. Still no luck in getting a true positive. The wrapped details are the latest codes.
Source Code
package main
import (
"context"
"crypto/tls"
"fmt"
"net/http"
"net/url"
"os"
"time"
"github.com/openrdap/rdap"
"github.com/openrdap/rdap/bootstrap"
"github.com/openrdap/rdap/bootstrap/cache"
)
func query(b *bootstrap.Client, serverURL string, domain string) *rdap.Domain {
url, _ := url.Parse(serverURL)
if url.Scheme == "" {
url.Scheme = "http"
}
req := rdap.NewAutoRequest(domain)
req = req.WithServer(url)
client := &rdap.Client{
HTTP: &http.Client{
Transport: b.HTTP.Transport,
},
Bootstrap: b,
Verbose: func(text string) {
fmt.Fprintf(os.Stderr, "# %s\n", text)
},
UserAgent: "OpenRDAP v0.0.1",
ServiceProviderExperiment: false,
}
t := 30 * time.Second
fmt.Printf("# app: Using server '%s'\n", req.Server)
fmt.Printf("# app: Timeout is %d\n", t)
ctx, cancel := context.WithTimeout(context.TODO(), t)
defer cancel()
req = req.WithContext(ctx)
resp, err := client.Do(req)
if err != nil {
fmt.Printf("ERROR : %v\n", err)
return nil
}
fmt.Printf("RESP : %#v\n", resp)
if d, ok := resp.Object.(*rdap.Domain); ok {
return d
}
return nil
}
func newBootstrap(serverURL string) *bootstrap.Client {
b := &bootstrap.Client{}
dc := cache.NewDiskCache()
_, _ = dc.InitDir()
b.Cache = dc
b.Cache.SetTimeout(3600 * time.Second)
b.BaseURL, _ = url.Parse(serverURL)
tlsConfig := &tls.Config{InsecureSkipVerify: false}
b.HTTP = &http.Client{
Transport: &http.Transport{
TLSClientConfig: tlsConfig,
},
}
fmt.Printf("# app: Using disk cache (%s)\n", dc.Dir)
fmt.Printf("# app: Bootstrap URL set to '%s'\n", b.BaseURL)
fmt.Printf("# app: Bootstrap cache TTL set to %d seconds\n",
b.Cache.(*cache.DiskCache).Timeout)
return b
}
func seekExample() {
b := newBootstrap("https://data.iana.org/rdap/")
d := query(b, "https://rdap.nic.cz", "example.cz")
if d != nil {
fmt.Printf("ADV : DM responded: Handle=%s Domain=%s\n",
d.Handle,
d.LDHName)
}
}
func seekVeriSign() {
b := newBootstrap("https://data.iana.org/rdap/")
d := query(b, "https://rdap.verisign.com/com/v1", "google.com")
if d != nil {
fmt.Printf("ADV : DM responded: Handle=%s Domain=%s\n",
d.Handle,
d.LDHName)
}
}
func seekMarkMonitor() {
b := newBootstrap("https://data.iana.org/rdap/")
d := query(b, "https://rdap.markmonitor.com/rdap/", "google.com")
if d != nil {
fmt.Printf("ADV : DM responded: Handle=%s Domain=%s\n",
d.Handle,
d.LDHName)
}
}
func main() {
seekMarkMonitor()
fmt.Printf("\n===================\n\n")
seekExample()
fmt.Printf("\n===================\n\n")
seekVeriSign()
}
Basically, if you use the verbose mode against the rdap
application, you get quite some details:
$ rdap -v -s https://rdap.markmonitor.com/rdap/ google.com
# OpenRDAP v0.0.1
#
# rdap: Configuring query...
# rdap: Using server 'https://rdap.markmonitor.com/rdap/'
# rdap: Using disk cache (/home/u0/.openrdap)
# rdap: Bootstrap URL is default 'https://data.iana.org/rdap/'
# rdap: Bootstrap cache TTL set to 3600 seconds
# rdap: Timeout is 30 seconds
#
# client: Running...
# client: Request type : domain
# client: Request query : google.com
# client: Request URL : https://rdap.markmonitor.com/rdap/domain/google.com
# client: RDAP URL #0 is https://rdap.markmonitor.com/rdap/domain/google.com
# client: GET https://rdap.markmonitor.com/rdap/domain/google.com
# client: status-code=200, content-type=application/rdap+json;charset=UTF-8, length=5412 bytes, duration=1.560854689s
# client: Successfully decoded response
#
# rdap: Finished in 1.561515715s
Domain:
Domain Name: google.com
Handle: 2138514_DOMAIN_COM-VRSN
Status: client update prohibited
Status: client transfer prohibited
Status: client delete prohibited
Status: server update prohibited
Status: server transfer prohibited
Status: server delete prohibited
Port43: whois.markmonitor.com
Conformance: rdap_level_0
Conformance: icann_rdap_technical_implementation_guide_0
Conformance: icann_rdap_response_profile_0
Notice:
Title: Terms of Use
Description: By submitting an RDAP query, you agree that you will use this data only for
Description: lawful purposes and that, under no circumstances will you use this data to:
Description: (1) allow, enable, or otherwise support the transmission by email, telephone,
Description: or facsimile of mass, unsolicited, commercial advertising, or spam; or
Description: (2) enable high volume, automated, or electronic processes that send queries,
Description: data, or email to MarkMonitor (or its systems) or the domain name contacts (or
Description: its systems).
Description: MarkMonitor.com reserves the right to modify these terms at any time.
Description: By submitting this query, you agree to abide by this policy.
Description: MarkMonitor is the Global Leader in Online Brand Protection.
Description: MarkMonitor Domain Management(TM)
Description: MarkMonitor Brand Protection(TM)
Description: MarkMonitor AntiCounterfeiting(TM)
Description: MarkMonitor AntiPiracy(TM)
Description: MarkMonitor AntiFraud(TM)
Description: Professional and Managed Services
Description: Visit MarkMonitor at https://www.markmonitor.com
Description: Entity us at +1.8007459229
Description: In Europe, at +44.02032062220
Link: https://www.markmonitor.com/legal/domain-management-terms-and-conditions
Notice:
Title: Status Codes
Description: For more information on domain status codes, please visit https://icann.org/epp.
Link: https://icann.org/epp
Notice:
Title: RDDS Inaccuracy Complaint Form
Description: URL of the ICANN RDDS Inaccuracy Complaint Form: https://www.icann.org/wicf.
Link: https://www.icann.org/wicf
Link: https://rdap.markmonitor.com/rdap/domain/google.com
Event:
Action: expiration
Date: 2028-09-13T07:00:00.000+0000
Event:
Action: registration
Date: 1997-09-15T07:00:00.000+0000
Event:
Action: last update
Date: 2019-09-09T15:39:04.000+0000
Event:
Action: last update of RDAP database
Date: 2019-10-21T05:45:21.000+0000
Secure DNS:
Delegation Signed: false
Entity:
Remark:
Title: REDACTED FOR PRIVACY
Type: Object truncated due to authorization
Description: Some of the data in this object has been removed.
Event:
Action: last update
Date: 2017-12-11T15:40:13.000+0000
Role: administrative
vCard version: 4.0
vCard adr: CA
vCard adr: US
contact_URI: https://domains.markmonitor.com/whois/
Entity:
Remark:
Title: REDACTED FOR PRIVACY
Type: Object truncated due to authorization
Description: Some of the data in this object has been removed.
Event:
Action: last update
Date: 2017-12-11T15:40:13.000+0000
Role: registrant
vCard version: 4.0
vCard org: Google LLC
vCard adr: CA
vCard adr: US
contact_URI: https://domains.markmonitor.com/whois/
Entity:
Remark:
Title: REDACTED FOR PRIVACY
Type: Object truncated due to authorization
Description: Some of the data in this object has been removed.
Event:
Action: last update
Date: 2017-12-11T15:40:13.000+0000
Role: technical
vCard version: 4.0
vCard adr: CA
vCard adr: US
contact_URI: https://domains.markmonitor.com/whois/
Entity:
Handle: 292
Public ID:
Type: IANA Registrar ID
Identifier: 292
Event:
Action: registrar expiration
Date: 2020-09-14T04:00:00.000+0000
Role: registrar
vCard version: 4.0
vCard org: MarkMonitor Inc.
vCard adr: 3540 E Longwing Ln
vCard adr: Meridian
vCard adr: ID
vCard adr: 83646
vCard adr: US
Entity:
Role: abuse
vCard version: 4.0
vCard email: abusecomplaints@markmonitor.com
vCard tel: +1.2083895740
Nameserver:
Nameserver: ns1.google.com
Status: active
Event:
Action: last changed
Date: 2008-06-08T04:46:18.000+0000
Nameserver:
Nameserver: ns2.google.com
Status: active
Event:
Action: last changed
Date: 2008-06-08T04:46:18.000+0000
Nameserver:
Nameserver: ns3.google.com
Status: active
Event:
Action: last changed
Date: 2008-06-08T04:46:18.000+0000
Nameserver:
Nameserver: ns4.google.com
Status: active
Event:
Action: last changed
Date: 2008-06-08T04:46:19.000+0000
When running the latest source codes, other servers are working fine except the one you mentioned:
# app: Using disk cache (/home/u0/.openrdap)
# app: Bootstrap URL set to 'https://data.iana.org/rdap/'
# app: Bootstrap cache TTL set to 3600000000000 seconds
# app: Using server 'https://rdap.markmonitor.com/rdap/'
# app: Timeout is 30000000000
#
# client: Running...
# client: Request type : domain
# client: Request query : google.com
# client: Request URL : https://rdap.markmonitor.com/rdap/domain/google.com
# client: RDAP URL #0 is https://rdap.markmonitor.com/rdap/domain/google.com
# client: GET https://rdap.markmonitor.com/rdap/domain/google.com
# client: status-code=406, content-type=text/plain; charset=UTF-8, length=168 bytes, duration=1.533203374s
ERROR : No RDAP servers responded successfully (tried 1 server(s))
===================
# app: Using disk cache (/home/u0/.openrdap)
# app: Bootstrap URL set to 'https://data.iana.org/rdap/'
# app: Bootstrap cache TTL set to 3600000000000 seconds
# app: Using server 'https://rdap.nic.cz'
# app: Timeout is 30000000000
#
# client: Running...
# client: Request type : domain
# client: Request query : example.cz
# client: Request URL : https://rdap.nic.cz/domain/example.cz
# client: RDAP URL #0 is https://rdap.nic.cz/domain/example.cz
# client: GET https://rdap.nic.cz/domain/example.cz
# client: status-code=200, content-type=application/rdap+json, length=3565 bytes, duration=3.285927486s
# client: Successfully decoded response
RESP : &rdap.Response{Object:(*rdap.Domain)(0xc0004a0a80), BootstrapAnswer:(*bootstrap.Answer)(nil), HTTP:[]*rdap.HTTPResponse{(*rdap.HTTPResponse)(0xc0003b7720)}}
ADV : DM responded: Handle=example.cz Domain=example.cz
===================
# app: Using disk cache (/home/u0/.openrdap)
# app: Bootstrap URL set to 'https://data.iana.org/rdap/'
# app: Bootstrap cache TTL set to 3600000000000 seconds
# app: Using server 'https://rdap.verisign.com/com/v1'
# app: Timeout is 30000000000
#
# client: Running...
# client: Request type : domain
# client: Request query : google.com
# client: Request URL : https://rdap.verisign.com/com/v1/domain/google.com
# client: RDAP URL #0 is https://rdap.verisign.com/com/v1/domain/google.com
# client: GET https://rdap.verisign.com/com/v1/domain/google.com
# client: status-code=200, content-type=application/rdap+json, length=2343 bytes, duration=1.199559323s
# client: Successfully decoded response
RESP : &rdap.Response{Object:(*rdap.Domain)(0xc000140d80), BootstrapAnswer:(*bootstrap.Answer)(nil), HTTP:[]*rdap.HTTPResponse{(*rdap.HTTPResponse)(0xc00020aaa0)}}
ADV : DM responded: Handle=2138514_DOMAIN_COM-VRSN Domain=GOOGLE.COM
Without a content expert to look into the missing puzzle, it would take some time for me to understand RDAP mechanics itself.
I will be away for a while so if anyone want to take over, feel free to use the source codes.