Documentation
¶
Overview ¶
Package discover actively probes targets for exposed Swagger/OpenAPI endpoints using the flagship wordlist, content matchers, and random-path false-positive suppression (technique from brinhosa/apidetector).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProbeURLs ¶ added in v1.0.2
func ProbeURLs(ctx context.Context, client *httpclient.Client, urls []string, concurrency int, onHit func(Hit), progress func(done, total int))
ProbeURLs direct-probes a set of candidate spec/UI URLs (e.g. harvested from the Wayback Machine or SwaggerHub OSINT), invoking onHit for each confirmed Swagger/OpenAPI resource. Unlike Run, it GETs each URL exactly as given rather than appending the wordlist — these are already specific URLs, not hosts. Progress, if set, is called once per URL completed.
Types ¶
type Config ¶
type Config struct {
Concurrency int
Mixed bool // try http and https
Paths []string // override wordlist
FirstOnly bool // stop after first hit per host
// Progress, if set, is called once per target after it is fully probed,
// with the number of targets completed so far and the total. Safe to call
// from multiple goroutines (callers should keep it cheap / lock if needed).
Progress func(done, total int)
}
Config controls a discovery run.
type Hit ¶
type Hit struct {
Target string `json:"target"`
URL string `json:"url"`
Status int `json:"status"`
IsSpec bool `json:"is_spec"`
Kind spec.Kind `json:"kind,omitempty"`
Version string `json:"version,omitempty"`
Title string `json:"title,omitempty"`
Marker string `json:"marker,omitempty"`
}
Hit is a confirmed discovery.
Click to show internal directories.
Click to hide internal directories.