funcaptcha

package module
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 22 Imported by: 1

README

funcaptcha

This is a port of project funcaptcha to golang.

Documentation

Index

Constants

View Source
const DEFAULT_USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"

Variables

This section is empty.

Functions

func AesDecrypt added in v0.2.0

func AesDecrypt(cipherText string, password string) (string, error)

func DefaultEvpKDF added in v0.2.0

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

func Encrypt added in v0.2.1

func Encrypt(data string, key string) string

func GetBda

func GetBda(userAgent string, referer string, location string) string

func GetMurmur128String

func GetMurmur128String(input string, seed uint64) string

func GetOpenAITokenV1 added in v0.2.3

func GetOpenAITokenV1() (string, error)

func GetOpenAITokenV2 added in v0.2.3

func GetOpenAITokenV2() (string, error)

func MapSlice

func MapSlice(a []string, f func(string) string) []string

func NewWithSeed

func NewWithSeed(seed uint64) *digest

func PKCS5Padding added in v0.2.0

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

func Random

func Random() string

Types

type Bda

type Bda struct {
	Key   string      `json:"key"`
	Value interface{} `json:"value"`
}

type EncryptionData

type EncryptionData struct {
	Ct string `json:"ct"`
	Iv string `json:"iv"`
	S  string `json:"s"`
}

func AesEncrypt added in v0.2.0

func AesEncrypt(content string, password string) (*EncryptionData, error)

type Fingerprint

type Fingerprint map[string]interface{}

type GetTokenOptions

type GetTokenOptions struct {
	PKey     string            `json:"pkey"`
	SURL     string            `json:"surl,omitempty"`
	Data     map[string]string `json:"data,omitempty"`
	Headers  map[string]string `json:"headers,omitempty"`
	Site     string            `json:"site,omitempty"`
	Location string            `json:"location,omitempty"`
	Proxy    string            `json:"proxy,omitempty"`
}

type GetTokenResult

type GetTokenResult struct {
	ChallengeURL          string `json:"challenge_url"`
	ChallengeURLCDN       string `json:"challenge_url_cdn"`
	ChallengeURLCDNSRI    string `json:"challenge_url_cdn_sri"`
	DisableDefaultStyling bool   `json:"disable_default_styling"`
	IFrameHeight          int    `json:"iframe_height"`
	IFrameWidth           int    `json:"iframe_width"`
	KBio                  bool   `json:"kbio"`
	MBio                  bool   `json:"mbio"`
	NoScript              string `json:"noscript"`
	TBio                  bool   `json:"tbio"`
	Token                 string `json:"token"`
}

func GetToken

func GetToken(options *GetTokenOptions) (GetTokenResult, error)

type OpenAiRequest added in v0.2.4

type OpenAiRequest struct {
	Request *http.Request
	Client  *tls_client.HttpClient
}

func NewOpenAiRequestV1 added in v0.2.4

func NewOpenAiRequestV1() (*OpenAiRequest, error)

func NewOpenAiRequestV2 added in v0.2.4

func NewOpenAiRequestV2() (*OpenAiRequest, error)

func (*OpenAiRequest) GetToken added in v0.2.4

func (r *OpenAiRequest) GetToken() (string, error)

Jump to

Keyboard shortcuts

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