Documentation
¶
Index ¶
- func CloseOutput()
- func HasStdin() bool
- func LogFinding(entry ResultEntry)
- func PrintError(format string, args ...any)
- func PrintInfo(format string, args ...any)
- func PrintSuccess(format string, args ...any)
- func PrintWarning(format string, args ...any)
- func RandomUserAgent() string
- func SetJSONOutput(enabled bool)
- func SetNoColor(disabled bool)
- func SetOutputFile(path string) error
- func SetSilent(s bool)
- type BaselineResponse
- type ConfigFile
- type Options
- type ResultCandidate
- type ResultEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasStdin ¶
func HasStdin() bool
HasStdin returns true if standard input is connected to a pipe or redirected file.
func LogFinding ¶
func LogFinding(entry ResultEntry)
LogFinding records a discovered origin IP to console and optional output file.
func PrintError ¶
PrintError prints a failure or error message.
func PrintSuccess ¶
PrintSuccess prints an origin match or successful finding.
func PrintWarning ¶
PrintWarning prints a cautionary notice.
func RandomUserAgent ¶
func RandomUserAgent() string
RandomUserAgent returns a randomly selected User-Agent string from the sqlmap dataset.
func SetJSONOutput ¶
func SetJSONOutput(enabled bool)
SetJSONOutput enables json formatted log lines.
func SetNoColor ¶
func SetNoColor(disabled bool)
SetNoColor disables ANSI color codes in console output.
func SetOutputFile ¶
SetOutputFile opens a file path for recording discovered results.
Types ¶
type BaselineResponse ¶
type BaselineResponse struct {
StatusCode int
Title string
ContentLength int64
ServerHeader string
}
BaselineResponse stores fingerprint attributes of the public domain response.
func FetchBaseline ¶
func FetchBaseline(domain string, timeoutSec int) (*BaselineResponse, error)
FetchBaseline retrieves baseline HTTP response attributes through the public CDN.
type ConfigFile ¶
type ConfigFile struct {
ShodanKey string `yaml:"shodan-key"`
CensysID string `yaml:"censys-id"`
CensysSecret string `yaml:"censys-secret"`
FofaEmail string `yaml:"fofa-email"`
FofaKey string `yaml:"fofa-key"`
SecurityTrailsKey string `yaml:"securitytrails-key"`
}
ConfigFile represents options stored in ~/.config/pinaak/config.yaml.
type Options ¶
type Options struct {
Domain string
SubdomainsList string
ConfigFile string
OutputFile string
JSONOutput bool
Silent bool
NoColor bool
Threads int
Timeout int
SkipVerification bool
ShodanKey string
CensysID string
CensysSecret string
FofaEmail string
FofaKey string
SecurityTrailsKey string
}
Options holds command line configurations for the origin discovery run.
func ParseOptions ¶
ParseOptions parses CLI flags and ensures valid input configuration.
type ResultCandidate ¶
type ResultCandidate struct {
Domain string `json:"domain"`
OriginIP string `json:"origin_ip"`
Method string `json:"method"`
Details string `json:"details,omitempty"`
}
ResultCandidate holds an unverified origin IP candidate produced by a discovery technique.
type ResultEntry ¶
type ResultEntry struct {
Domain string `json:"domain"`
OriginIP string `json:"origin_ip"`
Method string `json:"method"`
Confidence string `json:"confidence,omitempty"`
Details string `json:"details,omitempty"`
}
ResultEntry stores a verified or candidate origin IP finding.
func VerifyCandidateIP ¶
func VerifyCandidateIP(ctx context.Context, domain string, ip string, method string, baseline *BaselineResponse, timeoutSec int) (*ResultEntry, bool)
VerifyCandidateIP routes direct requests to the candidate IP with the domain in Host header.