funcaptcha

package module
v0.0.0-...-b0f1332 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 25 Imported by: 0

README

Arkose Fetch

Usage for OpenAI

import (
	"fmt"

	"github.com/maxduke/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 AesDecrypt

func AesDecrypt(baseText string, password string, fallbackPass string) (string, error)

func Decrypt

func Decrypt(data string, password string, fallbackPass string) string

func DefaultEvpKDF

func DefaultEvpKDF(password []byte, salt []byte) (key []byte, iv []byte, err error)

func DownloadChallenge

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

func Encrypt

func Encrypt(data string, key string) string

func GetOpenAIAuthToken

func GetOpenAIAuthToken(puid string, proxy string) (string, error)

func GetOpenAIAuthTokenWithBx

func GetOpenAIAuthTokenWithBx(bx string, puid string, proxy string) (string, error)

func GetOpenAIToken

func GetOpenAIToken(puid string, proxy string) (string, error)

func GetOpenAITokenWithBx

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

func PKCS5Padding

func PKCS5Padding(src []byte, blockSize int) []byte

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 HARData

type HARData struct {
	Log logData `json:"log"`
}

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, isAudio bool) error

Directories

Path Synopsis
cmd
api command

Jump to

Keyboard shortcuts

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