Metadata-Version: 2.4
Name: hyper_sdk
Version: 2.5.0
Summary: Hyper Solutions Python SDK
License: MIT License
        
        Copyright (c) 2024 Hyper Solutions
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: homepage, https://github.com/Hyper-Solutions/hyper-sdk-py
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: certifi>=2024.2.2
Requires-Dist: charset-normalizer>=3.3.2
Requires-Dist: idna>=3.6
Requires-Dist: jsonpickle>=3.0.3
Requires-Dist: PyJWT>=2.8.0
Requires-Dist: requests>=2.31.0
Requires-Dist: urllib3>=2.2.1
Dynamic: license-file

# Hyper Solutions SDK - Python Library for Bot Protection Bypass (Akamai, Incapsula, Kasada, DataDome)

![Python Version](https://img.shields.io/badge/Python-3.8+-blue)
![License](https://img.shields.io/badge/license-MIT-green)
![PyPI Version](https://img.shields.io/pypi/v/hyper-sdk)
![PyPI Downloads](https://img.shields.io/pypi/dm/hyper-sdk)

[![](https://dcbadge.limes.pink/api/server/akamai)](https://discord.gg/akamai)

A powerful **Python SDK** for bypassing modern bot protection systems including **Akamai Bot Manager**, **Incapsula**, **Kasada**, and **DataDome**. Generate valid cookies, solve anti-bot challenges, and automate protected endpoints with ease.

Perfect for **web scraping**, **automation**, and **data collection** from protected websites.

## 🚀 Quick Start

```python
from hyper_sdk import Session, SensorInput

session = Session("your-api-key")

# Generate Akamai sensor data
sensor_data, sensor_context = session.generate_sensor_data(SensorInput(
    # sensor input fields
))

print(f"Generated sensor data: {sensor_data}")
print(f"Sensor context: {sensor_context}")
```

## ✨ Features

- 🛡️ **Akamai Bot Manager**: Generate sensor data, handle pixel challenges, validate cookies
- 🔒 **Incapsula Protection**: Generate Reese84 sensors and UTMVC cookies
- ⚡ **Kasada Bypass**: Generate payload data (CT) and POW tokens (CD)
- 🎯 **DataDome Solutions**: Solve tags, slider captchas and interstitial challenges
- 🔧 **Easy Integration**: Simple Python API with async/await support
- ⚙️ **Flexible Configuration**: Custom HTTP clients and session management

## 📦 Installation

Install the Hyper Solutions SDK for Python using:

```bash
pip install hyper-sdk
```

## 📋 Table of Contents

- [Quick Start](#-quick-start)
- [Installation](#-installation)
- [Basic Usage](#-basic-usage)
- [Akamai Bot Manager](#-akamai-bot-manager)
- [Incapsula Protection](#-incapsula-protection)
- [Kasada Bypass](#-kasada-bypass)
- [DataDome Solutions](#-datadome-solutions)
- [Documentation](#-documentation)
- [Contributing](#-contributing)
- [License](#-license)

## 🔧 Basic Usage

### Creating a Session

Initialize the SDK with your API key to start bypassing bot protection:

```python
from hyper_sdk import Session

# Basic session
session = Session("your-api-key")

# Advanced session with custom configuration
session = Session(
    api_key="your-api-key",
    jwt_key="your-jwt-key",
    app_key="your-app-key",
    app_secret="your-app-secret",
    client=custom_http_client
)
```

## 🛡️ Akamai Bot Manager

Bypass **Akamai Bot Manager** protection with sensor data generation, cookie validation, and challenge solving.

### Generating Sensor Data

Generate sensor data for valid **Akamai cookies** and bot detection bypass:

```python
sensor_data, context = await session.generate_sensor_data({
    # Configure sensor parameters
})
```

### Handling Sec-Cpt Challenges

Solve **sec-cpt challenges** with built-in parsing and payload generation:

```python
from hyper_sdk.akamai import SecCptChallenge

# Parse sec-cpt challenge from HTML
challenge = SecCptChallenge.parse(html_content)

# Or parse from JSON response
challenge = SecCptChallenge.parse_from_json(json_response)

# Generate challenge response payload
payload = challenge.generate_sec_cpt_payload(sec_cpt_cookie)

# Handle challenge timing requirements
challenge.sleep()
```

### Cookie Validation

Validate **Akamai _abck cookies** and session states:

```python
from hyper_sdk.akamai import is_cookie_valid, is_cookie_invalidated

# Check if cookie is valid for the current request count
is_valid = is_cookie_valid(cookie_value, request_count)

# Check if cookie has been invalidated and needs refresh
needs_refresh = is_cookie_invalidated(cookie_value)
```

### Pixel Challenge Solving

Handle **Akamai pixel challenges** for advanced bot detection bypass:

```python
from hyper_sdk import PixelInput
from hyper_sdk.akamai import parse_pixel_html_var, parse_pixel_script_url, parse_pixel_script_var

# Parse pixel challenge data
html_var = parse_pixel_html_var(html_content)
script_url, post_url = parse_pixel_script_url(html_content)
script_var = parse_pixel_script_var(script_content)

# Generate pixel data
pixel_data = session.generate_pixel_data(PixelInput(
    # pixel input fields
))
```

## 🔒 Incapsula Protection

Bypass **Incapsula bot detection** with Reese84 sensors and UTMVC cookie generation.

### Generating Reese84 Sensors

Create **Reese84 sensor data** for Incapsula bypass:

```python
from hyper_sdk import ReeseInput

sensor_data = session.generate_reese84_sensor("example.com", ReeseInput(
    # reese input fields
))
```

### UTMVC Cookie Generation

Generate **UTMVC cookies** for Incapsula protection bypass:

```python
from hyper_sdk import UtmvcInput

utmvc_cookie, swhanedl = session.generate_utmvc_cookie(UtmvcInput(
    # utmvc input fields
))
```

### Script Path Parsing

Parse **UTMVC script paths** and generate submit paths:

```python
from hyper_sdk.incapsula import parse_utmvc_script_path, get_utmvc_submit_path

# Parse script path from content
script_path = parse_utmvc_script_path(script_content)

# Generate unique submit path
submit_path = get_utmvc_submit_path()
```

### Dynamic Reese Script Parsing

Parse dynamic Reese84 script paths from interruption pages:

```python
from hyper_sdk.incapsula import parse_dynamic_reese_script

sensor_path, script_path = parse_dynamic_reese_script(html_content, "https://example.com")
```

## ⚡ Kasada Bypass

Defeat **Kasada Bot Manager** with payload generation and POW solving.

### Generating Payload Data (CT)

Create **x-kpsdk-ct tokens** for Kasada bypass:

```python
from hyper_sdk import KasadaPayloadInput

payload, headers = session.generate_kasada_payload(KasadaPayloadInput(
    # kasada payload input fields
))
```

### Generating POW Data (CD)

Solve **Kasada Proof-of-Work** challenges for x-kpsdk-cd tokens:

```python
from hyper_sdk import KasadaPowInput

pow_payload = session.generate_kasada_pow(KasadaPowInput(
    # kasada pow input fields
))
```

### Script Path Extraction

Extract **Kasada script paths** from blocked pages (HTTP 429):

```python
from hyper_sdk.kasada import parse_script_path

script_path = parse_script_path(blocked_page_html)
# Returns: /ips.js?timestamp=...
```

## 🎯 DataDome Solutions

Solve **DataDome captchas** including slider challenges and interstitial pages.

### Interstitial Challenge Solving

Bypass **DataDome interstitial pages**:

```python
from hyper_sdk import DataDomeInterstitialInput

result = session.generate_interstitial_payload(DataDomeInterstitialInput(
    # interstitial input fields
))

payload = result["payload"]
headers = result["headers"]
# POST payload to https://geo.captcha-delivery.com/interstitial/
```

### Slider Captcha Solving

Solve **DataDome slider captchas** automatically:

```python
from hyper_sdk import DataDomeSliderInput

result = session.generate_slider_payload(DataDomeSliderInput(
    # slider input fields
))

check_url = result["payload"]
headers = result["headers"]
# GET request to check_url
```

### Tags Payload Generation

Generate **DataDome tags payload**:

```python
from hyper_sdk import DataDomeTagsInput

tags_payload = session.generate_tags_payload(DataDomeTagsInput(
    # tags input fields
))
```

### DeviceLink URL Parsing

Extract **DataDome device check URLs** from blocked pages:

```python
from hyper_sdk.datadome import parse_interstitial_device_check_link, parse_slider_device_check_link

# Parse interstitial device links
device_link = parse_interstitial_device_check_link(
    html_content, 
    datadome_cookie, 
    referer_url
)

# Parse slider device links  
device_link = parse_slider_device_check_link(
    html_content, 
    datadome_cookie, 
    referer_url
)
```

## 📖 Documentation

For detailed documentation on how to use the SDK, including examples and API reference, please visit our documentation website:

[https://docs.justhyped.dev/](https://docs.justhyped.dev/)

### Getting Help

- Check our [documentation](https://docs.justhyped.dev)
- Join our [Discord community](https://discord.gg/akamai)

## 🤝 Contributing

If you find any issues or have suggestions for improvement, please open an issue or submit a pull request.

## 📄 License

This SDK is licensed under the [MIT License](LICENSE).

---

**Keywords**: Python SDK, bot protection bypass, web scraping, Akamai bypass, Incapsula bypass, Kasada bypass, DataDome bypass, anti-bot, captcha solver, automation, reverse engineering, bot detection, web automation
