scythe-ttp 0.17.6__tar.gz → 0.17.8__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.6/scythe_ttp.egg-info → scythe_ttp-0.17.8}/PKG-INFO +1 -1
- scythe_ttp-0.17.8/VERSION +1 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/cli/main.py +28 -16
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8/scythe_ttp.egg-info}/PKG-INFO +1 -1
- scythe_ttp-0.17.6/VERSION +0 -1
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/LICENSE +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/MANIFEST.in +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/README.md +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/pyproject.toml +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/requirements.txt +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/__init__.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/auth/__init__.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/auth/base.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/auth/basic.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/auth/bearer.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/auth/cookie_jwt.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/behaviors/__init__.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/behaviors/base.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/behaviors/default.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/behaviors/human.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/behaviors/machine.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/behaviors/stealth.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/cli/__init__.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/core/__init__.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/core/executor.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/core/headers.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/core/ttp.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/journeys/__init__.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/journeys/actions.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/journeys/base.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/journeys/executor.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/orchestrators/__init__.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/orchestrators/base.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/orchestrators/batch.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/orchestrators/distributed.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/orchestrators/scale.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/payloads/__init__.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/payloads/generators.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/ttps/__init__.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/ttps/web/__init__.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/ttps/web/login_bruteforce.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/ttps/web/sql_injection.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe/ttps/web/uuid_guessing.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe_ttp.egg-info/SOURCES.txt +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe_ttp.egg-info/dependency_links.txt +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe_ttp.egg-info/entry_points.txt +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe_ttp.egg-info/requires.txt +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/scythe_ttp.egg-info/top_level.txt +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/setup.cfg +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/tests/test_api_models.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/tests/test_authentication.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/tests/test_behaviors.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/tests/test_cli.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/tests/test_cookie_jwt_auth.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/tests/test_executor_modes.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/tests/test_expected_results.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/tests/test_feature_completeness.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/tests/test_header_extraction.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/tests/test_journeys.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/tests/test_orchestrators.py +0 -0
- {scythe_ttp-0.17.6 → scythe_ttp-0.17.8}/tests/test_ttp_api_mode.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.17.8
|
|
@@ -65,14 +65,14 @@ def check_version_in_response_header(args) -> bool:
|
|
|
65
65
|
return False
|
|
66
66
|
return True
|
|
67
67
|
|
|
68
|
-
def scythe_test_definition(args) ->
|
|
68
|
+
def scythe_test_definition(args) -> int:
|
|
69
69
|
# TODO: implement your test using Scythe primitives.
|
|
70
70
|
# Example placeholder that simply passes.
|
|
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
|
-
#
|
|
75
|
+
#
|
|
76
76
|
# ttp = LoginBruteforceTTP(
|
|
77
77
|
# payloads=['admin', 'root', 'test'],
|
|
78
78
|
# expected_result=False # Expect security controls to block attempts
|
|
@@ -80,12 +80,12 @@ def scythe_test_definition(args) -> bool:
|
|
|
80
80
|
# executor = TTPExecutor(ttp=ttp, target_url=args.url)
|
|
81
81
|
# executor.run()
|
|
82
82
|
# return executor.was_successful() # Returns True if all results matched expectations
|
|
83
|
-
|
|
83
|
+
|
|
84
84
|
# Example usage with JourneyExecutor:
|
|
85
85
|
# from scythe.journeys.executor import JourneyExecutor
|
|
86
86
|
# from scythe.journeys.base import Journey, Step
|
|
87
87
|
# from scythe.journeys.actions import NavigateAction, FillFormAction, ClickAction
|
|
88
|
-
#
|
|
88
|
+
#
|
|
89
89
|
# journey = Journey(
|
|
90
90
|
# name="Login Journey",
|
|
91
91
|
# description="Test user login flow",
|
|
@@ -95,19 +95,19 @@ def scythe_test_definition(args) -> bool:
|
|
|
95
95
|
# executor = JourneyExecutor(journey=journey, target_url=args.url)
|
|
96
96
|
# executor.run()
|
|
97
97
|
# return executor.was_successful() # Returns True if journey succeeded as expected
|
|
98
|
-
|
|
98
|
+
|
|
99
99
|
# Example usage with Orchestrators:
|
|
100
100
|
# from scythe.orchestrators.scale import ScaleOrchestrator
|
|
101
101
|
# from scythe.orchestrators.base import OrchestrationStrategy
|
|
102
|
-
#
|
|
102
|
+
#
|
|
103
103
|
# orchestrator = ScaleOrchestrator(
|
|
104
104
|
# strategy=OrchestrationStrategy.PARALLEL,
|
|
105
105
|
# max_workers=10
|
|
106
106
|
# )
|
|
107
107
|
# result = orchestrator.orchestrate_ttp(ttp=my_ttp, target_url=args.url, replications=100)
|
|
108
108
|
# return orchestrator.exit_code(result) == 0 # Returns True if all executions succeeded
|
|
109
|
-
|
|
110
|
-
return
|
|
109
|
+
|
|
110
|
+
return executor.exit_code() # assumes executor var
|
|
111
111
|
|
|
112
112
|
|
|
113
113
|
def main():
|
|
@@ -259,14 +259,14 @@ def main():
|
|
|
259
259
|
if check_url_available(args.url):
|
|
260
260
|
if args.gate_versions:
|
|
261
261
|
if check_version_in_response_header(args):
|
|
262
|
-
|
|
263
|
-
sys.exit(
|
|
262
|
+
exit_code = scythe_test_definition(args)
|
|
263
|
+
sys.exit(exit_code)
|
|
264
264
|
else:
|
|
265
265
|
print("No compatible version found in response header.")
|
|
266
266
|
sys.exit(1)
|
|
267
267
|
else:
|
|
268
|
-
|
|
269
|
-
sys.exit(
|
|
268
|
+
exit_code = scythe_test_definition(args)
|
|
269
|
+
sys.exit(exit_code)
|
|
270
270
|
else:
|
|
271
271
|
print("URL not available.")
|
|
272
272
|
sys.exit(1)
|
|
@@ -280,6 +280,13 @@ class ScytheCLIError(Exception):
|
|
|
280
280
|
pass
|
|
281
281
|
|
|
282
282
|
|
|
283
|
+
class ExitWithCode(Exception):
|
|
284
|
+
"""Exception to exit with a specific code from within Typer commands."""
|
|
285
|
+
def __init__(self, code: int):
|
|
286
|
+
self.code = code
|
|
287
|
+
super().__init__()
|
|
288
|
+
|
|
289
|
+
|
|
283
290
|
def _find_project_root(start: Optional[str] = None) -> Optional[str]:
|
|
284
291
|
"""Walk upwards from start (or cwd) to find a directory containing .scythe."""
|
|
285
292
|
cur = os.path.abspath(start or os.getcwd())
|
|
@@ -728,7 +735,10 @@ def main(argv: Optional[List[str]] = None) -> int:
|
|
|
728
735
|
code, output, version = _run_test(project_root, name, extra)
|
|
729
736
|
_record_run(project_root, name, code, output, version)
|
|
730
737
|
print(output)
|
|
731
|
-
|
|
738
|
+
# Raise exception to propagate exit code through Typer
|
|
739
|
+
if code != 0:
|
|
740
|
+
raise ExitWithCode(code)
|
|
741
|
+
return 0
|
|
732
742
|
|
|
733
743
|
db_app = typer.Typer(
|
|
734
744
|
no_args_is_help=True,
|
|
@@ -763,8 +773,10 @@ def main(argv: Optional[List[str]] = None) -> int:
|
|
|
763
773
|
app.add_typer(db_app, name="db")
|
|
764
774
|
|
|
765
775
|
try:
|
|
766
|
-
|
|
767
|
-
return
|
|
776
|
+
app()
|
|
777
|
+
return 0
|
|
778
|
+
except ExitWithCode as e:
|
|
779
|
+
return e.code
|
|
768
780
|
except ScytheCLIError as e:
|
|
769
781
|
print(f"Error: {e}", file=sys.stderr)
|
|
770
782
|
return 2
|
scythe_ttp-0.17.6/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.17.6
|
|
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
|