### Install Hyper Solutions SDK for Go Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Installs the Hyper Solutions SDK for Go using the go get command. This command fetches and installs the specified package and its dependencies. ```bash go get github.com/Hyper-Solutions/hyper-sdk-go/v2 ``` -------------------------------- ### Quick Start: Initialize Session and Generate Akamai Sensor Data Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Initializes a new SDK session with your API key and generates Akamai sensor data. Ensure you replace 'your-api-key' with your actual key. The SensorInput struct should be configured with relevant parameters. ```go package main import ( "context" "fmt" "github.com/Hyper-Solutions/hyper-sdk-go/v2" ) func main() { session := hyper.NewSession("your-api-key") // Generate Akamai sensor data sensorData, sensorContext, err := session.GenerateSensorData(context.Background(), &hyper.SensorInput{ // Configure your sensor input }) if err != nil { panic(err) } fmt.Printf("Generated sensor data: %s", sensorData) fmt.Printf("Sensor context: %s", sensorContext) } ``` -------------------------------- ### Parse UTMVC Script Path Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Parse UTMVC script paths for Incapsula integration. Also provides a utility to get the submit path. ```go scriptPath, err := incapsula.ParseUtmvcScriptPath(scriptReader) if err != nil { // Handle error } // Generate submit path submitPath := incapsula.GetUtmvcSubmitPath() ``` -------------------------------- ### GetUtmvcSubmitPath Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Gets the UTMVC submit path. ```APIDOC ## GetUtmvcSubmitPath ### Description Generate submit path for UTMVC. ### Method ```go submitPath := incapsula.GetUtmvcSubmitPath() ``` ### Response - `submitPath` (string) - The UTMVC submit path. ``` -------------------------------- ### Generate DataDome Slider Captcha Solver Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Automatically solve DataDome slider captchas. The function returns a check URL and headers for a GET request. ```go checkUrl, headers, err := session.GenerateDataDomeSlider(ctx, &hyper.DataDomeSliderInput{ // Slider challenge parameters }) if err != nil { // Handle error } // GET request to checkUrl ``` -------------------------------- ### Create SDK Session with API Key Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Initializes a new SDK session using your API key. An advanced session can be created with a custom HTTP client and JWT key for more specific configurations. ```go // Basic session session := hyper.NewSession("your-api-key") // Advanced session with custom configuration session := hyper.NewSession("your-api-key"). WithJwtKey("your-jwt-key"). WithClient(customHTTPClient) ``` -------------------------------- ### Generate Kasada Proof-of-Work Data (CD) Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Solve Kasada Proof-of-Work challenges to generate x-kpsdk-cd tokens. Requires context and Kasada POW input parameters. ```go powPayload, err := session.GenerateKasadaPow(ctx, &hyper.KasadaPowInput{ // POW challenge parameters }) if err != nil { // Handle error } ``` -------------------------------- ### GenerateKasadaPow Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Solves Kasada Proof-of-Work challenges for x-kpsdk-cd tokens. ```APIDOC ## GenerateKasadaPow ### Description Solve **Kasada Proof-of-Work** challenges for x-kpsdk-cd tokens. ### Method ```go powPayload, err := session.GenerateKasadaPow(ctx, &hyper.KasadaPowInput{...}) ``` ### Parameters - `ctx` (context.Context) - The context for the request. - `input` (*hyper.KasadaPowInput) - Input parameters for Kasada POW solving. ### Response - `powPayload` ([]byte) - The solved POW payload. - `err` (error) - An error if solving fails. ``` -------------------------------- ### Generate Kasada Payload Data (CT) Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Create x-kpsdk-ct tokens for Kasada bypass. Requires context and Kasada payload input configuration. ```go payload, headers, err := session.GenerateKasadaPayload(ctx, &hyper.KasadaPayloadInput{ // Kasada payload configuration }) if err != nil { // Handle error } ``` -------------------------------- ### Solve Akamai Sec-Cpt Challenges Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Provides functions to parse and generate responses for Akamai's sec-cpt challenges. This includes parsing from HTML or JSON and generating the correct payload. Note the 'Sleep' functions for handling timing requirements. ```go // Parse sec-cpt challenges from HTML // Parse from JSON responses // Generate challenge response payloads // Handle challenge timing requirements // Context-aware challenge delays ``` -------------------------------- ### GenerateKasadaPayload Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Creates x-kpsdk-ct tokens for Kasada bypass. ```APIDOC ## GenerateKasadaPayload ### Description Create **x-kpsdk-ct tokens** for Kasada bypass. ### Method ```go payload, headers, err := session.GenerateKasadaPayload(ctx, &hyper.KasadaPayloadInput{...}) ``` ### Parameters - `ctx` (context.Context) - The context for the request. - `input` (*hyper.KasadaPayloadInput) - Input parameters for Kasada payload generation. ### Response - `payload` ([]byte) - The generated payload. - `headers` (map[string]string) - The associated headers. - `err` (error) - An error if the generation fails. ``` -------------------------------- ### Generate Akamai Pixel Challenge Data Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Handles Akamai pixel challenges by generating the necessary data. The 'PixelInput' struct should be configured with the relevant challenge parameters. Error handling is essential. ```go pixelData, err := session.GeneratePixelData(ctx, &hyper.PixelInput{ // Pixel challenge parameters }) if err != nil { // Handle error } ``` -------------------------------- ### ParseUtmvcScriptPath Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Parses UTMVC script paths for Incapsula integration. ```APIDOC ## ParseUtmvcScriptPath ### Description Parse **UTMVC script paths** for Incapsula integration. ### Method ```go scriptPath, err := incapsula.ParseUtmvcScriptPath(scriptReader) ``` ### Parameters - `scriptReader` (io.Reader) - A reader for the script content. ### Response - `scriptPath` (string) - The parsed script path. - `err` (error) - An error if parsing fails. ``` -------------------------------- ### Generate UTMVC Cookie Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Generate UTMVC cookies for Incapsula protection bypass. Requires script content, session IDs, and user agent. ```go utmvcCookie, err := session.GenerateUtmvcCookie(ctx, &hyper.UtmvcInput{ Script: "incapsula-script-content", SessionIds: []string{"session-id-1", "session-id-2"}, UserAgent: "Mozilla/5.0 (compatible bot)" }) if err != nil { // Handle error } ``` -------------------------------- ### Generate Reese84 Sensor Data Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Create Reese84 sensor data for Incapsula bypass. Ensure the session and user agent are properly initialized. ```go sensorData, err := session.GenerateReese84Sensor(ctx, site, userAgent) if err != nil { // Handle error } ``` -------------------------------- ### ParseInterstitialDeviceCheckLink Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Extracts DataDome device check URLs from interstitial pages. ```APIDOC ## ParseInterstitialDeviceCheckLink ### Description Extract **DataDome device check URLs** from interstitial pages. ### Method ```go deviceLink, err := datadome.ParseInterstitialDeviceCheckLink(reader, datadomeCookie, referer) ``` ### Parameters - `reader` (io.Reader) - A reader for the page content. - `datadomeCookie` (string) - The DataDome cookie. - `referer` (string) - The referer URL. ### Response - `deviceLink` (string) - The extracted device check URL. - `err` (error) - An error if parsing fails. ``` -------------------------------- ### Parse Akamai Pixel Challenge Data Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Provides functions to parse various components of Akamai pixel challenges from HTML. This includes extracting variables, script URLs, and dynamic script values. ```go // Extract pixel variables from HTML // Get pixel script and POST URLs // Parse dynamic pixel values ``` -------------------------------- ### Generate Akamai Sensor Data Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Generates sensor data required for Akamai cookies and bot detection bypass. The SensorInput struct should be configured with relevant parameters. Error handling is crucial. ```go sensorData, sensorContext, err := session.GenerateSensorData(ctx, &hyper.SensorInput{ // Configure sensor parameters }) if err != nil { // Handle error } ``` -------------------------------- ### GenerateUtmvcCookie Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Generates UTMVC cookies for Incapsula protection bypass. ```APIDOC ## GenerateUtmvcCookie ### Description Generate **UTMVC cookies** for Incapsula protection bypass. ### Method ```go utmvcCookie, err := session.GenerateUtmvcCookie(ctx, &hyper.UtmvcInput{...}) ``` ### Parameters - `ctx` (context.Context) - The context for the request. - `input` (*hyper.UtmvcInput) - Input parameters for UTMVC cookie generation. - `Script` (string) - The Incapsula script content. - `SessionIds` ([]string) - A list of session IDs. - `UserAgent` (string) - The user agent string. ### Response - `utmvcCookie` (string) - The generated UTMVC cookie. - `err` (error) - An error if the generation fails. ``` -------------------------------- ### Parse DataDome DeviceCheck Links Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Extract DataDome device check URLs from readers. Supports both interstitial and slider device links, requiring reader, DataDome cookie, and referer. ```go // Interstitial device links deviceLink, err := datadome.ParseInterstitialDeviceCheckLink(reader, datadomeCookie, referer) if err != nil { // Handle error } // Slider device links deviceLink, err := datadome.ParseSliderDeviceCheckLink(reader, datadomeCookie, referer) if err != nil { // Handle error } ``` -------------------------------- ### ParseKasadaScriptPath Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Extracts Kasada script paths from blocked pages (HTTP 429). ```APIDOC ## ParseKasadaScriptPath ### Description Extract **Kasada script paths** from blocked pages (HTTP 429). ### Method ```go scriptPath, err := kasada.ParseScriptPath(reader) ``` ### Parameters - `reader` (io.Reader) - A reader for the blocked page content. ### Response - `scriptPath` (string) - The extracted script path (e.g., `/ips.js?timestamp=...`). - `err` (error) - An error if parsing fails. ``` -------------------------------- ### GenerateDataDomeInterstitial Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Bypasses DataDome interstitial pages. ```APIDOC ## GenerateDataDomeInterstitial ### Description Bypass **DataDome interstitial pages**. ### Method ```go payload, headers, err := session.GenerateDataDomeInterstitial(ctx, &hyper.DataDomeInterstitialInput{...}) ``` ### Parameters - `ctx` (context.Context) - The context for the request. - `input` (*hyper.DataDomeInterstitialInput) - Input parameters for bypassing interstitial pages. ### Response - `payload` ([]byte) - The payload to be POSTed. - `headers` (map[string]string) - The associated headers. - `err` (error) - An error if the bypass fails. ### Endpoint POST `https://geo.captcha-delivery.com/interstitial/` ``` -------------------------------- ### GenerateDataDomeSlider Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Solves DataDome slider captchas automatically. ```APIDOC ## GenerateDataDomeSlider ### Description Solve **DataDome slider captchas** automatically. ### Method ```go checkUrl, headers, err := session.GenerateDataDomeSlider(ctx, &hyper.DataDomeSliderInput{...}) ``` ### Parameters - `ctx` (context.Context) - The context for the request. - `input` (*hyper.DataDomeSliderInput) - Input parameters for solving slider captchas. ### Response - `checkUrl` (string) - The URL to perform a GET request on. - `headers` (map[string]string) - The associated headers. - `err` (error) - An error if solving fails. ``` -------------------------------- ### ParseSliderDeviceCheckLink Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Extracts DataDome device check URLs from slider captcha pages. ```APIDOC ## ParseSliderDeviceCheckLink ### Description Extract **DataDome device check URLs** from slider captcha pages. ### Method ```go deviceLink, err := datadome.ParseSliderDeviceCheckLink(reader, datadomeCookie, referer) ``` ### Parameters - `reader` (io.Reader) - A reader for the page content. - `datadomeCookie` (string) - The DataDome cookie. - `referer` (string) - The referer URL. ### Response - `deviceLink` (string) - The extracted device check URL. - `err` (error) - An error if parsing fails. ``` -------------------------------- ### Parse Akamai Bot Manager Script Path Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Extracts Akamai Bot Manager script paths from HTML content. This is useful for reverse engineering bot detection mechanisms. Ensure the 'reader' is correctly initialized with the HTML content. ```go scriptPath, err := akamai.ParseScriptPath(reader) if err != nil { // Handle error } ``` -------------------------------- ### Extract Kasada Script Path Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Extract Kasada script paths from blocked pages (HTTP 429). The function returns the script path, typically including a timestamp. ```go scriptPath, err := kasada.ParseScriptPath(reader) if err != nil { // Handle error } // Returns: /ips.js?timestamp=... ``` -------------------------------- ### GenerateReese84Sensor Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Generates Reese84 sensor data for Incapsula bypass. ```APIDOC ## GenerateReese84Sensor ### Description Create **Reese84 sensor data** for Incapsula bypass. ### Method ```go sensorData, err := session.GenerateReese84Sensor(ctx, site, userAgent) ``` ### Parameters - `ctx` (context.Context) - The context for the request. - `site` (string) - The site for which to generate sensor data. - `userAgent` (string) - The user agent string. ### Response - `sensorData` ([]byte) - The generated sensor data. - `err` (error) - An error if the generation fails. ``` -------------------------------- ### Validate Akamai _abck Cookies Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Checks the validity of Akamai _abck cookies and their session states. Use 'IsCookieValid' to check request counts and 'IsCookieInvalidated' to determine if more sensors are needed. ```go // Check cookie validity for request counts // Determine if more sensors are needed ``` -------------------------------- ### Generate DataDome Interstitial Bypass Payload Source: https://github.com/hyper-solutions/hyper-sdk-go/blob/master/README.md Bypass DataDome interstitial pages by generating the necessary payload and headers. The payload should be POSTed to the specified URL. ```go payload, headers, err := session.GenerateDataDomeInterstitial(ctx, &hyper.DataDomeInterstitialInput{ // Interstitial parameters }) if err != nil { // Handle error } // POST payload to https://geo.captcha-delivery.com/interstitial/ ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.