Documentation
¶
Index ¶
- Variables
- func AutoUpdate(currentVersion string) error
- func CheckLatestVersion(currentVersion string) (string, bool)
- func DetectOutputFormat(outputFile string) string
- func GetEmbeddedFile(filename string) ([]byte, error)
- func GetPluginVersion(target, plugin string, _ int, headers []string) string
- func GetStoragePath(filename string) (string, error)
- func IsVersionVulnerable(version, fromVersion, toVersion string) bool
- func NormalizeURL(url string) string
- func ReadLines(filename string) ([]string, error)
- func SplitLines(data []byte) []string
- type AuthGroup
- type CSVWriter
- type HTTPClientManager
- type JSONWriter
- type Logger
- type OutputResults
- type PluginEntry
- type PluginResult
- type PluginsCollection
- type ProgressManager
- func (p *ProgressManager) Bprintf(format string, a ...interface{}) (int, error)
- func (p *ProgressManager) Bprintln(a ...interface{}) (int, error)
- func (p *ProgressManager) ClearLine()
- func (p *ProgressManager) Finish()
- func (p *ProgressManager) Increment()
- func (p *ProgressManager) RenderBlank()
- func (p *ProgressManager) SetMessage(description string)
- func (p *ProgressManager) SetTotal(total int)
- func (p *ProgressManager) Write(data []byte) (int, error)
- type SeverityEntry
- type VersionGroup
- type Vulnerability
- type WriterInterface
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultLogger = NewLogger()
)
View Source
var GitHubDownloadURL = func(version, osName, arch string) string { var ext string if osName == "windows" { ext = ".exe" } return fmt.Sprintf( "https://github.com/%s/releases/download/%s/wpprobe_%s_%s_%s%s", githubRepo, version, version, osName, arch, ext, ) }
View Source
var GitHubLatestReleaseURL = func() string { return fmt.Sprintf("https://api.github.com/repos/%s/releases/latest", githubRepo) }
View Source
var Version = "dev"
Functions ¶
func AutoUpdate ¶ added in v0.3.0
func CheckLatestVersion ¶ added in v0.3.0
func DetectOutputFormat ¶ added in v0.2.0
func GetEmbeddedFile ¶
func GetPluginVersion ¶
func GetStoragePath ¶
func IsVersionVulnerable ¶
func NormalizeURL ¶ added in v0.6.0
func SplitLines ¶ added in v0.6.0
Types ¶
type AuthGroup ¶ added in v0.6.0
type AuthGroup struct { AuthType string `json:"auth_type"` Vulnerabilities []Vulnerability `json:"vulnerabilities"` }
type CSVWriter ¶
type CSVWriter struct {
// contains filtered or unexported fields
}
func NewCSVWriter ¶
func (*CSVWriter) WriteResults ¶
func (c *CSVWriter) WriteResults(url string, results []PluginEntry)
type HTTPClientManager ¶
type HTTPClientManager struct {
// contains filtered or unexported fields
}
func NewHTTPClient ¶
func NewHTTPClient(timeout time.Duration, headers []string) *HTTPClientManager
type JSONWriter ¶ added in v0.2.0
type JSONWriter struct {
// contains filtered or unexported fields
}
func NewJSONWriter ¶ added in v0.2.0
func NewJSONWriter(output string) *JSONWriter
func (*JSONWriter) Close ¶ added in v0.2.0
func (j *JSONWriter) Close()
func (*JSONWriter) WriteResults ¶ added in v0.2.0
func (j *JSONWriter) WriteResults(url string, results []PluginEntry)
type Logger ¶ added in v0.3.0
func (*Logger) PrintBanner ¶ added in v0.3.0
type OutputResults ¶ added in v0.6.0
type OutputResults struct { URL string `json:"url"` Plugins PluginsCollection `json:"plugins"` }
type PluginEntry ¶ added in v0.2.0
type PluginEntry struct { Plugin string `json:"plugin"` Version string `json:"version"` Severity string `json:"severity"` CVEs []string `json:"cves"` CVELinks []string `json:"cve_link"` Title string `json:"title"` AuthType string `json:"auth_type"` CVSSScore float64 `json:"cvss_score"` CVSSVector string `json:"cvss_vector"` }
type PluginResult ¶ added in v0.6.0
type PluginResult struct { Name string `json:"-"` Versions []VersionGroup `json:"versions"` }
type PluginsCollection ¶ added in v0.6.0
type PluginsCollection []PluginResult
func (PluginsCollection) MarshalJSON ¶ added in v0.6.0
func (p PluginsCollection) MarshalJSON() ([]byte, error)
type ProgressManager ¶
type ProgressManager struct {
// contains filtered or unexported fields
}
func NewProgressBar ¶
func NewProgressBar(total int, description string) *ProgressManager
NewProgressBar creates a progress bar with a fixed width and padded/truncated description
func (*ProgressManager) Bprintf ¶
func (p *ProgressManager) Bprintf(format string, a ...interface{}) (int, error)
Bprintf prints a formatted message above the bar.
func (*ProgressManager) Bprintln ¶
func (p *ProgressManager) Bprintln(a ...interface{}) (int, error)
Bprintln prints a message on a new line above the bar.
func (*ProgressManager) ClearLine ¶ added in v0.5.3
func (p *ProgressManager) ClearLine()
ClearLine clears the current console line.
func (*ProgressManager) Finish ¶
func (p *ProgressManager) Finish()
Finish completes the bar and prints a newline.
func (*ProgressManager) Increment ¶
func (p *ProgressManager) Increment()
Increment increases the current progress by one.
func (*ProgressManager) RenderBlank ¶
func (p *ProgressManager) RenderBlank()
RenderBlank renders an empty bar state.
func (*ProgressManager) SetMessage ¶ added in v0.6.0
func (p *ProgressManager) SetMessage(description string)
SetMessage updates the bar's description, padded/truncated to fixed width.
func (*ProgressManager) SetTotal ¶ added in v0.5.2
func (p *ProgressManager) SetTotal(total int)
SetTotal updates the maximum count of the progress bar.
type SeverityEntry ¶ added in v0.6.0
func (SeverityEntry) MarshalJSON ¶ added in v0.6.0
func (s SeverityEntry) MarshalJSON() ([]byte, error)
type VersionGroup ¶ added in v0.6.0
type VersionGroup struct { Version string `json:"version"` Severities []SeverityEntry `json:"severities"` }
type Vulnerability ¶ added in v0.6.0
type WriterInterface ¶ added in v0.2.0
type WriterInterface interface { WriteResults(url string, results []PluginEntry) Close() }
func GetWriter ¶ added in v0.2.0
func GetWriter(outputFile string) WriterInterface
Click to show internal directories.
Click to hide internal directories.