gofrc

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 13 Imported by: 0

README

gofrc

Build Status Go Reference

Golang Friendly Captcha Solver

How to use

frc := gofrc.New("YOUR_SITEKEY")

puzzle, err := frc.GetPuzzle()
if err != nil {
    panic(err)
}

solution := frc.SolvePuzzle(puzzle)

License

MIT

Documentation

Index

Constants

View Source
const (
	PuzzleExpiryOffset     = 13
	NumberOfPuzzlesOffset  = 14
	PuzzleDifficultyOffset = 15
)
View Source
const ChallengeSizeBytes = 128

Variables

This section is empty.

Functions

func RandomUint32

func RandomUint32() uint32

Types

type FRC

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

func New

func New(sitekey string, optFns ...func(o *Options)) *FRC

func (*FRC) GetPuzzle

func (frc *FRC) GetPuzzle() (*Puzzle, error)

func (*FRC) SolvePuzzle

func (frc *FRC) SolvePuzzle(puzzle *Puzzle) string

type HTTPDoFunc

type HTTPDoFunc func(req *http.Request) (*http.Response, error)

type Options

type Options struct {
	HTTPDoFunc    HTTPDoFunc
	XFRCClient    string
	Endpoint      string
	SolverThreats int
}

type Puzzle

type Puzzle struct {
	Signature string
	Base64    string
	Buffer    []byte
	Threshold uint32
	N         int
	Expiry    uint32
}

func NewPuzzle

func NewPuzzle(input string) (*Puzzle, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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