sender

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package sender issues one-off HTTP/HTTPS requests directly to a target (bypassing the proxy listener) and records each as a flow. It backs the Repeater and Intruder modules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Header struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Header is a single session header applied to outgoing sends.

type Request

type Request struct {
	Method  string
	URL     string
	Headers map[string][]string
	Body    []byte
	Flags   int64           // e.g. store.FlagRepeater / store.FlagIntruder, OR'd onto the flow
	Context context.Context // optional: cancel an in-flight send (e.g. an active-scan kill switch)
}

Request describes a request to send.

type Sender

type Sender struct {
	// contains filtered or unexported fields
}

Sender sends requests and persists them as flows.

func New

func New(st *store.Store, cap *capture.Capturer) *Sender

New builds a Sender. The client does not follow redirects (each hop is its own flow, like Burp) and does not verify TLS — a security-testing tool routinely talks to targets with self-signed or invalid certificates.

func (*Sender) Send

func (s *Sender) Send(r Request) (*store.Flow, error)

Send issues r, captures the response, and persists a flow. Transport-level failures are recorded as an errored flow (502) rather than returned as errors; only malformed input returns an error.

func (*Sender) SetSession

func (s *Sender) SetSession(enabled bool, headers []Header)

SetSession configures the session headers auto-applied to outgoing sends.

Jump to

Keyboard shortcuts

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