scythe-ttp 0.17.5__tar.gz → 0.17.6__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.
- {scythe_ttp-0.17.5/scythe_ttp.egg-info → scythe_ttp-0.17.6}/PKG-INFO +1 -1
- scythe_ttp-0.17.6/VERSION +1 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/cli/main.py +28 -2
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/core/executor.py +9 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/journeys/executor.py +9 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/orchestrators/base.py +18 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6/scythe_ttp.egg-info}/PKG-INFO +1 -1
- scythe_ttp-0.17.5/VERSION +0 -1
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/LICENSE +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/MANIFEST.in +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/README.md +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/pyproject.toml +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/requirements.txt +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/__init__.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/auth/__init__.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/auth/base.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/auth/basic.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/auth/bearer.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/auth/cookie_jwt.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/behaviors/__init__.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/behaviors/base.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/behaviors/default.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/behaviors/human.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/behaviors/machine.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/behaviors/stealth.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/cli/__init__.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/core/__init__.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/core/headers.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/core/ttp.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/journeys/__init__.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/journeys/actions.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/journeys/base.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/orchestrators/__init__.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/orchestrators/batch.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/orchestrators/distributed.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/orchestrators/scale.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/payloads/__init__.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/payloads/generators.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/ttps/__init__.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/ttps/web/__init__.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/ttps/web/login_bruteforce.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/ttps/web/sql_injection.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe/ttps/web/uuid_guessing.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe_ttp.egg-info/SOURCES.txt +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe_ttp.egg-info/dependency_links.txt +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe_ttp.egg-info/entry_points.txt +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe_ttp.egg-info/requires.txt +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/scythe_ttp.egg-info/top_level.txt +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/setup.cfg +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/tests/test_api_models.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/tests/test_authentication.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/tests/test_behaviors.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/tests/test_cli.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/tests/test_cookie_jwt_auth.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/tests/test_executor_modes.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/tests/test_expected_results.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/tests/test_feature_completeness.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/tests/test_header_extraction.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/tests/test_journeys.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/tests/test_orchestrators.py +0 -0
- {scythe_ttp-0.17.5 → scythe_ttp-0.17.6}/tests/test_ttp_api_mode.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.17.6
|
|
@@ -71,16 +71,42 @@ def scythe_test_definition(args) -> bool:
|
|
|
71
71
|
|
|
72
72
|
# Example usage with TTPExecutor:
|
|
73
73
|
# from scythe.core.executor import TTPExecutor
|
|
74
|
-
#
|
|
74
|
+
# from scythe.ttps.web.login_bruteforce import LoginBruteforceTTP
|
|
75
|
+
#
|
|
76
|
+
# ttp = LoginBruteforceTTP(
|
|
77
|
+
# payloads=['admin', 'root', 'test'],
|
|
78
|
+
# expected_result=False # Expect security controls to block attempts
|
|
79
|
+
# )
|
|
80
|
+
# executor = TTPExecutor(ttp=ttp, target_url=args.url)
|
|
75
81
|
# executor.run()
|
|
76
82
|
# return executor.was_successful() # Returns True if all results matched expectations
|
|
77
83
|
|
|
78
84
|
# Example usage with JourneyExecutor:
|
|
79
85
|
# from scythe.journeys.executor import JourneyExecutor
|
|
80
|
-
#
|
|
86
|
+
# from scythe.journeys.base import Journey, Step
|
|
87
|
+
# from scythe.journeys.actions import NavigateAction, FillFormAction, ClickAction
|
|
88
|
+
#
|
|
89
|
+
# journey = Journey(
|
|
90
|
+
# name="Login Journey",
|
|
91
|
+
# description="Test user login flow",
|
|
92
|
+
# expected_result=True # Expect journey to succeed
|
|
93
|
+
# )
|
|
94
|
+
# journey.add_step(Step("Navigate").add_action(NavigateAction(url=args.url)))
|
|
95
|
+
# executor = JourneyExecutor(journey=journey, target_url=args.url)
|
|
81
96
|
# executor.run()
|
|
82
97
|
# return executor.was_successful() # Returns True if journey succeeded as expected
|
|
83
98
|
|
|
99
|
+
# Example usage with Orchestrators:
|
|
100
|
+
# from scythe.orchestrators.scale import ScaleOrchestrator
|
|
101
|
+
# from scythe.orchestrators.base import OrchestrationStrategy
|
|
102
|
+
#
|
|
103
|
+
# orchestrator = ScaleOrchestrator(
|
|
104
|
+
# strategy=OrchestrationStrategy.PARALLEL,
|
|
105
|
+
# max_workers=10
|
|
106
|
+
# )
|
|
107
|
+
# result = orchestrator.orchestrate_ttp(ttp=my_ttp, target_url=args.url, replications=100)
|
|
108
|
+
# return orchestrator.exit_code(result) == 0 # Returns True if all executions succeeded
|
|
109
|
+
|
|
84
110
|
return True
|
|
85
111
|
|
|
86
112
|
|
|
@@ -344,3 +344,12 @@ class TTPExecutor:
|
|
|
344
344
|
True if all test results matched expectations, False otherwise
|
|
345
345
|
"""
|
|
346
346
|
return not self.has_test_failures
|
|
347
|
+
|
|
348
|
+
def exit_code(self) -> int:
|
|
349
|
+
"""
|
|
350
|
+
Get the exit code for this test execution.
|
|
351
|
+
|
|
352
|
+
Returns:
|
|
353
|
+
0 if test was successful (results matched expectations), 1 otherwise
|
|
354
|
+
"""
|
|
355
|
+
return 0 if self.was_successful() else 1
|
|
@@ -463,6 +463,15 @@ class JourneyExecutor:
|
|
|
463
463
|
actual = self.execution_results.get('overall_success', False)
|
|
464
464
|
expected = self.execution_results.get('expected_result', True)
|
|
465
465
|
return actual == expected
|
|
466
|
+
|
|
467
|
+
def exit_code(self) -> int:
|
|
468
|
+
"""
|
|
469
|
+
Get the exit code for this journey execution.
|
|
470
|
+
|
|
471
|
+
Returns:
|
|
472
|
+
0 if journey was successful (results matched expectations), 1 otherwise
|
|
473
|
+
"""
|
|
474
|
+
return 0 if self.was_successful() else 1
|
|
466
475
|
|
|
467
476
|
|
|
468
477
|
class JourneyRunner:
|
|
@@ -281,6 +281,24 @@ class Orchestrator(ABC):
|
|
|
281
281
|
self.logger.warning(f" ... and {len(result.errors) - 3} more errors")
|
|
282
282
|
|
|
283
283
|
self.logger.info("="*60)
|
|
284
|
+
|
|
285
|
+
def exit_code(self, result: OrchestrationResult) -> int:
|
|
286
|
+
"""
|
|
287
|
+
Get the exit code for an orchestration result.
|
|
288
|
+
|
|
289
|
+
An orchestration is considered successful if all executions completed
|
|
290
|
+
successfully (matching their expected results).
|
|
291
|
+
|
|
292
|
+
Args:
|
|
293
|
+
result: OrchestrationResult to evaluate
|
|
294
|
+
|
|
295
|
+
Returns:
|
|
296
|
+
0 if all executions were successful, 1 otherwise
|
|
297
|
+
"""
|
|
298
|
+
# Check if any executions failed or if there were errors
|
|
299
|
+
if result.failed_executions > 0 or len(result.errors) > 0:
|
|
300
|
+
return 1
|
|
301
|
+
return 0
|
|
284
302
|
|
|
285
303
|
|
|
286
304
|
class ExecutionContext:
|
scythe_ttp-0.17.5/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.17.5
|
|
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
|