funcaptcha

package module
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: MIT Imports: 23 Imported by: 4

README

Arkose Fetch

Usage for OpenAI

import (
	"fmt"

	"github.com/acheong08/funcaptcha"
)

func main() {
	token, _, _ := funcaptcha.GetOpenAIToken()
	fmt.Println(token)
}

API:

You can download the binary from releases or go run cmd/api/main.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadChallenge

func DownloadChallenge(urls []string, b64 bool) ([]string, error)

func GetOpenAIToken

func GetOpenAIToken() (string, string, error)

func GetOpenAITokenWithBx added in v1.9.1

func GetOpenAITokenWithBx(bx string) (string, string, error)

func SetTLSClient

func SetTLSClient(cli *tls_client.HttpClient)

Types

type Challenge

type Challenge struct {
	SessionToken         string      `json:"session_token"`
	ChallengeID          string      `json:"challengeID"`
	ChallengeURL         string      `json:"challengeURL"`
	AudioChallengeURLs   []string    `json:"audio_challenge_urls"`
	AudioGameRateLimited interface{} `json:"audio_game_rate_limited"`
	Sec                  int         `json:"sec"`
	EndURL               interface{} `json:"end_url"`
	GameData             struct {
		GameType          int    `json:"gameType"`
		GameVariant       string `json:"game_variant"`
		InstructionString string `json:"instruction_string"`
		CustomGUI         struct {
			ChallengeIMGs []string `json:"_challenge_imgs"`
		} `json:"customGUI"`
	} `json:"game_data"`
	GameSID             string            `json:"game_sid"`
	SID                 string            `json:"sid"`
	Lang                string            `json:"lang"`
	StringTablePrefixes []interface{}     `json:"string_table_prefixes"`
	StringTable         map[string]string `json:"string_table"`
	EarlyVictoryMessage interface{}       `json:"earlyVictoryMessage"`
	FontSizeAdjustments interface{}       `json:"font_size_adjustments"`
	StyleTheme          string            `json:"style_theme"`
}

type ConciseChallenge

type ConciseChallenge struct {
	GameType     string   `json:"game_type"`
	URLs         []string `json:"urls"`
	Instructions string   `json:"instructions"`
}

type Session

type Session struct {
	Sid              string           `json:"sid"`
	SessionToken     string           `json:"session_token"`
	Hex              string           `json:"hex"`
	ChallengeLogger  challengeLogger  `json:"challenge_logger"`
	Challenge        Challenge        `json:"challenge"`
	ConciseChallenge ConciseChallenge `json:"concise_challenge"`
	Headers          http.Header      `json:"headers"`
}

func StartChallenge

func StartChallenge(full_session, hex string) (*Session, error)

func (*Session) RequestChallenge

func (c *Session) RequestChallenge(isAudioGame bool) error

func (*Session) SubmitAnswer

func (c *Session) SubmitAnswer(index int) error

Directories

Path Synopsis
cmd
api

Jump to

Keyboard shortcuts

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