Documentation
¶
Index ¶
Constants ¶
const ( DefaultBurpMCPURL = "http://127.0.0.1:9876/" DefaultBurpProxyAddr = "127.0.0.1:8080" DefaultMCPPort = 9119 DefaultProxyPort = 8080 // DefaultSidecarPort is the loopback TCP port used for the sidecar IPC // socket on Windows, which lacks reliable Unix domain socket support. DefaultSidecarPort = 9229 // DefaultSidecarHeartbeatIntervalSecs and DefaultSidecarHeartbeatTimeoutSecs // are the default sidecar heartbeat timings in seconds. DefaultSidecarHeartbeatIntervalSecs = 10 DefaultSidecarHeartbeatTimeoutSecs = 30 // DefaultExcludeExtensions is the default RE2 alternation for file // extensions that should be excluded from proxy capture. DefaultExcludeExtensions = "gif|jpg|jpeg|png|ico|webp|woff|woff2|ttf|eot" )
Variables ¶
var Version = "dev"
Version is injected at build time via ldflags or from go install; defaults to "dev".
Functions ¶
func DefaultSidecarSocket ¶ added in v0.1.18
func DefaultSidecarSocket() string
DefaultSidecarSocket returns the default sidecar IPC address: a Unix domain socket at ~/.sectool/sidecar.sock.
Types ¶
type Config ¶
type Config struct {
Version string `json:"version"`
MCPPort int `json:"mcp_port"`
ProxyPort int `json:"proxy_port"`
BurpRequired *bool `json:"burp_required"`
MaxBodyBytes int `json:"max_body_bytes"` // limits request/response body sizes
IncludeSubdomains *bool `json:"include_subdomains"`
AllowedDomains []string `json:"allowed_domains"`
ExcludeDomains []string `json:"exclude_domains"`
InteractshServerURL string `json:"interactsh_server_url"` // empty = use default public servers
InteractshAuthToken string `json:"interactsh_auth_token"` // optional, for protected servers; INTERACTSH_TOKEN env var used as fallback
Proxy ProxyConfig `json:"proxy"`
Crawler CrawlerConfig `json:"crawler"`
Sidecars SidecarsConfig `json:"sidecars"`
}
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns a Config with default values.
func LoadOrCreatePath ¶
LoadOrCreatePath loads config from path, creating with defaults if missing. When the on-disk version differs from the running binary version, any missing fields are filled from defaults and the file is re-saved so that new configuration options are persisted for future runs.
func (*Config) IsDomainAllowed ¶
IsDomainAllowed checks whether a hostname is permitted by the domain scoping configuration. Returns true if allowed, or false with a reason string.
type CrawlerConfig ¶
type CrawlerConfig struct {
DisallowedPaths []string `json:"disallowed_paths"`
DelayMS int `json:"delay_ms"`
Parallelism int `json:"parallelism"`
MaxDepth int `json:"max_depth"`
MaxRequests int `json:"max_requests"`
ExtractForms *bool `json:"extract_forms"`
SubmitForms *bool `json:"submit_forms"`
Recon *bool `json:"recon"`
}
type ProxyConfig ¶
type SidecarsConfig ¶ added in v0.1.18
type SidecarsConfig struct {
// Enabled gates the listener, created only under the native proxy backend.
Enabled *bool `json:"enabled"`
Socket string `json:"sidecar_socket"` // local IPC socket for protocol sidecars (UDS path or host:port)
HeartbeatIntervalSecs int `json:"heartbeat_interval_secs"`
HeartbeatTimeoutSecs int `json:"heartbeat_timeout_secs"`
}
SidecarsConfig holds declarative settings for out-of-process protocol sidecars. Sidecars are operator-launched (attached) and dial Socket; sectool does not spawn them.