Documentation ¶
Index ¶
- Constants
- func AesDecrypt(cipherText string, password string) (string, error)
- func DefaultEvpKDF(password []byte, salt []byte) (key []byte, iv []byte, err error)
- func Encrypt(data string, key string) string
- func EvpKDF(password []byte, salt []byte, keySize int, iterations int, ...) ([]byte, error)
- func GetBda(userAgent string, referer string, location string) string
- func GetMurmur128String(input string, seed uint64) string
- func GetOpenAITokenV1() (string, error)
- func GetOpenAITokenV2() (string, error)
- func MapSlice(a []string, f func(string) string) []string
- func NewWithSeed(seed uint64) *digest
- func PKCS5Padding(src []byte, blockSize int) []byte
- func PKCS5UnPadding(src []byte) []byte
- func Random() string
- type Bda
- type EncryptionData
- type Fingerprint
- type GetTokenOptions
- type GetTokenResult
- type OpenAiRequest
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 DefaultEvpKDF ¶ added in v0.2.0
func EvpKDF ¶ added in v0.2.0
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 GetMurmur128String ¶
func GetOpenAITokenV1 ¶ added in v0.2.3
func GetOpenAITokenV2 ¶ added in v0.2.3
func NewWithSeed ¶
func NewWithSeed(seed uint64) *digest
func PKCS5Padding ¶ added in v0.2.0
Types ¶
type EncryptionData ¶
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)
Click to show internal directories.
Click to hide internal directories.