mirror of
https://github.com/projectdiscovery/httpx
synced 2026-06-08 16:50:17 +00:00
40 lines
911 B
Go
40 lines
911 B
Go
package runner
|
|
|
|
import (
|
|
"github.com/projectdiscovery/gologger"
|
|
"github.com/projectdiscovery/utils/auth/pdcp"
|
|
updateutils "github.com/projectdiscovery/utils/update"
|
|
)
|
|
|
|
const banner = `
|
|
__ __ __ _ __
|
|
/ /_ / /_/ /_____ | |/ /
|
|
/ __ \/ __/ __/ __ \| /
|
|
/ / / / /_/ /_/ /_/ / |
|
|
/_/ /_/\__/\__/ .___/_/|_|
|
|
/_/
|
|
`
|
|
|
|
// Version is the current Version of httpx
|
|
const Version = `v1.6.8`
|
|
|
|
// 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")
|
|
}
|
|
|
|
// GetUpdateCallback returns a callback function that updates httpx
|
|
func GetUpdateCallback() func() {
|
|
return func() {
|
|
showBanner()
|
|
updateutils.GetUpdateToolCallback("httpx", Version)()
|
|
}
|
|
}
|
|
|
|
// AuthWithPDCP is used to authenticate with PDCP
|
|
func AuthWithPDCP() {
|
|
showBanner()
|
|
pdcp.CheckNValidateCredentials("httpx")
|
|
}
|