Documentation
¶
Index ¶
- Variables
- func AesDecrypt(baseText string, password string, fallbackPass string) (string, error)
- func Decrypt(data string, password string, fallbackPass string) string
- func DefaultEvpKDF(password []byte, salt []byte) (key []byte, iv []byte, err error)
- func DownloadChallenge(urls []string, b64 bool) ([]string, error)
- func Encrypt(data string, key string) string
- func EvpKDF(password []byte, salt []byte, keySize int, iterations int, ...) ([]byte, error)
- func GetOpenAIAuthToken(puid string, dx string, proxy string) (string, error)
- func GetOpenAIAuthTokenWithBx(bx string, puid string, dx string, proxy string) (string, error)
- func PKCS5Padding(src []byte, blockSize int) []byte
- func PKCS5UnPadding(src []byte) []byte
- func SetTLSClient(cli *tls_client.HttpClient)
- func YB(gameType int, apiBreaker *ApiBreaker) func(Input) interface{}
- type ApiBreaker
- type Challenge
- type ChatArkoseResponse
- type ConciseChallenge
- type HARData
- type Input
- type KeyFunc
- type Session
- type ValueFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var Yz = map[int]struct { Value map[string]ValueFunc Key map[string]KeyFunc }{ 4: { Value: map[string]ValueFunc{ "alpha": func(c Input) Input { yValueStr := strconv.Itoa(c.Index) combinedStr := yValueStr + strconv.Itoa(1) combinedInt, _ := strconv.Atoi(combinedStr) return Input{Index: combinedInt - 2} }, "beta": func(c Input) Input { return Input{Index: -c.Index} }, "gamma": func(c Input) Input { return Input{Index: 3 * (3 - c.Index)} }, "delta": func(c Input) Input { return Input{Index: 7 * c.Index} }, "epsilon": func(c Input) Input { return Input{Index: 2 * c.Index} }, "zeta": func(c Input) Input { if c.Index != 0 { return Input{Index: 100 / c.Index} } return Input{Index: c.Index} }, }, Key: map[string]KeyFunc{ "alpha": func(c Input) interface{} { return []int{rand.Intn(100), c.Index, rand.Intn(100)} }, "beta": func(c Input) interface{} { return map[string]int{ "size": 50 - c.Index, "id": c.Index, "limit": 10 * c.Index, "req_timestamp": int(time.Now().UnixNano() / int64(time.Millisecond)), } }, "gamma": func(c Input) interface{} { return c.Index }, "delta": func(c Input) interface{} { return map[string]int{"index": c.Index} }, "epsilon": func(c Input) interface{} { arr := make([]int, rand.Intn(5)+1) randIndex := rand.Intn(len(arr)) for i := range arr { if i == randIndex { arr[i] = c.Index } else { arr[i] = rand.Intn(10) } } return append(arr, randIndex) }, "zeta": func(c Input) interface{} { return append(make([]int, rand.Intn(5)+1), c.Index) }, }, }, }
Functions ¶
func AesDecrypt ¶
func DefaultEvpKDF ¶
func EvpKDF ¶
func EvpKDF(password []byte, salt []byte, keySize int, iterations int, hashAlgorithm string) ([]byte, error)
https://stackoverflow.com/questions/27677236/encryption-in-javascript-and-decryption-with-php/27678978#27678978 https://github.com/brix/crypto-js/blob/8e6d15bf2e26d6ff0af5277df2604ca12b60a718/src/evpkdf.js#L55
func GetOpenAIAuthToken ¶
func PKCS5Padding ¶
func PKCS5UnPadding ¶
https://stackoverflow.com/questions/41579325/golang-how-do-i-decrypt-with-des-cbc-and-pkcs7
func SetTLSClient ¶
func SetTLSClient(cli *tls_client.HttpClient)
func YB ¶
func YB(gameType int, apiBreaker *ApiBreaker) func(Input) interface{}
Types ¶
type ApiBreaker ¶
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"`
ApiBreaker *ApiBreaker `json:"api_breaker"`
ApiBreakerV2Enabled int `json:"api_breaker_v2_enabled"`
} `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 ChatArkoseResponse ¶
type ChatArkoseResponse struct {
Token string `json:"token"`
ChallengeURL string `json:"challenge_url"`
ChallengeURLCDN string `json:"challenge_url_cdn"`
ChallengeURLCDNSRI string `json:"challenge_url_cdn_sri"`
NoScript string `json:"noscript"`
Mbio bool `json:"mbio"`
Tbio bool `json:"tbio"`
Kbio bool `json:"kbio"`
DisableDefaultStyling bool `json:"disable_default_styling"`
CompatibilityModeEnabled bool `json:"compatibility_mode_enabled"`
ForceStandardMode bool `json:"force_standard_mode"`
}
func GetOpenAIToken ¶
func GetOpenAITokenWithBx ¶
func GetOpenAiSignupToken ¶
func GetOpenAiSignupToken(datablobVal, proxy string) (*ChatArkoseResponse, error)
type ConciseChallenge ¶
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 (*Session) RequestChallenge ¶
func (c *Session) RequestChallenge(isAudioGame bool) (*ApiBreaker, error)
func (*Session) SubmitAnswer ¶
func (c *Session) SubmitAnswer(indices []int, isAudio bool, apiBreaker *ApiBreaker) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.