solver

package
v0.0.0-...-8f5b688 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChallengeParams

type ChallengeParams struct {
	R       string
	T       string
	Sitekey string
	Path    string
}

type OneshotSolver

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

func NewSolver

func NewSolver(targetURL string, debug bool) (*OneshotSolver, error)

func NewSolverWithClient

func NewSolverWithClient(client tls_client.HttpClient, targetURL string, debug bool) (*OneshotSolver, error)

func (*OneshotSolver) Solve

func (s *OneshotSolver) Solve() (*SolveResult, error)

func (*OneshotSolver) SolveFromData

func (s *OneshotSolver) SolveFromData(data SolveData) (*SolveResult, error)

SolveFromData sends the JSD oneshot request using caller-provided `r`/`t` (and optional cookies), while still fetching/deobfuscating the JSD script to extract the remaining values.

type SolveData

type SolveData struct {
	R         string
	T         string
	ScriptURL string
	Cookies   []*http.Cookie
}

SolveData lets callers skip the initial homepage request.

You provide the `r` and `t` values (from the `__CF$cv$params` block) and optionally the script URL. The solver will still fetch + deobfuscate the script to extract sitekey/path and the LZ alphabet.

type SolveResult

type SolveResult struct {
	Success     bool
	StatusCode  int
	Body        string
	Cookies     []*http.Cookie
	CfClearance string
}

Jump to

Keyboard shortcuts

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