nuclei/internal/runner/banner.go

38 lines
1003 B
Go
Raw Normal View History

// Package runner executes the enumeration process.
2020-04-04 03:45:39 +05:30
package runner
import (
"fmt"
2020-04-04 03:45:39 +05:30
"github.com/projectdiscovery/gologger"
"github.com/projectdiscovery/nuclei/v3/internal/pdcp"
"github.com/projectdiscovery/nuclei/v3/pkg/catalog/config"
updateutils "github.com/projectdiscovery/utils/update"
)
2021-07-05 17:29:45 +05:30
var banner = fmt.Sprintf(`
__ _
____ __ _______/ /__ (_)
/ __ \/ / / / ___/ / _ \/ /
/ / / / /_/ / /__/ / __/ /
/_/ /_/\__,_/\___/_/\___/_/ %s
`, config.Version)
2020-04-04 03:45:39 +05:30
// showBanner is used to show the banner to the user
func showBanner() {
gologger.Print().Msgf("%s\n", banner)
gologger.Print().Msgf("\t\tprojectdiscovery.io\n\n")
2020-04-04 03:45:39 +05:30
}
// NucleiToolUpdateCallback updates nuclei binary/tool to latest version
func NucleiToolUpdateCallback() {
showBanner()
updateutils.GetUpdateToolCallback(config.BinaryName, config.Version)()
}
// AuthWithPDCP is used to authenticate with PDCP
func AuthWithPDCP() {
showBanner()
pdcp.CheckNValidateCredentials(config.BinaryName)
}