protocol

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WorkflowModeNone       = "none"
	WorkflowModeExplore    = "explore"
	WorkflowModeTestReport = "test-report"
	WorkflowModeCLI        = "cli" // undocumented, for CLI client use only
)

Workflow mode constants

Variables

This section is empty.

Functions

This section is empty.

Types

type ABIntPair added in v0.1.3

type ABIntPair struct {
	A int `json:"a"`
	B int `json:"b"`
}

ABIntPair represents an integer value that differs between flow A and B.

type ABPair added in v0.1.3

type ABPair struct {
	A string `json:"a"`
	B string `json:"b"`
}

ABPair represents a string value that differs between flow A and B.

type BodyDiff added in v0.1.3

type BodyDiff struct {
	Format string `json:"format"` // "json", "text", "binary"

	// JSON diff fields
	Added          []PathValue    `json:"added,omitempty"`
	Removed        []PathEntry    `json:"removed,omitempty"`
	Changed        []PathABChange `json:"changed,omitempty"`
	UnchangedCount int            `json:"unchanged_count,omitempty"`

	// Text diff fields
	Diff    string `json:"diff,omitempty"`
	Summary string `json:"summary,omitempty"`

	// Size fields (text and binary)
	ASize int `json:"a_size,omitempty"`
	BSize int `json:"b_size,omitempty"`

	// Binary diff fields
	Same *bool `json:"same,omitempty"`

	Truncated bool `json:"truncated,omitempty"`
}

BodyDiff shows body differences, format-aware.

type CookieEntry added in v0.1.3

type CookieEntry struct {
	Name     string      `json:"name"`
	Domain   string      `json:"domain"`
	Path     string      `json:"path"`
	Secure   bool        `json:"secure"`
	HttpOnly bool        `json:"httponly"`
	SameSite string      `json:"samesite,omitempty"`
	Expires  string      `json:"expires"`
	Value    string      `json:"value,omitempty"`
	Decoded  *jwt.Result `json:"decoded,omitempty"`
	FlowID   string      `json:"flow_id"`
}

CookieEntry represents a cookie observed in proxy/replay traffic.

type CookieJarResponse added in v0.1.3

type CookieJarResponse struct {
	Cookies []CookieEntry `json:"cookies"`
}

CookieJarResponse is the response for cookie_jar.

type CrawlCreateResponse

type CrawlCreateResponse struct {
	SessionID string `json:"session_id"`
	Label     string `json:"label,omitempty"`
	State     string `json:"state"`
	CreatedAt string `json:"created_at"`
}

CrawlCreateResponse is the response for crawl_create.

type CrawlError

type CrawlError struct {
	URL    string `json:"url"`
	Status int    `json:"status,omitempty"`
	Error  string `json:"error"`
}

CrawlError is a crawl error.

type CrawlFlow

type CrawlFlow struct {
	FlowID         string         `json:"flow_id"`
	Method         string         `json:"method"`
	Host           string         `json:"host"`
	Path           string         `json:"path"`
	Status         int            `json:"status"`
	ResponseLength int            `json:"response_length"`
	Duration       string         `json:"duration"`
	FoundOn        string         `json:"found_on,omitempty"`
	Notes          []FlowNoteInfo `json:"notes,omitempty"`
}

CrawlFlow is a crawled request/response summary.

type CrawlForm

type CrawlForm struct {
	FormID  string      `json:"form_id"`
	URL     string      `json:"url"`
	Action  string      `json:"action"`
	Method  string      `json:"method"`
	HasCSRF bool        `json:"has_csrf"`
	Inputs  []FormInput `json:"inputs"`
}

CrawlForm is a discovered form.

type CrawlPollResponse

type CrawlPollResponse struct {
	SessionID  string         `json:"session_id"`
	State      string         `json:"state,omitempty"`
	Duration   string         `json:"duration,omitempty"` // summary only
	Aggregates []SummaryEntry `json:"aggregates,omitempty"`
	Flows      []CrawlFlow    `json:"flows,omitempty"`
	Forms      []CrawlForm    `json:"forms,omitempty"`
	Errors     []CrawlError   `json:"errors,omitempty"`
	Note       string         `json:"note,omitempty"`
}

CrawlPollResponse is the unified response for crawl_poll.

func (CrawlPollResponse) MarshalJSON added in v0.1.4

func (r CrawlPollResponse) MarshalJSON() ([]byte, error)

MarshalJSON preserves non-nil empty slices (as []) while omitting nil ones.

type CrawlSeedResponse

type CrawlSeedResponse struct {
	AddedCount int `json:"added_count"`
}

CrawlSeedResponse is the response for crawl_seed.

type CrawlSession

type CrawlSession struct {
	SessionID string `json:"session_id"`
	Label     string `json:"label,omitempty"`
	State     string `json:"state"`
	CreatedAt string `json:"created_at"`
}

CrawlSession is a crawl session entry.

type CrawlSessionsResponse

type CrawlSessionsResponse struct {
	Sessions []CrawlSession `json:"sessions"`
}

CrawlSessionsResponse is the response for crawl_sessions.

type CrawlStatusResponse

type CrawlStatusResponse struct {
	State           string `json:"state"`
	URLsQueued      int    `json:"urls_queued"`
	URLsVisited     int    `json:"urls_visited"`
	URLsErrored     int    `json:"urls_errored"`
	FormsDiscovered int    `json:"forms_discovered"`
	Duration        string `json:"duration"`
	LastActivity    string `json:"last_activity"`
	ErrorMessage    string `json:"error_message,omitempty"`
}

CrawlStatusResponse is the response for crawl_status.

type DiffFlowResponse added in v0.1.3

type DiffFlowResponse struct {
	Same     bool          `json:"same,omitempty"`
	Request  *RequestDiff  `json:"request,omitempty"`
	Response *ResponseDiff `json:"response,omitempty"`
}

DiffFlowResponse is the response for diff_flow.

type FindReflectedResponse added in v0.1.3

type FindReflectedResponse struct {
	Reflections []Reflection `json:"reflections"`
}

FindReflectedResponse is the response for find_reflected.

type FlowEntry

type FlowEntry struct {
	FlowID         string         `json:"flow_id"`
	Method         string         `json:"method"`
	Scheme         string         `json:"scheme"`
	Host           string         `json:"host"`
	Port           int            `json:"port,omitempty"`
	Path           string         `json:"path"`
	Status         int            `json:"status"`
	ResponseLength int            `json:"response_length"`
	Source         string         `json:"source,omitempty"` // "proxy" or "replay"
	Notes          []FlowNoteInfo `json:"notes,omitempty"`
}

FlowEntry represents a single proxy history entry in list view.

type FlowGetResponse added in v0.1.6

type FlowGetResponse struct {
	FlowID            string              `json:"flow_id"`
	Source            string              `json:"source"`
	Method            string              `json:"method"`
	URL               string              `json:"url"`
	ReqHeaders        string              `json:"request_headers"`
	ReqHeadersParsed  map[string][]string `json:"request_headers_parsed,omitempty"`
	ReqLine           *RequestLine        `json:"request_line,omitempty"`
	ReqBody           string              `json:"request_body"`
	ReqSize           int                 `json:"request_size"`
	Status            int                 `json:"status"`
	StatusLine        string              `json:"status_line"`
	RespHeaders       string              `json:"response_headers"`
	RespHeadersParsed map[string][]string `json:"response_headers_parsed,omitempty"`
	RespBody          string              `json:"response_body"`
	RespSize          int                 `json:"response_size"`
	Duration          string              `json:"duration,omitempty"`
	FoundOn           string              `json:"found_on,omitempty"`
	Depth             int                 `json:"depth,omitempty"`
	Truncated         bool                `json:"truncated,omitempty"`
	Note              string              `json:"note,omitempty"`
}

FlowGetResponse is the response for flow_get.

type FlowNoteInfo added in v0.1.6

type FlowNoteInfo struct {
	NoteID  string `json:"note_id"`
	Type    string `json:"type"`
	Content string `json:"content"`
}

FlowNoteInfo is lightweight note info attached to flow listings.

type FormInput

type FormInput struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Value    string `json:"value,omitempty"`
	Required bool   `json:"required,omitempty"`
}

FormInput is a form input field.

type NameABChange added in v0.1.3

type NameABChange struct {
	Name string `json:"name"`
	A    string `json:"a"`
	B    string `json:"b"`
}

NameABChange shows a header or param that changed between A and B.

type NameValue added in v0.1.3

type NameValue struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

NameValue is a name-value pair for added/removed headers or params.

type NoteDeleteResponse added in v0.1.6

type NoteDeleteResponse struct{}

NoteDeleteResponse is the response for notes_save delete.

type NoteEntry added in v0.1.6

type NoteEntry struct {
	NoteID  string   `json:"note_id"`
	Type    string   `json:"type"`
	FlowIDs []string `json:"flow_ids"`
	Content string   `json:"content"`
}

NoteEntry represents a saved note/finding.

type NotesListResponse added in v0.1.6

type NotesListResponse struct {
	Notes []NoteEntry `json:"notes"`
}

NotesListResponse is the response for notes_list.

type OastCreateResponse

type OastCreateResponse struct {
	OastID string `json:"oast_id"`
	Domain string `json:"domain"`
	Label  string `json:"label,omitempty"`
}

OastCreateResponse is the response for oast_create.

type OastEvent

type OastEvent struct {
	EventID   string                 `json:"event_id"`
	Time      string                 `json:"time"`
	Type      string                 `json:"type"`
	SourceIP  string                 `json:"source_ip"`
	Subdomain string                 `json:"subdomain,omitempty"`
	Details   map[string]interface{} `json:"details,omitempty"`
}

OastEvent represents a single OAST interaction event.

type OastGetResponse

type OastGetResponse struct {
	EventID   string                 `json:"event_id"`
	Time      string                 `json:"time"`
	Type      string                 `json:"type"`
	SourceIP  string                 `json:"source_ip"`
	Subdomain string                 `json:"subdomain,omitempty"`
	Details   map[string]interface{} `json:"details,omitempty"`
}

OastGetResponse is the response for oast_get.

type OastListResponse

type OastListResponse struct {
	Sessions []OastSession `json:"sessions"`
}

OastListResponse is the response for oast_list.

type OastPollResponse

type OastPollResponse struct {
	Aggregates   []OastSummaryEntry `json:"aggregates,omitempty"` // summary mode
	Events       []OastEvent        `json:"events,omitempty"`     // list mode
	DroppedCount int                `json:"dropped_count,omitempty"`
}

OastPollResponse is the response for oast_poll.

func (OastPollResponse) MarshalJSON added in v0.1.4

func (r OastPollResponse) MarshalJSON() ([]byte, error)

MarshalJSON preserves non-nil empty slices (as []) while omitting nil ones.

type OastSession

type OastSession struct {
	OastID    string `json:"oast_id"`
	Domain    string `json:"domain"`
	Label     string `json:"label,omitempty"`
	CreatedAt string `json:"created_at"`
}

OastSession represents an active OAST session.

type OastSummaryEntry

type OastSummaryEntry struct {
	Subdomain string `json:"subdomain"`
	SourceIP  string `json:"source_ip"`
	Type      string `json:"type"`
	Count     int    `json:"count"`
}

OastSummaryEntry represents aggregated OAST events by (subdomain, source_ip, type).

type ParamsDiff added in v0.1.3

type ParamsDiff struct {
	Added          []NameValue    `json:"added,omitempty"`
	Removed        []NameValue    `json:"removed,omitempty"`
	Changed        []NameABChange `json:"changed,omitempty"`
	UnchangedCount int            `json:"unchanged_count"`
}

ParamsDiff shows structured add/remove/change for headers or query params.

type PathABChange added in v0.1.3

type PathABChange struct {
	Path string      `json:"path"`
	A    interface{} `json:"a"`
	B    interface{} `json:"b"`
}

PathABChange shows a JSON path whose value changed.

type PathEntry added in v0.1.3

type PathEntry struct {
	Path string `json:"path"`
}

PathEntry is a JSON path (for removed paths).

type PathValue added in v0.1.3

type PathValue struct {
	Path  string      `json:"path"`
	Value interface{} `json:"value"`
}

PathValue is a JSON path with its value (for added paths).

type ProxyPollResponse

type ProxyPollResponse struct {
	Aggregates []SummaryEntry `json:"aggregates,omitempty"` // summary mode
	Flows      []FlowEntry    `json:"flows,omitempty"`      // list mode
	Note       string         `json:"note,omitempty"`
}

ProxyPollResponse is the unified response for proxy_poll.

func (ProxyPollResponse) MarshalJSON added in v0.1.4

func (r ProxyPollResponse) MarshalJSON() ([]byte, error)

MarshalJSON preserves non-nil empty slices (as []) while omitting nil ones. This ensures the active mode key is always present even with zero results.

type Reflection added in v0.1.3

type Reflection struct {
	Name         string   `json:"name"`
	Source       string   `json:"source"`
	Value        string   `json:"value"`
	Locations    []string `json:"locations"`
	RawReflected bool     `json:"raw_reflected,omitempty"` // value has special chars and appears unencoded
}

Reflection represents a request parameter value found in the response.

type ReplaySendResponse

type ReplaySendResponse struct {
	FlowID   string `json:"flow_id"`
	Duration string `json:"duration"`
	ResponseDetails
}

ReplaySendResponse is the response for replay_send.

type RequestDiff added in v0.1.3

type RequestDiff struct {
	Method  *ABPair     `json:"method,omitempty"`
	Path    *ABPair     `json:"path,omitempty"`
	Query   *ParamsDiff `json:"query,omitempty"`
	Headers *ParamsDiff `json:"headers,omitempty"`
	Body    *BodyDiff   `json:"body,omitempty"`
}

RequestDiff contains differences in the request.

type RequestLine

type RequestLine struct {
	Path    string `json:"path"`
	Version string `json:"version"`
}

RequestLine contains path and version from the HTTP request line.

type ResponseDetails

type ResponseDetails struct {
	Status      int    `json:"status"`
	StatusLine  string `json:"status_line"`
	RespHeaders string `json:"response_headers"`
	RespPreview string `json:"response_preview,omitempty"`
	RespSize    int    `json:"response_size"`
}

ResponseDetails contains HTTP response summary fields.

type ResponseDiff added in v0.1.3

type ResponseDiff struct {
	Status  *ABIntPair  `json:"status,omitempty"`
	Headers *ParamsDiff `json:"headers,omitempty"`
	Body    *BodyDiff   `json:"body,omitempty"`
}

ResponseDiff contains differences in the response.

type RuleEntry

type RuleEntry struct {
	RuleID  string `json:"rule_id"`
	Type    string `json:"type"`
	Label   string `json:"label,omitempty"`
	IsRegex bool   `json:"is_regex,omitempty"`
	Match   string `json:"match,omitempty"`
	Replace string `json:"replace,omitempty"`
}

RuleEntry represents a match/replace rule.

type RuleListResponse

type RuleListResponse struct {
	Rules []RuleEntry `json:"rules"`
}

RuleListResponse is the response for proxy_rule_list.

type SummaryEntry

type SummaryEntry struct {
	Host   string `json:"host"`
	Path   string `json:"path"`
	Method string `json:"method"`
	Status int    `json:"status"`
	Count  int    `json:"count"`
}

SummaryEntry represents grouped traffic by (host, path, method, status).

type ValidationIssue added in v0.1.6

type ValidationIssue struct {
	Check  string `json:"check"`
	Detail string `json:"detail"`
}

ValidationIssue represents a single validation problem.

type ValidationResult added in v0.1.6

type ValidationResult struct {
	Issues []ValidationIssue `json:"issues"`
	Hint   string            `json:"hint,omitempty"`
}

ValidationResult is the structured response for validation failures.

Jump to

Keyboard shortcuts

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