hyper-sdk 2.9.0__tar.gz → 2.11.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.9.0 → hyper_sdk-2.11.0}/PKG-INFO +1 -1
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/akamai_input.py +8 -8
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/datadome_input.py +14 -13
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/incapsula_input.py +4 -4
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/kasada_input.py +7 -5
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/session.py +8 -9
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/session_async.py +8 -9
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk.egg-info/PKG-INFO +1 -1
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/pyproject.toml +1 -1
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/LICENSE +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/README.md +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/__init__.py +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/akamai/__init__.py +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/akamai/pixel.py +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/akamai/script_path.py +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/akamai/sec_cpt.py +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/akamai/stop_signal.py +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/datadome/__init__.py +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/datadome/parse.py +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/incapsula/__init__.py +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/incapsula/dynamic.py +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/incapsula/utmvc.py +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/kasada/__init__.py +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/kasada/parse.py +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/shared.py +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk/trustdecision_input.py +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk.egg-info/SOURCES.txt +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk.egg-info/dependency_links.txt +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk.egg-info/requires.txt +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/hyper_sdk.egg-info/top_level.txt +0 -0
- {hyper_sdk-2.9.0 → hyper_sdk-2.11.0}/setup.cfg +0 -0
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
class SensorInput:
|
|
2
|
-
def __init__(self, abck: str, bmsz: str, version: str, page_url: str, user_agent: str, ip: str,
|
|
3
|
-
context: str, script: str,
|
|
2
|
+
def __init__(self, abck: str, bmsz: str, version: str, page_url: str, user_agent: str, ip: str, accept_language: str,
|
|
3
|
+
context: str, script: str, script_url: str):
|
|
4
4
|
self.abck = abck
|
|
5
5
|
self.bmsz = bmsz
|
|
6
6
|
self.version = version
|
|
7
7
|
self.page_url = page_url
|
|
8
8
|
self.user_agent = user_agent
|
|
9
9
|
self.script = script
|
|
10
|
-
self.
|
|
10
|
+
self.script_url = script_url
|
|
11
11
|
self.context = context
|
|
12
12
|
self.ip = ip
|
|
13
|
-
self.
|
|
13
|
+
self.accept_language = accept_language
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class PixelInput:
|
|
17
|
-
def __init__(self, user_agent: str, html_var: str, script_var: str,
|
|
17
|
+
def __init__(self, user_agent: str, html_var: str, script_var: str, accept_language: str, ip: str):
|
|
18
18
|
self.user_agent = user_agent
|
|
19
19
|
self.html_var = html_var
|
|
20
20
|
self.script_var = script_var
|
|
21
|
-
self.
|
|
21
|
+
self.accept_language = accept_language
|
|
22
22
|
self.ip = ip
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
class SbsdInput:
|
|
26
26
|
def __init__(self, index: int, user_agent: str, uuid: str, page_url: str, o_cookie: str, script: str,
|
|
27
|
-
|
|
27
|
+
accept_language: str, ip: str):
|
|
28
28
|
self.index = index
|
|
29
29
|
self.user_agent = user_agent
|
|
30
30
|
self.uuid = uuid
|
|
31
31
|
self.page_url = page_url
|
|
32
32
|
self.o_cookie = o_cookie
|
|
33
33
|
self.script = script
|
|
34
|
-
self.
|
|
34
|
+
self.accept_language = accept_language
|
|
35
35
|
self.ip = ip
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
class DataDomeSliderInput:
|
|
3
|
-
def __init__(self, user_agent: str, device_link: str, html: str, puzzle: str, piece: str, parent_url: str,
|
|
3
|
+
def __init__(self, user_agent: str, device_link: str, html: str, puzzle: str, piece: str, parent_url: str, accept_language: str, ip: str):
|
|
4
4
|
# UserAgent must be a Chrome Windows User-Agent.
|
|
5
5
|
self.user_agent = user_agent
|
|
6
6
|
|
|
@@ -22,7 +22,7 @@ class DataDomeSliderInput:
|
|
|
22
22
|
self.piece = piece
|
|
23
23
|
|
|
24
24
|
self.parent_url = parent_url
|
|
25
|
-
self.
|
|
25
|
+
self.accept_language = accept_language
|
|
26
26
|
self.ip = ip
|
|
27
27
|
|
|
28
28
|
def to_dict(self):
|
|
@@ -33,13 +33,13 @@ class DataDomeSliderInput:
|
|
|
33
33
|
"puzzle": self.puzzle,
|
|
34
34
|
"piece": self.piece,
|
|
35
35
|
"parentUrl": self.parent_url,
|
|
36
|
-
"acceptLanguage": self.
|
|
36
|
+
"acceptLanguage": self.accept_language,
|
|
37
37
|
"ip": self.ip,
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
class DataDomeInterstitialInput:
|
|
42
|
-
def __init__(self, user_agent: str, device_link: str, html: str,
|
|
42
|
+
def __init__(self, user_agent: str, device_link: str, html: str, accept_language: str, ip: str):
|
|
43
43
|
# UserAgent must be a Chrome Windows User-Agent.
|
|
44
44
|
self.user_agent = user_agent
|
|
45
45
|
|
|
@@ -50,7 +50,7 @@ class DataDomeInterstitialInput:
|
|
|
50
50
|
# Html is the response body of the GET request to the DeviceLink
|
|
51
51
|
self.html = html
|
|
52
52
|
|
|
53
|
-
self.
|
|
53
|
+
self.accept_language = accept_language
|
|
54
54
|
self.ip = ip
|
|
55
55
|
|
|
56
56
|
def to_dict(self):
|
|
@@ -58,31 +58,32 @@ class DataDomeInterstitialInput:
|
|
|
58
58
|
"userAgent": self.user_agent,
|
|
59
59
|
"deviceLink": self.device_link,
|
|
60
60
|
"html": self.html,
|
|
61
|
-
"acceptLanguage": self.
|
|
61
|
+
"acceptLanguage": self.accept_language,
|
|
62
62
|
"ip": self.ip,
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
class DataDomeTagsInput:
|
|
67
|
-
def __init__(self, user_agent: str,
|
|
68
|
-
# UserAgent must be a Chrome Windows User-Agent.
|
|
67
|
+
def __init__(self, user_agent: str, ddk: str, referer: str, tags_type: str, version: str, accept_language: str, ip: str, cid: str = ""):
|
|
69
68
|
self.user_agent = user_agent
|
|
70
69
|
self.cid = cid
|
|
71
70
|
self.ddk = ddk
|
|
72
71
|
self.referer = referer
|
|
73
72
|
self.tags_type = tags_type
|
|
74
73
|
self.version = version
|
|
75
|
-
self.
|
|
74
|
+
self.accept_language = accept_language
|
|
76
75
|
self.ip = ip
|
|
77
76
|
|
|
78
77
|
def to_dict(self):
|
|
79
|
-
|
|
78
|
+
data = {
|
|
80
79
|
"userAgent": self.user_agent,
|
|
81
|
-
"cid": self.cid,
|
|
82
80
|
"ddk": self.ddk,
|
|
83
81
|
"referer": self.referer,
|
|
84
82
|
"type": self.tags_type,
|
|
85
|
-
"acceptLanguage": self.
|
|
83
|
+
"acceptLanguage": self.accept_language,
|
|
86
84
|
"ip": self.ip,
|
|
87
85
|
"version": self.version,
|
|
88
|
-
}
|
|
86
|
+
}
|
|
87
|
+
if self.cid: # Only include cid if it's not empty
|
|
88
|
+
data["cid"] = self.cid
|
|
89
|
+
return data
|
|
@@ -8,11 +8,11 @@ class UtmvcInput:
|
|
|
8
8
|
self.script = script
|
|
9
9
|
|
|
10
10
|
class ReeseInput:
|
|
11
|
-
def __init__(self, user_agent: str,
|
|
11
|
+
def __init__(self, user_agent: str, accept_language: str, ip: str, pageUrl: str, script: str, script_url: str, pow: str = ""):
|
|
12
12
|
self.user_agent = user_agent
|
|
13
|
-
self.
|
|
13
|
+
self.accept_language = accept_language
|
|
14
14
|
self.ip = ip
|
|
15
|
-
self.
|
|
15
|
+
self.script_url = script_url
|
|
16
16
|
self.pow = pow
|
|
17
17
|
self.script = script
|
|
18
|
-
self.pageUrl = pageUrl
|
|
18
|
+
self.pageUrl = pageUrl
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
class KasadaPowInput:
|
|
2
|
-
def __init__(self, st: int, ct: str,
|
|
2
|
+
def __init__(self, st: int, ct: str, domain: str, fc: 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
|
|
@@ -11,14 +11,16 @@ class KasadaPowInput:
|
|
|
11
11
|
self.domain = domain
|
|
12
12
|
|
|
13
13
|
def to_dict(self):
|
|
14
|
-
result = {"st": self.st, "ct": self.ct, "
|
|
14
|
+
result = {"st": self.st, "ct": self.ct, "domain": self.domain}
|
|
15
|
+
if self.fc: # Only include fc if it's not empty
|
|
16
|
+
result["fc"] = self.fc
|
|
15
17
|
if self.work_time is not None:
|
|
16
18
|
result["workTime"] = self.work_time
|
|
17
19
|
return result
|
|
18
20
|
|
|
19
21
|
|
|
20
22
|
class KasadaPayloadInput:
|
|
21
|
-
def __init__(self, user_agent: str, ips_link: str, script: str,
|
|
23
|
+
def __init__(self, user_agent: str, ips_link: str, script: str, accept_language: str, ip: str):
|
|
22
24
|
# UserAgent must be a Chrome Windows User-Agent.
|
|
23
25
|
self.user_agent = user_agent
|
|
24
26
|
|
|
@@ -29,7 +31,7 @@ class KasadaPayloadInput:
|
|
|
29
31
|
self.script = script
|
|
30
32
|
|
|
31
33
|
# Your accept-language header
|
|
32
|
-
self.
|
|
34
|
+
self.accept_language = accept_language
|
|
33
35
|
self.ip = ip
|
|
34
36
|
|
|
35
37
|
def to_dict(self):
|
|
@@ -37,7 +39,7 @@ class KasadaPayloadInput:
|
|
|
37
39
|
"userAgent": self.user_agent,
|
|
38
40
|
"ipsLink": self.ips_link,
|
|
39
41
|
"script": self.script,
|
|
40
|
-
"acceptLanguage": self.
|
|
42
|
+
"acceptLanguage": self.accept_language,
|
|
41
43
|
"ip": self.ip,
|
|
42
44
|
}
|
|
43
45
|
return result
|
|
@@ -64,10 +64,10 @@ class Session:
|
|
|
64
64
|
'version': input_data.version,
|
|
65
65
|
'pageUrl': input_data.page_url,
|
|
66
66
|
'script': input_data.script,
|
|
67
|
-
'scriptUrl': input_data.
|
|
67
|
+
'scriptUrl': input_data.script_url,
|
|
68
68
|
'context': input_data.context,
|
|
69
69
|
'ip': input_data.ip,
|
|
70
|
-
'acceptLanguage': input_data.
|
|
70
|
+
'acceptLanguage': input_data.accept_language,
|
|
71
71
|
}
|
|
72
72
|
payload = json.dumps(payload_data).encode('utf-8')
|
|
73
73
|
|
|
@@ -102,7 +102,7 @@ class Session:
|
|
|
102
102
|
'pageUrl': input_data.page_url,
|
|
103
103
|
'o': input_data.o_cookie,
|
|
104
104
|
'script': input_data.script,
|
|
105
|
-
'acceptLanguage': input_data.
|
|
105
|
+
'acceptLanguage': input_data.accept_language,
|
|
106
106
|
'ip': input_data.ip,
|
|
107
107
|
'index': input_data.index,
|
|
108
108
|
})
|
|
@@ -123,17 +123,16 @@ class Session:
|
|
|
123
123
|
'htmlVar': input_data.html_var,
|
|
124
124
|
'scriptVar': input_data.script_var,
|
|
125
125
|
'ip': input_data.ip,
|
|
126
|
-
'acceptLanguage': input_data.
|
|
126
|
+
'acceptLanguage': input_data.accept_language,
|
|
127
127
|
})
|
|
128
128
|
|
|
129
|
-
def generate_reese84_sensor(self,
|
|
129
|
+
def generate_reese84_sensor(self, input_data: ReeseInput) -> str:
|
|
130
130
|
"""
|
|
131
131
|
Returns the sensor data required to generate valid reese84 cookies using the Hyper Solutions API.
|
|
132
132
|
|
|
133
133
|
This function sends a request to the specified sensor endpoint with the necessary data to generate the reese84 sensor data.
|
|
134
134
|
|
|
135
135
|
Args:
|
|
136
|
-
site (str): The name of the site that will be used to generate the sensor data.
|
|
137
136
|
input_data (ReeseInput): The input data.
|
|
138
137
|
|
|
139
138
|
Returns:
|
|
@@ -142,11 +141,11 @@ class Session:
|
|
|
142
141
|
Raises:
|
|
143
142
|
ValueError: If the script attribute in input_data is empty.
|
|
144
143
|
"""
|
|
145
|
-
return self._send_request("https://incapsula.hypersolutions.co/reese84
|
|
144
|
+
return self._send_request("https://incapsula.hypersolutions.co/reese84", {
|
|
146
145
|
'userAgent': input_data.user_agent,
|
|
147
|
-
'acceptLanguage': input_data.
|
|
146
|
+
'acceptLanguage': input_data.accept_language,
|
|
148
147
|
'ip': input_data.ip,
|
|
149
|
-
'scriptUrl': input_data.
|
|
148
|
+
'scriptUrl': input_data.script_url,
|
|
150
149
|
'pageUrl': input_data.pageUrl,
|
|
151
150
|
'pow': input_data.pow,
|
|
152
151
|
'script': input_data.script,
|
|
@@ -68,10 +68,10 @@ class SessionAsync:
|
|
|
68
68
|
'version': input_data.version,
|
|
69
69
|
'pageUrl': input_data.page_url,
|
|
70
70
|
'script': input_data.script,
|
|
71
|
-
'scriptUrl': input_data.
|
|
71
|
+
'scriptUrl': input_data.script_url,
|
|
72
72
|
'context': input_data.context,
|
|
73
73
|
'ip': input_data.ip,
|
|
74
|
-
'acceptLanguage': input_data.
|
|
74
|
+
'acceptLanguage': input_data.accept_language,
|
|
75
75
|
}
|
|
76
76
|
payload = json.dumps(payload_data).encode('utf-8')
|
|
77
77
|
|
|
@@ -106,7 +106,7 @@ class SessionAsync:
|
|
|
106
106
|
'pageUrl': input_data.page_url,
|
|
107
107
|
'o': input_data.o_cookie,
|
|
108
108
|
'script': input_data.script,
|
|
109
|
-
'acceptLanguage': input_data.
|
|
109
|
+
'acceptLanguage': input_data.accept_language,
|
|
110
110
|
'ip': input_data.ip,
|
|
111
111
|
'index': input_data.index,
|
|
112
112
|
})
|
|
@@ -127,17 +127,16 @@ class SessionAsync:
|
|
|
127
127
|
'htmlVar': input_data.html_var,
|
|
128
128
|
'scriptVar': input_data.script_var,
|
|
129
129
|
'ip': input_data.ip,
|
|
130
|
-
'acceptLanguage': input_data.
|
|
130
|
+
'acceptLanguage': input_data.accept_language,
|
|
131
131
|
})
|
|
132
132
|
|
|
133
|
-
async def generate_reese84_sensor(self,
|
|
133
|
+
async def generate_reese84_sensor(self, input_data: ReeseInput) -> str:
|
|
134
134
|
"""
|
|
135
135
|
Returns the sensor data required to generate valid reese84 cookies using the Hyper Solutions API.
|
|
136
136
|
|
|
137
137
|
This function sends a request to the specified sensor endpoint with the necessary data to generate the reese84 sensor data.
|
|
138
138
|
|
|
139
139
|
Args:
|
|
140
|
-
site (str): The name of the site that will be used to generate the sensor data.
|
|
141
140
|
input_data (ReeseInput): The input data.
|
|
142
141
|
|
|
143
142
|
Returns:
|
|
@@ -146,11 +145,11 @@ class SessionAsync:
|
|
|
146
145
|
Raises:
|
|
147
146
|
ValueError: If the script attribute in input_data is empty.
|
|
148
147
|
"""
|
|
149
|
-
return await self._send_request("https://incapsula.hypersolutions.co/reese84
|
|
148
|
+
return await self._send_request("https://incapsula.hypersolutions.co/reese84", {
|
|
150
149
|
'userAgent': input_data.user_agent,
|
|
151
|
-
'acceptLanguage': input_data.
|
|
150
|
+
'acceptLanguage': input_data.accept_language,
|
|
152
151
|
'ip': input_data.ip,
|
|
153
|
-
'scriptUrl': input_data.
|
|
152
|
+
'scriptUrl': input_data.script_url,
|
|
154
153
|
'pageUrl': input_data.pageUrl,
|
|
155
154
|
'pow': input_data.pow,
|
|
156
155
|
'script': input_data.script,
|
|
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
|