Documentation
¶
Overview ¶
Package web asks a site's public URLs what they give away, from outside: whether files that shouldn't be public are served, folders listed, users listed, XML-RPC open, headers missing, the certificate about to expire, trackers starting before consent. It only reads (HEAD, one-byte GETs, a listing's first 8 KB, the landing page and the tracker containers it loads) and never asks a documentation or test domain (RFC 2606, 6761).
Index ¶
- func BlogURLs(base string, options map[string]string) map[string]string
- func DocrootURL(home string) string
- func NewClient() *http.Client
- func Probe(ctx context.Context, client *http.Client, t Target, o Options) *audit.WebFacts
- func SiteURLs(options map[string]string) map[string]string
- type Options
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlogURLs ¶
BlogURLs are the docroot URLs of a multisite's other sites by blog id, from the blog-tagged home options ("2:home"): each site's own host with the main docroot's path, as uploads aren't under a subdirectory site's path.
func DocrootURL ¶
DocrootURL is the public URL of the release's docroot from the site's home URL: Bedrock serves web/ at the home URL, plain WordPress its root.
func NewClient ¶
NewClient is the default client: no redirects (a redirect isn't the file), short timeouts, connections kept for reuse.
Types ¶
type Options ¶
type Options struct {
Files []string
Public bool
UploadsPHP bool
Browse func(ctx context.Context, url string) ([]audit.Cookie, error)
}
Options say what to ask: Files are candidate paths (audit.Candidates), Public the public-site checks, UploadsPHP whether the server runs PHP in uploads (asked with a file that doesn't exist, so nothing runs). Browse, when set, loads a landing page in a fresh browser and returns the cookies it then holds (browser.Visit).
Directories
¶
| Path | Synopsis |
|---|---|
|
Package browser loads a page the way a first-time visitor's browser does, in a headless Chrome with an empty profile, and reports the cookies the browser holds afterwards: every domain's, as nothing was clicked, so nothing was consented to.
|
Package browser loads a page the way a first-time visitor's browser does, in a headless Chrome with an empty profile, and reports the cookies the browser holds afterwards: every domain's, as nothing was clicked, so nothing was consented to. |