Этот коммит содержится в:
Julian Kornberger 2022-02-08 16:24:12 +01:00 коммит произвёл GitHub
родитель d753afcd25
Коммит e2ba515279
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23

7
tls.go
Просмотреть файл

@ -28,6 +28,8 @@ import (
// Common flags for TLS configuration -- include this in your module's ScanFlags implementation to use the common TLS code
// Adapted from modules/ssh.go
type TLSFlags struct {
Config *tls.Config // Config is ready to use TLS configuration
Heartbleed bool `long:"heartbleed" description:"Check if server is vulnerable to Heartbleed"`
SessionTicket bool `long:"session-ticket" description:"Send support for TLS Session Tickets and output ticket if presented" json:"session"`
@ -89,6 +91,11 @@ func (t *TLSFlags) GetTLSConfig() (*tls.Config, error) {
func (t *TLSFlags) GetTLSConfigForTarget(target *ScanTarget) (*tls.Config, error) {
var err error
// Config already exists
if t.Config != nil {
return t.Config, nil
}
// TODO: Find standard names
cipherMap := map[string][]uint16{
"portable": tls.PortableCiphers,