knowledgebase

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 1 Imported by: 0

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.

Jump to

Keyboard shortcuts

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