Documentation
¶
Overview ¶
Package knowledgebase defines the Extractor interface implemented by per-class detectors that contribute structured facts to a response's KnowledgeBase map. Each extractor owns a single top-level key, named by Name(), to keep outputs collision-free across detectors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extractor ¶
type Extractor interface {
Name() string
Extract(body string, req *http.Request, resp *http.Response) map[string]any
}
Extractor mines structured facts from a crawled response. Extractors that only need the body can ignore req and resp; extractors that classify by request shape (method, headers, URL) use them.
Implementations MUST treat body, req, and resp as read-only: do not mutate req/resp headers, URL, or body, and do not read resp.Body. The response body has already been drained upstream and is passed as the body argument; resp is supplied for status, header, and Request access only.
Directories
¶
| Path | Synopsis |
|---|---|
|
extractors
|
|
|
endpoints
Package endpoints is a knowledgebase.Extractor that classifies a crawled request as an API endpoint (REST, GraphQL, SOAP, AJAX/XHR) by inspecting method, URL, headers, and content types.
|
Package endpoints is a knowledgebase.Extractor that classifies a crawled request as an API endpoint (REST, GraphQL, SOAP, AJAX/XHR) by inspecting method, URL, headers, and content types. |
|
secrets
Package secrets is a knowledgebase.Extractor that detects exposed credentials in crawled response bodies using Praetorian's Titus engine.
|
Package secrets is a knowledgebase.Extractor that detects exposed credentials in crawled response bodies using Praetorian's Titus engine. |