pkg

package
v0.0.0-...-5d4bc99 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseOutput

func CloseOutput()

CloseOutput safely flushes and closes any open log file.

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

func PrintError(format string, args ...any)

PrintError prints a failure or error message.

func PrintInfo

func PrintInfo(format string, args ...any)

PrintInfo prints an informational status message.

func PrintSuccess

func PrintSuccess(format string, args ...any)

PrintSuccess prints an origin match or successful finding.

func PrintWarning

func PrintWarning(format string, args ...any)

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

func SetOutputFile(path string) error

SetOutputFile opens a file path for recording discovered results.

func SetSilent

func SetSilent(s bool)

SetSilent configures whether standard informational messages are hidden.

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

func ParseOptions() (*Options, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL