Documentation ¶
Index ¶
- type DataDomeInterstitialInput
- type DataDomeSliderInput
- type DataDomeTagsInput
- type DynamicInput
- type KasadaHeaders
- type KasadaPayloadInput
- type KasadaPowInput
- type PixelInput
- type ReeseInput
- type SbsdInput
- type SensorInput
- type Session
- func (s *Session) GenerateDataDomeInterstitial(ctx context.Context, input *DataDomeInterstitialInput) (string, error)
- func (s *Session) GenerateDataDomeSlider(ctx context.Context, input *DataDomeSliderInput) (string, error)
- func (s *Session) GenerateDataDomeTags(ctx context.Context, input *DataDomeTagsInput) (string, error)
- func (s *Session) GenerateKasadaPayload(ctx context.Context, input *KasadaPayloadInput) ([]byte, *KasadaHeaders, error)
- func (s *Session) GenerateKasadaPow(ctx context.Context, input *KasadaPowInput) (string, error)
- func (s *Session) GeneratePixelData(ctx context.Context, input *PixelInput) (string, error)
- func (s *Session) GenerateReese84Sensor(ctx context.Context, site string, input *ReeseInput) (string, error)
- func (s *Session) GenerateSbsdData(ctx context.Context, input *SbsdInput) (string, error)
- func (s *Session) GenerateSensorData(ctx context.Context, input *SensorInput) (string, error)
- func (s *Session) GenerateUtmvcCookie(ctx context.Context, input *UtmvcInput) (string, error)
- func (s *Session) ParseV3Dynamic(ctx context.Context, input *DynamicInput) (string, error)
- func (s *Session) WithClient(client *http.Client) *Session
- func (s *Session) WithJwtKey(jwt string) *Session
- type UtmvcInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataDomeInterstitialInput ¶ added in v1.1.0
type DataDomeInterstitialInput struct { // UserAgent must be a Chrome Windows User-Agent. UserAgent string `json:"userAgent"` // DeviceLink is the URL that contains the script and starts like this: // https://geo.captcha-delivery.com/captcha/?initialCid DeviceLink string `json:"deviceLink"` // Html is the response body of the GET request to the DeviceLink Html string `json:"html"` Language string `json:"language,omitempty"` IP string `json:"ip"` }
func (DataDomeInterstitialInput) MarshalEasyJSON ¶ added in v1.1.0
func (v DataDomeInterstitialInput) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (DataDomeInterstitialInput) MarshalJSON ¶ added in v1.1.0
func (v DataDomeInterstitialInput) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*DataDomeInterstitialInput) UnmarshalEasyJSON ¶ added in v1.1.0
func (v *DataDomeInterstitialInput) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*DataDomeInterstitialInput) UnmarshalJSON ¶ added in v1.1.0
func (v *DataDomeInterstitialInput) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type DataDomeSliderInput ¶ added in v1.1.0
type DataDomeSliderInput struct { // UserAgent must be a Chrome Windows User-Agent. UserAgent string `json:"userAgent"` // DeviceLink is the URL that contains the script and starts like this: // https://geo.captcha-delivery.com/captcha/?initialCid DeviceLink string `json:"deviceLink"` // Html is the response body of the GET request to the DeviceLink Html string `json:"html"` // Puzzle is the captcha puzzle image bytes, base64 encoded. // The URL that returns the puzzle looks like this: // https://dd.prod.captcha-delivery.com/image/2024-xx-xx/hash.jpg Puzzle string `json:"puzzle"` // Piece is the captcha puzzle piece image bytes, base64 encoded. // The URL that returns the puzzle looks like this: // https://dd.prod.captcha-delivery.com/image/2024-xx-xx/hash.frag.png Piece string `json:"piece"` Language string `json:"language,omitempty"` IP string `json:"ip"` }
func (DataDomeSliderInput) MarshalEasyJSON ¶ added in v1.1.0
func (v DataDomeSliderInput) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (DataDomeSliderInput) MarshalJSON ¶ added in v1.1.0
func (v DataDomeSliderInput) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*DataDomeSliderInput) UnmarshalEasyJSON ¶ added in v1.1.0
func (v *DataDomeSliderInput) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*DataDomeSliderInput) UnmarshalJSON ¶ added in v1.1.0
func (v *DataDomeSliderInput) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type DataDomeTagsInput ¶ added in v1.2.0
type DataDomeTagsInput struct { // UserAgent must be a Chrome Windows User-Agent. UserAgent string `json:"userAgent"` Cid string `json:"cid"` Ddk string `json:"ddk"` Referer string `json:"referer"` Type string `json:"type"` Language string `json:"language,omitempty"` IP string `json:"ip"` }
func (DataDomeTagsInput) MarshalEasyJSON ¶ added in v1.2.0
func (v DataDomeTagsInput) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (DataDomeTagsInput) MarshalJSON ¶ added in v1.2.0
func (v DataDomeTagsInput) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*DataDomeTagsInput) UnmarshalEasyJSON ¶ added in v1.2.0
func (v *DataDomeTagsInput) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*DataDomeTagsInput) UnmarshalJSON ¶ added in v1.2.0
func (v *DataDomeTagsInput) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type DynamicInput ¶ added in v1.2.0
type DynamicInput struct { // Script is the akamai script's contents. Script string `json:"script"` }
func (DynamicInput) MarshalEasyJSON ¶ added in v1.2.0
func (v DynamicInput) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (DynamicInput) MarshalJSON ¶ added in v1.2.0
func (v DynamicInput) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*DynamicInput) UnmarshalEasyJSON ¶ added in v1.2.0
func (v *DynamicInput) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*DynamicInput) UnmarshalJSON ¶ added in v1.2.0
func (v *DynamicInput) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type KasadaHeaders ¶ added in v1.1.0
type KasadaHeaders struct { XKpsdkCt string `json:"x-kpsdk-ct"` XKpsdkDt string `json:"x-kpsdk-dt"` XKpsdkV string `json:"x-kpsdk-v"` XKpsdkR string `json:"x-kpsdk-r"` XKpsdkDv string `json:"x-kpsdk-dv"` XKpsdkH string `json:"x-kpsdk-h"` XKpsdkFc string `json:"x-kpsdk-fc"` XKpsdkIm string `json:"x-kpsdk-im"` }
func (KasadaHeaders) MarshalEasyJSON ¶ added in v1.1.0
func (v KasadaHeaders) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (KasadaHeaders) MarshalJSON ¶ added in v1.1.0
func (v KasadaHeaders) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*KasadaHeaders) UnmarshalEasyJSON ¶ added in v1.1.0
func (v *KasadaHeaders) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*KasadaHeaders) UnmarshalJSON ¶ added in v1.1.0
func (v *KasadaHeaders) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type KasadaPayloadInput ¶ added in v1.1.0
type KasadaPayloadInput struct { // UserAgent must be a Chrome Windows User-Agent. UserAgent string `json:"userAgent"` // IpsLink is the ips.js script link, parsed from the block page (429 status code) IpsLink string `json:"ipsLink"` // Script is the ips.js script retrieved using the IpsLink url Script string `json:"script"` // Language is the first language of your accept-language header, it defaults to "en-US" if left empty. Language string `json:"language,omitempty"` }
func (KasadaPayloadInput) MarshalEasyJSON ¶ added in v1.1.0
func (v KasadaPayloadInput) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (KasadaPayloadInput) MarshalJSON ¶ added in v1.1.0
func (v KasadaPayloadInput) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*KasadaPayloadInput) UnmarshalEasyJSON ¶ added in v1.1.0
func (v *KasadaPayloadInput) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*KasadaPayloadInput) UnmarshalJSON ¶ added in v1.1.0
func (v *KasadaPayloadInput) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type KasadaPowInput ¶ added in v1.1.0
type KasadaPowInput struct { // St is the x-kpsdk-st value returned by the /tl POST request St int `json:"st"` // WorkTime can be used to pre-generate POW strings WorkTime *int `json:"workTime,omitempty"` }
func (KasadaPowInput) MarshalEasyJSON ¶ added in v1.1.0
func (v KasadaPowInput) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (KasadaPowInput) MarshalJSON ¶ added in v1.1.0
func (v KasadaPowInput) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*KasadaPowInput) UnmarshalEasyJSON ¶ added in v1.1.0
func (v *KasadaPowInput) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*KasadaPowInput) UnmarshalJSON ¶ added in v1.1.0
func (v *KasadaPowInput) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type PixelInput ¶
type PixelInput struct { // UserAgent must be a Chrome Windows User-Agent. UserAgent string `json:"userAgent"` HTMLVar string `json:"htmlVar"` ScriptVar string `json:"scriptVar"` }
func (PixelInput) MarshalEasyJSON ¶
func (v PixelInput) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (PixelInput) MarshalJSON ¶
func (v PixelInput) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*PixelInput) UnmarshalEasyJSON ¶
func (v *PixelInput) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*PixelInput) UnmarshalJSON ¶
func (v *PixelInput) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ReeseInput ¶ added in v1.2.1
type ReeseInput struct { UserAgent string `json:"userAgent"` Language string `json:"language,omitempty"` IP string `json:"ip,omitempty"` }
func (ReeseInput) MarshalEasyJSON ¶ added in v1.2.1
func (v ReeseInput) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ReeseInput) MarshalJSON ¶ added in v1.2.1
func (v ReeseInput) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ReeseInput) UnmarshalEasyJSON ¶ added in v1.2.1
func (v *ReeseInput) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ReeseInput) UnmarshalJSON ¶ added in v1.2.1
func (v *ReeseInput) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SbsdInput ¶ added in v1.2.0
type SbsdInput struct { // UserAgent must be a Chrome Windows User-Agent. UserAgent string `json:"userAgent"` Uuid string `json:"uuid"` PageUrl string `json:"pageUrl"` OCookie string `json:"o"` ScriptHash string `json:"scriptHash"` Language string `json:"language,omitempty"` IP string `json:"ip,omitempty"` }
func (SbsdInput) MarshalEasyJSON ¶ added in v1.2.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (SbsdInput) MarshalJSON ¶ added in v1.2.0
MarshalJSON supports json.Marshaler interface
func (*SbsdInput) UnmarshalEasyJSON ¶ added in v1.2.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SbsdInput) UnmarshalJSON ¶ added in v1.2.0
UnmarshalJSON supports json.Unmarshaler interface
type SensorInput ¶
type SensorInput struct { // Abck is the _abck cookie retrieved from your cookiejar. // Make sure you always retrieve it fresh from the cookiejar as it gets updated while making requests. Abck string `json:"abck"` // Bmsz is the bm_sz cookie retrieved from your cookiejar, make sure you always retrieve it fresh from the cookiejar. Bmsz string `json:"bmsz"` // Version is the akamai version, this will usually be "2" Version string `json:"version"` // PageUrl is the page url that loaded the akamai script, it is the same URL as the referer header on the sensor posts PageUrl string `json:"pageUrl"` // UserAgent must be a Chrome Windows User-Agent. UserAgent string `json:"userAgent"` // ScriptHash is a sha256 checksum over the akamai script contents ScriptHash string `json:"scriptHash"` // DynamicValues is required for sites that use the dynamic version of v3, this value can be retrieved by [Session.ParseV3Dynamic] DynamicValues string `json:"dynamicValues"` Language string `json:"language,omitempty"` IP string `json:"ip,omitempty"` }
func (SensorInput) MarshalEasyJSON ¶
func (v SensorInput) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SensorInput) MarshalJSON ¶
func (v SensorInput) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SensorInput) UnmarshalEasyJSON ¶
func (v *SensorInput) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SensorInput) UnmarshalJSON ¶
func (v *SensorInput) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Session ¶
func NewSession ¶
NewSession creates a new Session that can be used to make requests to the Hyper Solutions API.
func (*Session) GenerateDataDomeInterstitial ¶ added in v1.1.0
func (s *Session) GenerateDataDomeInterstitial(ctx context.Context, input *DataDomeInterstitialInput) (string, error)
GenerateDataDomeInterstitial returns the form data string that is used in the POST request to receive a solved datadome cookie.
func (*Session) GenerateDataDomeSlider ¶ added in v1.1.0
func (s *Session) GenerateDataDomeSlider(ctx context.Context, input *DataDomeSliderInput) (string, error)
GenerateDataDomeSlider returns the URL that will return a solved datadome cookie when blocked by captcha.
func (*Session) GenerateDataDomeTags ¶ added in v1.2.0
func (s *Session) GenerateDataDomeTags(ctx context.Context, input *DataDomeTagsInput) (string, error)
GenerateDataDomeTags returns the tags data string that is used in the POST request to receive a solved datadome cookie.
func (*Session) GenerateKasadaPayload ¶ added in v1.1.0
func (s *Session) GenerateKasadaPayload(ctx context.Context, input *KasadaPayloadInput) ([]byte, *KasadaHeaders, error)
GenerateKasadaPayload returns the payload to POST to /tl in bytes, and the generated headers
func (*Session) GenerateKasadaPow ¶ added in v1.1.0
GenerateKasadaPow returns the x-kpsdk-cd value
func (*Session) GeneratePixelData ¶
GeneratePixelData returns the pixel data using the Hyper Solutions API.
func (*Session) GenerateReese84Sensor ¶
func (s *Session) GenerateReese84Sensor(ctx context.Context, site string, input *ReeseInput) (string, error)
GenerateReese84Sensor returns the sensor data required to generate valid reese84 cookies using the Hyper Solutions API.
func (*Session) GenerateSbsdData ¶ added in v1.2.0
GenerateSbsdData returns the sbsd payload using the Hyper Solutions API.
func (*Session) GenerateSensorData ¶
GenerateSensorData returns the sensor data required to generate valid akamai cookies using the Hyper Solutions API.
func (*Session) GenerateUtmvcCookie ¶
GenerateUtmvcCookie returns the utmvc cookie using the Hyper Solutions API.
func (*Session) ParseV3Dynamic ¶ added in v1.2.0
ParseV3Dynamic returns the dynamic values for a v3 dynamic script
func (*Session) WithClient ¶
WithClient sets a new client that will be used to make requests to the Hyper Solutions API.
func (*Session) WithJwtKey ¶
WithJwtKey adds the JWT Key to the session. If not empty, a signature will be added to each request.
type UtmvcInput ¶
type UtmvcInput struct { UserAgent string `json:"userAgent"` // SessionIds The value of each cookie that has a name that starts with incap_ses_ SessionIds []string `json:"sessionIds"` // Script is the UTMVC script contents Script string `json:"script"` }
func (UtmvcInput) MarshalEasyJSON ¶
func (v UtmvcInput) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (UtmvcInput) MarshalJSON ¶
func (v UtmvcInput) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*UtmvcInput) UnmarshalEasyJSON ¶
func (v *UtmvcInput) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*UtmvcInput) UnmarshalJSON ¶
func (v *UtmvcInput) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface