core

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultCheckpointFile = ".sxel_checkpoint"

Variables

View Source
var ErrRateLimited = fmt.Errorf("target rate limited: retries exhausted")

ErrRateLimited is returned by do() after repeated HTTP 429 responses. The retryablehttp CheckRetry treats it as terminal so a rate-limited target is not hammered with multiplied retry layers.

Functions

func ApplyHeaders

func ApplyHeaders(req *http.Request, cfg *Config)

func BaseTransportFor

func BaseTransportFor(c *http.Client) *http.Transport

BaseTransportFor unwraps the scanner middleware (recorder/retry/limiter/ decompress) and returns the underlying *http.Transport, or nil if the client's chain does not terminate in one.

func BuildHeaders

func BuildHeaders(args HeaderList, headersFile string) (map[string]string, error)

func ChromePath

func ChromePath() string

func ChromeReleaseInfo

func ChromeReleaseInfo() string

func DoGET

func DoGET(client *http.Client, cfg *Config, rawURL string) (string, int, error)

func DoJSONPOST

func DoJSONPOST(client *http.Client, cfg *Config, rawURL, jsonBody string) (string, int, error)

func DoJSONPostRaw

func DoJSONPostRaw(client *http.Client, cfg *Config, rawURL, jsonBody string) (string, int, error)

func DoPOST

func DoPOST(client *http.Client, cfg *Config, rawURL string, data url.Values) (string, int, error)

func DoPOSTPlain

func DoPOSTPlain(client *http.Client, cfg *Config, rawURL, body, contentType string) (string, int, error)

func DoXMLPOST

func DoXMLPOST(client *http.Client, cfg *Config, rawURL, body, contentType string) (string, int, error)

func EnsureChrome

func EnsureChrome() string

func EscapeRawQueryValue

func EscapeRawQueryValue(v string) string

func FormDefaults

func FormDefaults(f Form) url.Values

func NewCountingClient

func NewCountingClient(client *http.Client, sent, failed, totalNS *int64) *http.Client

func NewDOMAllocator

func NewDOMAllocator(chrome string) (context.Context, context.CancelFunc)

func NewHTTPClient

func NewHTTPClient(cfg *Config) *http.Client

func ParseHeaderLine

func ParseHeaderLine(line string) (key, value string, ok bool)

func ReadBody

func ReadBody(r io.Reader) string

func ReadURLList

func ReadURLList(path string) ([]string, error)

func SetFormParams

func SetFormParams(rawURL string, params url.Values) (string, error)

func SetParam

func SetParam(rawURL, param, value string) (string, error)

func SetParamRaw

func SetParamRaw(rawURL, param, value string) (string, error)

func StripQuery

func StripQuery(rawURL string) string

func TLSClientConfigFor

func TLSClientConfigFor(cfg *Config) *tls.Config

Types

type BaselineResult

type BaselineResult struct {
	Body    string
	BodyLow string
	Length  int
	Status  int
	Valid   bool
}

type CheckpointState

type CheckpointState struct {
	ScannedURLs map[string]bool `json:"scanned_urls"`
	Results     []ScanResult    `json:"results"`
	// contains filtered or unexported fields
}

func LoadCheckpoint

func LoadCheckpoint(file string) (*CheckpointState, bool)

func NewCheckpoint

func NewCheckpoint(file string) *CheckpointState

func (*CheckpointState) Delete

func (c *CheckpointState) Delete()

func (*CheckpointState) Flush

func (c *CheckpointState) Flush()

func (*CheckpointState) IsScanned

func (c *CheckpointState) IsScanned(u string) bool

func (*CheckpointState) MarkScanned

func (c *CheckpointState) MarkScanned(u string, findings []ScanResult)

type Config

type Config struct {
	URL         string
	Crawl       bool
	BasicCrawl  bool
	JSCrawl     bool
	Threads     int
	Timeout     int
	WAFBypass   bool
	HTMLOutput  string
	JSONOutput  string
	CSVOutput   string
	EvidenceDir string
	SQLScan     bool
	XSSScan     bool
	Cookie      string
	Headers     map[string]string
	Delay       int
	UserAgent   string
	Proxy       string
	Verbose     bool
	WS          bool
	Exclude     string
	MaxPages    int
	ClientCert  string
	ClientKey   string

	BlindSQLi bool

	MaxQueryVariants  int
	MaxProbesPerInput int
	HandshakeTimeout  int
	SQLiMarginFactor  float64
	SQLiConfirmFactor float64
	HeaderScan        bool
	CookieScan        bool
	SensitiveFiles    bool
	OpenRedirect      bool
	PathTraversal     bool
	SecurityHdrs      bool
	CORSScan          bool
	HTTPMethods       bool
	JSEndpoints       bool
	SSTI              bool
	CRLFScan          bool
	HostHeader        bool
	JSONScan          bool
	HPP               bool
	DOMAudit          bool
	LDAPXPath         bool
	H2C               bool
	JARMScan          bool
	DOMXSS            bool
	MassAssign        bool
	AXFR              bool
	AllChecks         bool
	PocScan           bool
	PocNames          string
	PocTags           string
	PocLevel          int
	PocDir            string

	CmdInjection bool
	SSRFScan     bool
	XXEScan      bool
	NoSQLScan    bool

	RateLimit int
	Limiter   *RateLimiter

	Recorder *Recorder
	Session  *SessionJar

	DirScan  bool
	Wordlist string

	Scope      []string
	OutOfScope []string

	WAFAutoDetect bool

	FileUpload bool
	JWTScan    bool
	IDORScan   bool
	GraphQL    bool
	WebShell   bool

	Checkpoint     *CheckpointState
	CheckpointFile string

	CSRF           bool
	CookieAudit    bool
	SubdomainEnum  bool
	ProtoPollution bool
	Deserialize    bool
	CachePoison    bool
	CacheDeception bool
	LFI            bool
	Smuggling      bool
	RateLimitTest  bool
	SubTakeover    bool

	Clutch      bool
	APISecurity bool
	Breach      bool
	Grpc        bool
	Strobe      bool
	Snipe       bool

	Templates   bool
	TemplateDir string

	OOBAddress string

	OOBDomain string

	TemplateSeverity string
}

type CountingTransport

type CountingTransport struct {
	Base    http.RoundTripper
	Sent    *int64
	Failed  *int64
	TotalNS *int64
}

func (*CountingTransport) RoundTrip

func (ct *CountingTransport) RoundTrip(req *http.Request) (*http.Response, error)

type CrawlResult

type CrawlResult struct {
	URL   string
	Forms []Form
}

type Exchange

type Exchange struct {
	Method   string
	URL      string
	Status   int
	Request  string
	Response string
	Time     time.Time
}

type Form

type Form struct {
	Action     string
	Method     string
	Inputs     []Input
	TokenName  string
	TokenValue string
}

type HeaderList

type HeaderList []string

func (*HeaderList) Set

func (h *HeaderList) Set(value string) error

func (*HeaderList) String

func (h *HeaderList) String() string

type Input

type Input struct {
	Name  string
	Type  string
	Value string
}

type RateLimiter

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

func NewRateLimiter

func NewRateLimiter(rps int) *RateLimiter

func (*RateLimiter) Adapt429

func (rl *RateLimiter) Adapt429()

func (*RateLimiter) Close

func (rl *RateLimiter) Close()

func (*RateLimiter) Wait

func (rl *RateLimiter) Wait()

type Recorder

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

func NewRecorder

func NewRecorder(limit int) *Recorder

func (*Recorder) Add

func (r *Recorder) Add(ex Exchange)

func (*Recorder) Match

func (r *Recorder) Match(method, rawURL string) *Exchange

type ReportEntry

type ReportEntry struct {
	ScanResult
	CVSS        string
	Remediation string
}

type ScanReport

type ScanReport struct {
	Target    string
	StartTime string
	Duration  string
	Results   []ReportEntry
	Stats     ScanStats
}

type ScanResult

type ScanResult struct {
	Type       string            `json:"type"`
	URL        string            `json:"url"`
	Method     string            `json:"method"`
	Parameter  string            `json:"parameter"`
	Payload    string            `json:"payload"`
	Severity   string            `json:"severity"`
	Evidence   string            `json:"evidence"`
	Timestamp  time.Time         `json:"timestamp"`
	ParamKey   string            `json:"param_key,omitempty"`
	ParamValue string            `json:"param_value,omitempty"`
	Position   string            `json:"position,omitempty"`
	Extra      map[string]string `json:"extra,omitempty"`
	Request    string            `json:"request,omitempty"`
	Response   string            `json:"response,omitempty"`
}

type ScanStats

type ScanStats struct {
	TotalURLs   int
	TotalForms  int
	SQLiCount   int
	XSSCount    int
	WSCount     int
	OtherCount  int
	HighCount   int
	MediumCount int
	LowCount    int
	InfoCount   int
}

type SessionJar

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

func NewSessionJar

func NewSessionJar(seed string) *SessionJar

func (*SessionJar) Cookies

func (j *SessionJar) Cookies(u *url.URL) []*http.Cookie

func (*SessionJar) SetCookies

func (j *SessionJar) SetCookies(u *url.URL, cookies []*http.Cookie)

Jump to

Keyboard shortcuts

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