Documentation ¶
Index ¶
- Constants
- Variables
- func Truncate(str string, trLen int) string
- type CertificateChainRow
- type CertificateRow
- type DomainsReachable
- type DomainsRow
- type DomainsRowMetaInfo
- type InternalMessage
- type Manager
- type ScanData
- type ScanRow
- type ScanStatus
- func (status *ScanStatus) AddCurrentScans(val int32)
- func (status *ScanStatus) AddErrorScans(val int32)
- func (status *ScanStatus) AddFatalErrorScans(val int32)
- func (status *ScanStatus) AddFinishedScans(val int32)
- func (status *ScanStatus) GetCurrentScans() int32
- func (status *ScanStatus) GetErrorScans() int32
- func (status *ScanStatus) GetFatalErrorScans() int32
- func (status *ScanStatus) GetFinishedScans() int32
- func (status *ScanStatus) GetRemainingScans() int32
- func (status *ScanStatus) GetTotalScans() int32
- func (status *ScanStatus) SetTotalScans(val int32)
- type ScanStatusMessage
- type ScanWhereCond
Constants ¶
const ( // InternalFatalError is a error, which will not be retried InternalFatalError = -1 // InternalError is a error, which will be retried InternalError = 0 // InternalSuccess signals that a scan was successful InternalSuccess = 1 // InternalNew defines a new scan InternalNew = 2 )
const ( ReachableNot = 0 ReachableHTTP = 1 ReachableSSL = 2 ReachableBoth = 3 )
reachable
const ( ScanOnlySSL = 1 ScanOnlyHTTP = 2 ScanBoth = 3 ScanOnePreferSSL = 4 ScanOnePreferHTTP = 5 )
scanTypes
const ( StatusError = 255 StatusPending = 0 StatusDone = 1 StatusIgnored = 2 )
StatusValues for the SQL-Table
Variables ¶
var ConfigureSetUp map[string]func(*ScanRow, chan ScanStatusMessage, interface{}) bool
ConfigureSetUp contains all the API-hooks for configuring the apis based on the commandline flags
var ContinueScan map[string]func(ScanRow) bool
ContinueScan contains all the API-hooks to check if the referenced api-version of the scan to be continued is up to date
var FlagSetUp map[string]func()
FlagSetUp contains all the API-hooks for adding and parsing flag values
var Logger *logrus.Entry
Logging
var ManagerHandleResults map[string]func(InternalMessage)
ManagerHandleResults contains all the API-hooks to the individual functions processing the incoming results
var ManagerHandleScan map[string]func([]DomainsReachable, chan InternalMessage) []DomainsReachable
ManagerHandleScan contains all the API-hooks to the individual functions needed to start the scans
var ManagerMap map[string]*Manager
ManagerMap is a map of all Managers that can be used
var ManagerParseConfig map[string]func(interface{})
ManagerParseConfig sets the given configuration
var ManagerSetUp map[string]func()
ManagerSetUp contains all the API-hooks to their individual SetUp-Functions
Functions ¶
Types ¶
type CertificateChainRow ¶
type CertificateRow ¶
type CertificateRow struct { ThumbprintSHA256 string ThumbprintSHA1 string SerialNumber string Subject string IssuerSubject string SigAlg string RevocationStatus uint8 Issues int16 KeyStrength int16 DebianInsecure bool ValidFrom string ValidTo string CommonNames string AltNames string CreatedAt string UpdatedAt string }
CertificateRow contins all the stored information of an entry in the Certificates-Table
type DomainsReachable ¶
type DomainsReachable struct { DomainID int DomainName string DomainReachable int TestWithSSL bool }
DomainsReachable is the base type for receiving the domains which should be scanned
type DomainsRow ¶
DomainsRow represents a row of the domains Table
type DomainsRowMetaInfo ¶
type InternalMessage ¶
type InternalMessage struct { Domain DomainsReachable Results interface{} Retries int StatusCode int }
InternalMessage is a struct used by all scan-apis to communicate in one scan-api
type Manager ¶
type Manager struct { MaxRetries int MaxParallelScans int Version string Table string ScanType int OutputChannel chan ScanStatusMessage Status ScanStatus FinishError int ScanID int Errors []InternalMessage FirstScan bool Logger *logrus.Entry LoggingTag string }
Manager is a struct which combines values and functions needed by all scans individually
func (*Manager) CheckDoError ¶
CheckDoError returns true if an error should be retried next
func (*Manager) GetTableName ¶
type ScanRow ¶
type ScanRow struct { ScanID int SSLLabs bool SSLLabsVersion string Observatory bool ObservatoryVersion string SecurityHeaders bool SecurityHeadersVersion string Crawler bool CrawlerVersion string Config sql.NullString Unreachable int Total int Done bool }
ScanRow represents a row of the ScanTable
type ScanStatus ¶
type ScanStatus struct { CurrentScans int32 TotalScans int32 ErrorScans int32 FatalErrorScans int32 FinishedScans int32 }
ScanStatus with atomic access
func (*ScanStatus) AddCurrentScans ¶
func (status *ScanStatus) AddCurrentScans(val int32)
func (*ScanStatus) AddErrorScans ¶
func (status *ScanStatus) AddErrorScans(val int32)
func (*ScanStatus) AddFatalErrorScans ¶
func (status *ScanStatus) AddFatalErrorScans(val int32)
func (*ScanStatus) AddFinishedScans ¶
func (status *ScanStatus) AddFinishedScans(val int32)
func (*ScanStatus) GetCurrentScans ¶
func (status *ScanStatus) GetCurrentScans() int32
func (*ScanStatus) GetErrorScans ¶
func (status *ScanStatus) GetErrorScans() int32
func (*ScanStatus) GetFatalErrorScans ¶
func (status *ScanStatus) GetFatalErrorScans() int32
func (*ScanStatus) GetFinishedScans ¶
func (status *ScanStatus) GetFinishedScans() int32
func (*ScanStatus) GetRemainingScans ¶
func (status *ScanStatus) GetRemainingScans() int32
func (*ScanStatus) GetTotalScans ¶
func (status *ScanStatus) GetTotalScans() int32
func (*ScanStatus) SetTotalScans ¶
func (status *ScanStatus) SetTotalScans(val int32)
type ScanStatusMessage ¶
type ScanStatusMessage struct { Status *ScanStatus Sender string }
ScanStatusMessage with atomic access
type ScanWhereCond ¶
ScanWhereCond includes all fields needed to specify a particular entry in the Table