Documentation ¶
Index ¶
- func AppendSendResults(response Response, httpsData HTTPSData, results chan<- *Response)
- func ConnSendRecv(InputServers []*InputServer, port uint, numRedirects int)
- func ParseHTTPResponse(http string) (*zgrab2_http.Response, error)
- func RequestWorker(jobs <-chan InputServer, results chan<- *Response, numRedirects int)
- type HTTPSData
- type InputServer
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendSendResults ¶
func ConnSendRecv ¶
func ConnSendRecv(InputServers []*InputServer, port uint, numRedirects int)
func ParseHTTPResponse ¶
func ParseHTTPResponse(http string) (*zgrab2_http.Response, error)
func RequestWorker ¶
func RequestWorker(jobs <-chan InputServer, results chan<- *Response, numRedirects int)
Types ¶
type HTTPSData ¶
type HTTPSData struct { StartTime string EndTime string IsDomainIncluded bool Error string Version uint16 HandshakeComplete bool CipherSuite uint16 PeerCertificates []byte HTTPResponseHeaders *zgrab2_http.Response HTTPResponseBody string Redirects []string RetryErrors []string }
func InitConn ¶
InitConn initiates a TLS connection to the host with the SNI field set to domain. Returns the parsed data from the TLS connection and the (open) connection object.
func SendHTTPRequest ¶
func SendHTTPRequest(conn *tls.Conn, domain string, path string, httpsDataObject *HTTPSData) *HTTPSData
SendHTTPRequest sends a HTTP GET for the path with Host set to domain.
func SendHTTPRequestWithRedirects ¶
SendHTTPRequestWithRedirects initiates a TLS connection to the host with the SNI field set to domain. Then if successful, sends a HTTP GET request with Host header as domain, following up to numRedirects. Redirects determines the redirect host, domain, and path from the previously returned location and initiates a new TLS connection to the redirect host with the SNI field set to the redirect domain, then sends a HTTP GET request for the redirect path with Host header as the redirect domain. Returns the parsed data from the TLS connection and HTTP request.
type InputServer ¶
type Response ¶
type Response struct { Endpoint InputServer Responses []HTTPSData }