1package main
2
3import (
4 "fmt"
5 "net/http"
6 "strings"
7 "io/ioutil"
8)
9
10func main() {
11 var payload *strings.Reader = nil
12 req, _ := http.NewRequest("GET", "https://api.whoisfreaks.com/v1.0/ssl/live?apiKey=API_KEY&domainName=whoisfreaks.com&chain=true&sslRaw=true", payload)
13 client := &http.Client{}
14 resp, _ := client.Do(req)
15 defer resp.Body.Close()
16 body, _ := ioutil.ReadAll(resp.Body)
17 fmt.Println(string(body))
18}With the WhoisFreaks Go SDK, you can retrieve SSL certificate details for any domain. This includes information about the certificate's validity, issuer, and other critical details, allowing you to ensure secure communications and verify the authenticity of websites. This feature is vital for securing online transactions and maintaining web security.
This package is for performing any type of SSL lookup.
To utilize the WhoisFreaks Go SDK for SSL Lookup of domain names, follow these steps:
To authenticate your API requests, set your API key using the SetAPIKey method provided by the SDK. This method sets the global API key to the specified value.
func SetAPIKey(key string)Parameters:
Example Usage:
package main
import (
"github.com/WhoisFreaks/whoisfreaks/whois"
)
func main() {
whois.SetAPIKey("your_api_key")
// Your code here
}Replace "your_api_key" with your actual API key.
GetLiveResponse retrieves live SSL information for a specific domain using the WhoisFreaks API.
func GetLiveResponse(domain string, chain bool, raw bool) (*modal.DomainSslInfo, *modal.Error)Parameters:
Returns:
Example Usage:
package main
import (
"fmt"
"log"
"github.com/WhoisFreaks/whoisfreaks/ssl"
)
func main() {
ssl.SetAPIKey("your_api_key")
domain := "example.com"
result, err := ssl.GetLiveResponse(domain)
if err != nil {
log.Fatal(err)
}
fmt.Println(result)
}Replace "example.com" with the domain you wish to query.
Offers live, reverse, historical, IP, ASN, and bulk domain WHOIS lookups.
Provides live, reverse, historical, and bulk DNS lookup services.
Checks domain availability across TLDs and suggests alternatives.
Performs SSL lookup and shows certificate chain from start to present.

Leverage this Go Lang-based SDK and CLI tool to interact with the WhoisFreaks API seamlessly.
pkg.go.dev