Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
projectdiscovery
GitHub Repository: projectdiscovery/nuclei
Path: blob/dev/internal/runner/banner.go
2070 views
1
// Package runner executes the enumeration process.
2
package runner
3
4
import (
5
"fmt"
6
7
"github.com/projectdiscovery/gologger"
8
"github.com/projectdiscovery/nuclei/v3/pkg/catalog/config"
9
pdcpauth "github.com/projectdiscovery/utils/auth/pdcp"
10
updateutils "github.com/projectdiscovery/utils/update"
11
)
12
13
var banner = fmt.Sprintf(`
14
__ _
15
____ __ _______/ /__ (_)
16
/ __ \/ / / / ___/ / _ \/ /
17
/ / / / /_/ / /__/ / __/ /
18
/_/ /_/\__,_/\___/_/\___/_/ %s
19
`, config.Version)
20
21
// showBanner is used to show the banner to the user
22
func showBanner() {
23
gologger.Print().Msgf("%s\n", banner)
24
gologger.Print().Msgf("\t\tprojectdiscovery.io\n\n")
25
}
26
27
// NucleiToolUpdateCallback updates nuclei binary/tool to latest version
28
func NucleiToolUpdateCallback() {
29
showBanner()
30
updateutils.GetUpdateToolCallback(config.BinaryName, config.Version)()
31
}
32
33
// AuthWithPDCP is used to authenticate with PDCP
34
func AuthWithPDCP() {
35
showBanner()
36
pdcpauth.CheckNValidateCredentials(config.BinaryName)
37
}
38
39