func (i *IDrac8) Screenshot() (response []byte, extension string, err error) {
	err = i.httpLogin()
	if err != nil {
		return response, extension, err
	}
	endpoint1 := fmt.Sprintf("data?get=consolepreview[auto%%20%d]",
		time.Now().UnixNano()/int64(time.Millisecond))
	extension = "png"
	response, err = i.get(endpoint1, &map[string]string{"idracAutoRefresh": "1"})
	if err != nil {
		return []byte{}, extension, err
	}
	if !strings.Contains(string(response), "<status>ok</status>") {
		return []byte{}, extension, fmt.Errorf(string(response))
	}
	endpoint2 := fmt.Sprintf("capconsole/scapture0.png?%d",
		time.Now().UnixNano()/int64(time.Millisecond))
	response, err = i.get(endpoint2, &map[string]string{})
	if err != nil {
		return []byte{}, extension, err
	}
	return response, extension, err
}
Screenshot Grab screen preview.
package idrac8
import (
	"crypto/tls"
	"crypto/x509"
	"encoding/xml"
	"fmt"
	"net"
	"strconv"
	"strings"
	"time"
	"github.com/bmc-toolbox/bmclib/internal"
	"github.com/bmc-toolbox/bmclib/internal/helper"
)
func (i *IDrac8) CurrentHTTPSCert() ([]*x509.Certificate, bool, error) {
	dialer := &net.Dialer{
		Timeout: time.Duration(10) * time.Second,
	}
	conn, err := tls.DialWithDialer(dialer, "tcp", i.ip+":"+"443", &tls.Config{InsecureSkipVerify: true})
	if err != nil {
		return []*x509.Certificate{{}}, true, err
	}
	defer conn.Close()
	return conn.ConnectionState().PeerCertificates, true, nil
}