scythe-ttp 0.17.3__tar.gz → 0.17.4__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.
Potentially problematic release.
This version of scythe-ttp might be problematic. Click here for more details.
- {scythe_ttp-0.17.3/scythe_ttp.egg-info → scythe_ttp-0.17.4}/PKG-INFO +1 -1
- scythe_ttp-0.17.4/VERSION +1 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/auth/cookie_jwt.py +12 -5
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4/scythe_ttp.egg-info}/PKG-INFO +1 -1
- scythe_ttp-0.17.3/VERSION +0 -1
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/LICENSE +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/MANIFEST.in +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/README.md +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/pyproject.toml +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/requirements.txt +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/__init__.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/auth/__init__.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/auth/base.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/auth/basic.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/auth/bearer.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/behaviors/__init__.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/behaviors/base.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/behaviors/default.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/behaviors/human.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/behaviors/machine.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/behaviors/stealth.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/cli/__init__.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/cli/main.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/core/__init__.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/core/executor.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/core/headers.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/core/ttp.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/journeys/__init__.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/journeys/actions.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/journeys/base.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/journeys/executor.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/orchestrators/__init__.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/orchestrators/base.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/orchestrators/batch.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/orchestrators/distributed.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/orchestrators/scale.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/payloads/__init__.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/payloads/generators.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/ttps/__init__.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/ttps/web/__init__.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/ttps/web/login_bruteforce.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/ttps/web/sql_injection.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe/ttps/web/uuid_guessing.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe_ttp.egg-info/SOURCES.txt +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe_ttp.egg-info/dependency_links.txt +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe_ttp.egg-info/entry_points.txt +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe_ttp.egg-info/requires.txt +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/scythe_ttp.egg-info/top_level.txt +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/setup.cfg +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/tests/test_api_models.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/tests/test_authentication.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/tests/test_behaviors.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/tests/test_cli.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/tests/test_cookie_jwt_auth.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/tests/test_executor_modes.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/tests/test_expected_results.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/tests/test_feature_completeness.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/tests/test_header_extraction.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/tests/test_journeys.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/tests/test_orchestrators.py +0 -0
- {scythe_ttp-0.17.3 → scythe_ttp-0.17.4}/tests/test_ttp_api_mode.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.17.4
|
|
@@ -53,6 +53,10 @@ class CookieJWTAuth(Authentication):
|
|
|
53
53
|
token via jwt_json_path, and return {cookie_name: token}.
|
|
54
54
|
- In UI mode: authenticate() will ensure the browser has the cookie set for
|
|
55
55
|
the target domain.
|
|
56
|
+
|
|
57
|
+
Parameters:
|
|
58
|
+
- content_type: Either "json" (default) to send payload as JSON, or "form"
|
|
59
|
+
to send as application/x-www-form-urlencoded form data.
|
|
56
60
|
"""
|
|
57
61
|
|
|
58
62
|
def __init__(self,
|
|
@@ -64,6 +68,7 @@ class CookieJWTAuth(Authentication):
|
|
|
64
68
|
extra_fields: Optional[Dict[str, Any]] = None,
|
|
65
69
|
jwt_json_path: str = "token",
|
|
66
70
|
cookie_name: str = "stellarbridge",
|
|
71
|
+
content_type: str = "json",
|
|
67
72
|
session: Optional[requests.Session] = None,
|
|
68
73
|
description: str = "Authenticate via API and set JWT cookie"):
|
|
69
74
|
super().__init__(
|
|
@@ -78,18 +83,20 @@ class CookieJWTAuth(Authentication):
|
|
|
78
83
|
self.extra_fields = extra_fields or {}
|
|
79
84
|
self.jwt_json_path = jwt_json_path
|
|
80
85
|
self.cookie_name = cookie_name
|
|
86
|
+
self.content_type = content_type
|
|
81
87
|
# Avoid importing requests in test environments; allow injected session
|
|
82
88
|
self._session = session or (requests.Session() if requests is not None else None)
|
|
83
89
|
self.token: Optional[str] = None
|
|
84
90
|
|
|
85
91
|
def _login_and_get_token(self) -> str:
|
|
86
92
|
payload: Dict[str, Any] = dict(self.extra_fields)
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
if self.password is not None:
|
|
90
|
-
payload[self.password_field] = self.password
|
|
93
|
+
payload[self.username_field] = self.username
|
|
94
|
+
payload[self.password_field] = self.password
|
|
91
95
|
try:
|
|
92
|
-
|
|
96
|
+
if self.content_type == "form":
|
|
97
|
+
resp = self._session.post(self.login_url, data=payload, timeout=15)
|
|
98
|
+
else:
|
|
99
|
+
resp = self._session.post(self.login_url, json=payload, timeout=15)
|
|
93
100
|
# try json; raise on non-2xx to surface errors
|
|
94
101
|
resp.raise_for_status()
|
|
95
102
|
data = resp.json()
|
scythe_ttp-0.17.3/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.17.3
|
|
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
|
|
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
|
|
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
|