hyper-sdk 2.7.0__tar.gz → 2.8.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/PKG-INFO +2 -1
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/akamai_input.py +5 -9
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/kasada_input.py +4 -2
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/session.py +2 -18
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/session_async.py +2 -18
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk.egg-info/PKG-INFO +2 -1
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk.egg-info/requires.txt +1 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/pyproject.toml +2 -1
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/LICENSE +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/README.md +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/__init__.py +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/akamai/__init__.py +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/akamai/pixel.py +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/akamai/script_path.py +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/akamai/sec_cpt.py +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/akamai/stop_signal.py +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/datadome/__init__.py +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/datadome/parse.py +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/datadome_input.py +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/incapsula/__init__.py +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/incapsula/dynamic.py +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/incapsula/utmvc.py +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/incapsula_input.py +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/kasada/__init__.py +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/kasada/parse.py +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/shared.py +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk/trustdecision_input.py +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk.egg-info/SOURCES.txt +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk.egg-info/dependency_links.txt +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/hyper_sdk.egg-info/top_level.txt +0 -0
- {hyper_sdk-2.7.0 → hyper_sdk-2.8.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hyper_sdk
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.8.0
|
|
4
4
|
Summary: Hyper Solutions Python SDK
|
|
5
5
|
License: MIT License
|
|
6
6
|
|
|
@@ -39,6 +39,7 @@ Requires-Dist: idna>=3.6
|
|
|
39
39
|
Requires-Dist: jsonpickle>=3.0.3
|
|
40
40
|
Requires-Dist: PyJWT>=2.8.0
|
|
41
41
|
Requires-Dist: urllib3>=2.2.1
|
|
42
|
+
Requires-Dist: zstandard>=0.24.0
|
|
42
43
|
Dynamic: license-file
|
|
43
44
|
|
|
44
45
|
# Hyper Solutions SDK - Python Library for Bot Protection Bypass (Akamai, Incapsula, Kasada, DataDome)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
class SensorInput:
|
|
2
|
-
def __init__(self, abck: str, bmsz: str, version: str, page_url: str, user_agent: str, ip: str, acceptLanguage: str,
|
|
2
|
+
def __init__(self, abck: str, bmsz: str, version: str, page_url: str, user_agent: str, ip: str, acceptLanguage: str,
|
|
3
|
+
context: str, script: str):
|
|
3
4
|
self.abck = abck
|
|
4
5
|
self.bmsz = bmsz
|
|
5
6
|
self.version = version
|
|
6
7
|
self.page_url = page_url
|
|
7
8
|
self.user_agent = user_agent
|
|
8
|
-
self.
|
|
9
|
-
self.dynamic_values = dynamic_values
|
|
9
|
+
self.script = script
|
|
10
10
|
self.context = context
|
|
11
11
|
self.ip = ip
|
|
12
12
|
self.acceptLanguage = acceptLanguage
|
|
@@ -21,13 +21,9 @@ class PixelInput:
|
|
|
21
21
|
self.ip = ip
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
class DynamicInput:
|
|
25
|
-
def __init__(self, script: str):
|
|
26
|
-
self.script = script
|
|
27
|
-
|
|
28
|
-
|
|
29
24
|
class SbsdInput:
|
|
30
|
-
def __init__(self, index: int, user_agent: str, uuid: str, page_url: str, o_cookie: str, script: str,
|
|
25
|
+
def __init__(self, index: int, user_agent: str, uuid: str, page_url: str, o_cookie: str, script: str,
|
|
26
|
+
acceptLanguage: str, ip: str):
|
|
31
27
|
self.index = index
|
|
32
28
|
self.user_agent = user_agent
|
|
33
29
|
self.uuid = uuid
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
class KasadaPowInput:
|
|
2
|
-
def __init__(self, st: int, ct: str, domain: str, work_time: int = None):
|
|
2
|
+
def __init__(self, st: int, ct: str, fc: str, domain: str, work_time: int = None):
|
|
3
3
|
# St is the x-kpsdk-st value returned by the /tl POST request
|
|
4
4
|
self.st = st
|
|
5
5
|
# Ct is the x-kpsdk-ct value returned by the /tl POST request
|
|
6
6
|
self.ct = ct
|
|
7
|
+
# fc is the x-kpsdk-fc value returned by the /mfc GET request, if used by the site
|
|
8
|
+
self.fc = fc
|
|
7
9
|
# WorkTime can be used to pre-generate POW strings
|
|
8
10
|
self.work_time = work_time
|
|
9
11
|
self.domain = domain
|
|
10
12
|
|
|
11
13
|
def to_dict(self):
|
|
12
|
-
result = {"st": self.st, "ct": self.ct, "domain": self.domain}
|
|
14
|
+
result = {"st": self.st, "ct": self.ct, "fc": self.fc, "domain": self.domain}
|
|
13
15
|
if self.work_time is not None:
|
|
14
16
|
result["workTime"] = self.work_time
|
|
15
17
|
return result
|
|
@@ -7,7 +7,7 @@ import json
|
|
|
7
7
|
import zstandard as zstd
|
|
8
8
|
|
|
9
9
|
from .shared import generate_signature, build_headers, validate_response
|
|
10
|
-
from .akamai_input import SensorInput, PixelInput,
|
|
10
|
+
from .akamai_input import SensorInput, PixelInput, SbsdInput
|
|
11
11
|
from .kasada_input import KasadaPowInput, KasadaPayloadInput
|
|
12
12
|
from .datadome_input import DataDomeSliderInput, DataDomeInterstitialInput, DataDomeTagsInput
|
|
13
13
|
from .incapsula_input import UtmvcInput, ReeseInput
|
|
@@ -63,8 +63,7 @@ class Session:
|
|
|
63
63
|
'bmsz': input_data.bmsz,
|
|
64
64
|
'version': input_data.version,
|
|
65
65
|
'pageUrl': input_data.page_url,
|
|
66
|
-
'
|
|
67
|
-
'dynamicValues': input_data.dynamic_values,
|
|
66
|
+
'script': input_data.script,
|
|
68
67
|
'context': input_data.context,
|
|
69
68
|
'ip': input_data.ip,
|
|
70
69
|
'acceptLanguage': input_data.acceptLanguage,
|
|
@@ -107,21 +106,6 @@ class Session:
|
|
|
107
106
|
'index': input_data.index,
|
|
108
107
|
})
|
|
109
108
|
|
|
110
|
-
def parse_v3_dynamic(self, input_data: DynamicInput) -> str:
|
|
111
|
-
"""
|
|
112
|
-
Returns the dynamic values required to generate sensor data for V3 dynamic with Hyper Solutions API.
|
|
113
|
-
|
|
114
|
-
Args:
|
|
115
|
-
input_data (DynamicInput): An instance of DynamicInput containing the necessary data for parsing the script.
|
|
116
|
-
|
|
117
|
-
Returns:
|
|
118
|
-
str: Dynamic values as a string.
|
|
119
|
-
"""
|
|
120
|
-
sensor_endpoint = "https://akm.hypersolutions.co/v3dynamic"
|
|
121
|
-
return self._send_request(sensor_endpoint, {
|
|
122
|
-
'script': input_data.script,
|
|
123
|
-
})
|
|
124
|
-
|
|
125
109
|
def generate_pixel_data(self, input_data: PixelInput) -> str:
|
|
126
110
|
"""
|
|
127
111
|
Returns the pixel data using the Hyper Solutions API.
|
|
@@ -7,7 +7,7 @@ import json
|
|
|
7
7
|
import zstandard as zstd
|
|
8
8
|
|
|
9
9
|
from .shared import generate_signature, build_headers, validate_response
|
|
10
|
-
from .akamai_input import SensorInput, PixelInput,
|
|
10
|
+
from .akamai_input import SensorInput, PixelInput, SbsdInput
|
|
11
11
|
from .kasada_input import KasadaPowInput, KasadaPayloadInput
|
|
12
12
|
from .datadome_input import DataDomeSliderInput, DataDomeInterstitialInput, DataDomeTagsInput
|
|
13
13
|
from .incapsula_input import UtmvcInput, ReeseInput
|
|
@@ -67,8 +67,7 @@ class SessionAsync:
|
|
|
67
67
|
'bmsz': input_data.bmsz,
|
|
68
68
|
'version': input_data.version,
|
|
69
69
|
'pageUrl': input_data.page_url,
|
|
70
|
-
'
|
|
71
|
-
'dynamicValues': input_data.dynamic_values,
|
|
70
|
+
'script': input_data.script,
|
|
72
71
|
'context': input_data.context,
|
|
73
72
|
'ip': input_data.ip,
|
|
74
73
|
'acceptLanguage': input_data.acceptLanguage,
|
|
@@ -111,21 +110,6 @@ class SessionAsync:
|
|
|
111
110
|
'index': input_data.index,
|
|
112
111
|
})
|
|
113
112
|
|
|
114
|
-
async def parse_v3_dynamic(self, input_data: DynamicInput) -> str:
|
|
115
|
-
"""
|
|
116
|
-
Returns the dynamic values required to generate sensor data for V3 dynamic with Hyper Solutions API.
|
|
117
|
-
|
|
118
|
-
Args:
|
|
119
|
-
input_data (DynamicInput): An instance of DynamicInput containing the necessary data for parsing the script.
|
|
120
|
-
|
|
121
|
-
Returns:
|
|
122
|
-
str: Dynamic values as a string.
|
|
123
|
-
"""
|
|
124
|
-
sensor_endpoint = "https://akm.hypersolutions.co/v3dynamic"
|
|
125
|
-
return await self._send_request(sensor_endpoint, {
|
|
126
|
-
'script': input_data.script,
|
|
127
|
-
})
|
|
128
|
-
|
|
129
113
|
async def generate_pixel_data(self, input_data: PixelInput) -> str:
|
|
130
114
|
"""
|
|
131
115
|
Returns the pixel data using the Hyper Solutions API.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hyper_sdk
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.8.0
|
|
4
4
|
Summary: Hyper Solutions Python SDK
|
|
5
5
|
License: MIT License
|
|
6
6
|
|
|
@@ -39,6 +39,7 @@ Requires-Dist: idna>=3.6
|
|
|
39
39
|
Requires-Dist: jsonpickle>=3.0.3
|
|
40
40
|
Requires-Dist: PyJWT>=2.8.0
|
|
41
41
|
Requires-Dist: urllib3>=2.2.1
|
|
42
|
+
Requires-Dist: zstandard>=0.24.0
|
|
42
43
|
Dynamic: license-file
|
|
43
44
|
|
|
44
45
|
# Hyper Solutions SDK - Python Library for Bot Protection Bypass (Akamai, Incapsula, Kasada, DataDome)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "hyper_sdk"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.8.0"
|
|
8
8
|
description = "Hyper Solutions Python SDK"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.7"
|
|
@@ -22,6 +22,7 @@ dependencies = [
|
|
|
22
22
|
"jsonpickle>=3.0.3",
|
|
23
23
|
"PyJWT>=2.8.0",
|
|
24
24
|
"urllib3>=2.2.1",
|
|
25
|
+
"zstandard>=0.24.0"
|
|
25
26
|
]
|
|
26
27
|
license = {file = "LICENSE"}
|
|
27
28
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|