Documentation ¶
Overview ¶
Package output is responsible for writing logs and received response data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Output ¶
type Output struct {
// contains filtered or unexported fields
}
Output is responsible for all the output, be it logging or writing received data.
func NewOutput ¶
NewOutput creates a new instance of Output. path is an optional path to the file where the tool will write the received data. If not specified, this information will be written to stdout. verbose defines whether we need to write extended information.
func (*Output) DebugRequest ¶
DebugRequest writes information about the HTTP request to the output.
TODO(ameshkov): instead of this, log the actual data sent to tls.Conn.
func (*Output) DebugResponse ¶
DebugResponse writes information about the HTTP response to the output.
TODO(ameshkov): instead of this, log the actual data received from tls.Conn.
type ResponseData ¶
type ResponseData struct { StatusCode int `json:"status_code"` Status string `json:"status"` Proto string `json:"proto"` TLS *TLSState `json:"tls"` Headers map[string][]string `json:"headers"` BodyBase64 string `json:"body_base64"` }
ResponseData is a helper object for serializing response data to JSON.
type TLSCertificate ¶ added in v1.2.0
type TLSCertificate struct { Subject string `json:"subject"` Issuer string `json:"issuer"` NotBefore time.Time `json:"not_before"` NotAfter time.Time `json:"not_after"` DNSNames []string `json:"dns_names"` IPAddresses []string `json:"ip_addresses"` Raw string `json:"raw"` }
TLSCertificate is a helper object for serializing information about x509 certificates.
type TLSState ¶
type TLSState struct { ServerName string `json:"server_name"` Version string `json:"version"` CipherSuite string `json:"cipher_suite"` NegotiatedProtocol string `json:"negotiated_protocol"` Certificates []TLSCertificate `json:"certificates"` }
TLSState is a helper object for serializing response data to JSON.