
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
github.com/whois-api-llc/domain-reputation-go
The client library for Domain Reputation API in Go language.
The minimum go version is 1.17.
The library is distributed as a Go module
go get github.com/whois-api-llc/domain-reputation-go
Full API documentation available here
You can find all examples in example
directory.
To start making requests you need the API Key. You can find it on your profile page on whoisxmlapi.com. Using the API Key you can create Client.
Most users will be fine with NewBasicClient
function.
client := domainreputation.NewBasicClient(apiKey)
If you want to set custom http.Client
to use proxy then you can use NewClient
function.
transport := &http.Transport{Proxy: http.ProxyURL(proxyUrl)}
client := domainreputation.NewClient(apiKey, domainreputation.ClientParams{
HTTPClient: &http.Client{
Transport: transport,
Timeout: 20 * time.Second,
},
})
Domain Reputation API lets you calculate a domain's reputation scores based on hundreds of parameters.
// Make request to get the Domain Reputation API response as a model instance.
domainReputationResp, _, err := client.Get(ctx, "whoisxmlapi.com")
if err != nil {
log.Fatal(err)
}
log.Println(domainReputationResp.Mode, domainReputationResp.ReputationScore)
// Make request to get raw data in XML.
resp, err := client.GetRaw(context.Background(), "whoisxmlapi.com",
domainreputation.OptionOutputFormat("XML"))
if err != nil {
log.Fatal(err)
}
log.Println(string(resp.Body))
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.