hyper-sdk 0.3.1__tar.gz → 0.3.2__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-0.3.1 → hyper_sdk-0.3.2}/PKG-INFO +1 -1
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk/datadome_input.py +16 -5
- hyper_sdk-0.3.2/hyper_sdk/incapsula_input.py +14 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk/kasada_input.py +4 -5
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk/session.py +6 -4
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk.egg-info/PKG-INFO +1 -1
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/pyproject.toml +1 -1
- hyper_sdk-0.3.1/hyper_sdk/incapsula_input.py +0 -5
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/LICENSE +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/README.md +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk/__init__.py +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk/akamai/__init__.py +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk/akamai/pixel.py +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk/akamai/script_path.py +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk/akamai/sec_cpt.py +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk/akamai/stop_signal.py +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk/akamai_input.py +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk/datadome/__init__.py +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk/datadome/parse.py +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk/incapsula/__init__.py +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk/incapsula/utmvc.py +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk/kasada/__init__.py +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk/kasada/parse.py +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk.egg-info/SOURCES.txt +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk.egg-info/dependency_links.txt +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk.egg-info/requires.txt +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/hyper_sdk.egg-info/top_level.txt +0 -0
- {hyper_sdk-0.3.1 → hyper_sdk-0.3.2}/setup.cfg +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
|
|
1
2
|
class DataDomeSliderInput:
|
|
2
|
-
def __init__(self, user_agent: str, device_link: str, html: str, puzzle: str, piece: str):
|
|
3
|
+
def __init__(self, user_agent: str, device_link: str, html: str, puzzle: str, piece: str, language: str, ip: str):
|
|
3
4
|
# UserAgent must be a Chrome Windows User-Agent.
|
|
4
5
|
self.user_agent = user_agent
|
|
5
6
|
|
|
@@ -20,18 +21,23 @@ class DataDomeSliderInput:
|
|
|
20
21
|
# https://dd.prod.captcha-delivery.com/image/2024-xx-xx/hash.frag.png
|
|
21
22
|
self.piece = piece
|
|
22
23
|
|
|
24
|
+
self.language = language
|
|
25
|
+
self.ip = ip
|
|
26
|
+
|
|
23
27
|
def to_dict(self):
|
|
24
28
|
return {
|
|
25
29
|
"userAgent": self.user_agent,
|
|
26
30
|
"deviceLink": self.device_link,
|
|
27
31
|
"html": self.html,
|
|
28
32
|
"puzzle": self.puzzle,
|
|
29
|
-
"piece": self.piece
|
|
33
|
+
"piece": self.piece,
|
|
34
|
+
"language": self.language,
|
|
35
|
+
"ip": self.ip,
|
|
30
36
|
}
|
|
31
37
|
|
|
32
38
|
|
|
33
39
|
class DataDomeInterstitialInput:
|
|
34
|
-
def __init__(self, user_agent: str, device_link: str, html: str):
|
|
40
|
+
def __init__(self, user_agent: str, device_link: str, html: str, language: str, ip: str):
|
|
35
41
|
# UserAgent must be a Chrome Windows User-Agent.
|
|
36
42
|
self.user_agent = user_agent
|
|
37
43
|
|
|
@@ -42,16 +48,21 @@ class DataDomeInterstitialInput:
|
|
|
42
48
|
# Html is the response body of the GET request to the DeviceLink
|
|
43
49
|
self.html = html
|
|
44
50
|
|
|
51
|
+
self.language = language
|
|
52
|
+
self.ip = ip
|
|
53
|
+
|
|
45
54
|
def to_dict(self):
|
|
46
55
|
return {
|
|
47
56
|
"userAgent": self.user_agent,
|
|
48
57
|
"deviceLink": self.device_link,
|
|
49
|
-
"html": self.html
|
|
58
|
+
"html": self.html,
|
|
59
|
+
"language": self.language,
|
|
60
|
+
"ip": self.ip,
|
|
50
61
|
}
|
|
51
62
|
|
|
52
63
|
|
|
53
64
|
class DataDomeTagsInput:
|
|
54
|
-
def __init__(self, user_agent: str, cid: str, ddk: str, referer: str, tags_type: str, language
|
|
65
|
+
def __init__(self, user_agent: str, cid: str, ddk: str, referer: str, tags_type: str, language: str, ip: str):
|
|
55
66
|
# UserAgent must be a Chrome Windows User-Agent.
|
|
56
67
|
self.user_agent = user_agent
|
|
57
68
|
self.cid = cid
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from typing import List
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class UtmvcInput:
|
|
5
|
+
def __init__(self, user_agent: str, session_ids: List[str], script: str):
|
|
6
|
+
self.user_agent = user_agent
|
|
7
|
+
self.session_ids = session_ids
|
|
8
|
+
self.script = script
|
|
9
|
+
|
|
10
|
+
class ReeseInput:
|
|
11
|
+
def __init__(self, user_agent: str, language: str, ip: str):
|
|
12
|
+
self.user_agent = user_agent
|
|
13
|
+
self.language = language
|
|
14
|
+
self.ip = ip
|
|
@@ -13,7 +13,7 @@ class KasadaPowInput:
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class KasadaPayloadInput:
|
|
16
|
-
def __init__(self, user_agent: str, ips_link: str, script: str, language: str
|
|
16
|
+
def __init__(self, user_agent: str, ips_link: str, script: str, language: str):
|
|
17
17
|
# UserAgent must be a Chrome Windows User-Agent.
|
|
18
18
|
self.user_agent = user_agent
|
|
19
19
|
|
|
@@ -23,15 +23,14 @@ class KasadaPayloadInput:
|
|
|
23
23
|
# Script is the ips.js script retrieved using the IpsLink url
|
|
24
24
|
self.script = script
|
|
25
25
|
|
|
26
|
-
# Language is the first language of your accept-language header
|
|
26
|
+
# Language is the first language of your accept-language header
|
|
27
27
|
self.language = language
|
|
28
28
|
|
|
29
29
|
def to_dict(self):
|
|
30
30
|
result = {
|
|
31
31
|
"userAgent": self.user_agent,
|
|
32
32
|
"ipsLink": self.ips_link,
|
|
33
|
-
"script": self.script
|
|
33
|
+
"script": self.script,
|
|
34
|
+
"language": self.language,
|
|
34
35
|
}
|
|
35
|
-
if self.language != "en-US":
|
|
36
|
-
result["language"] = self.language
|
|
37
36
|
return result
|
|
@@ -8,7 +8,7 @@ from datetime import datetime, timedelta, timezone
|
|
|
8
8
|
from .akamai_input import SensorInput, PixelInput, DynamicInput, SbsdInput
|
|
9
9
|
from .kasada_input import KasadaPowInput, KasadaPayloadInput
|
|
10
10
|
from .datadome_input import DataDomeSliderInput, DataDomeInterstitialInput, DataDomeTagsInput
|
|
11
|
-
from .incapsula_input import UtmvcInput
|
|
11
|
+
from .incapsula_input import UtmvcInput, ReeseInput
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class Session:
|
|
@@ -93,7 +93,7 @@ class Session:
|
|
|
93
93
|
'scriptVar': input_data.script_var,
|
|
94
94
|
})
|
|
95
95
|
|
|
96
|
-
def generate_reese84_sensor(self, site: str,
|
|
96
|
+
def generate_reese84_sensor(self, site: str, input_data: ReeseInput) -> str:
|
|
97
97
|
"""
|
|
98
98
|
Returns the sensor data required to generate valid reese84 cookies using the Hyper Solutions API.
|
|
99
99
|
|
|
@@ -101,7 +101,7 @@ class Session:
|
|
|
101
101
|
|
|
102
102
|
Args:
|
|
103
103
|
site (str): The name of the site that will be used to generate the sensor data.
|
|
104
|
-
|
|
104
|
+
input_data (ReeseInput): The input data.
|
|
105
105
|
|
|
106
106
|
Returns:
|
|
107
107
|
str: Sensor data as a string.
|
|
@@ -111,7 +111,9 @@ class Session:
|
|
|
111
111
|
"""
|
|
112
112
|
return self._send_request("https://incapsula.justhyped.dev/reese84/" + quote(site),
|
|
113
113
|
{
|
|
114
|
-
'userAgent': user_agent,
|
|
114
|
+
'userAgent': input_data.user_agent,
|
|
115
|
+
'language': input_data.language,
|
|
116
|
+
'ip': input_data.ip,
|
|
115
117
|
})
|
|
116
118
|
|
|
117
119
|
def generate_utmvc_cookie(self, input_data: UtmvcInput) -> str:
|
|
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
|