refactor: ship the exploit client only; drop the bundled lab harness
ci / macos-latest / py3.12 (push) Canceled after 0s
ci / macos-latest / py3.9 (push) Canceled after 0s
ci / ubuntu-latest / py3.12 (push) Canceled after 0s
ci / ubuntu-latest / py3.9 (push) Canceled after 0s
ci / windows-latest / py3.12 (push) Canceled after 0s
ci / windows-latest / py3.9 (push) Canceled after 0s
ci / macos-latest / py3.12 (push) Canceled after 0s
ci / macos-latest / py3.9 (push) Canceled after 0s
ci / ubuntu-latest / py3.12 (push) Canceled after 0s
ci / ubuntu-latest / py3.9 (push) Canceled after 0s
ci / windows-latest / py3.12 (push) Canceled after 0s
ci / windows-latest / py3.9 (push) Canceled after 0s
- remove lab/ (index.php, apache conf, up/down/status shims) - remove poc/lab.py and the 'poc lab' subcommand - proof path defaults to a fixed per-user dir so the working directory no longer matters - README: target recipe documented instead of shipped
This commit is contained in:
+7
-17
@@ -8,31 +8,21 @@ def parse(argv):
|
||||
|
||||
|
||||
class SeparationTest(unittest.TestCase):
|
||||
def test_lab_defaults_to_up(self):
|
||||
self.assertEqual(parse(["lab"]).action, "up")
|
||||
|
||||
def test_lab_up_status_down(self):
|
||||
for action in ("up", "down", "status"):
|
||||
self.assertEqual(parse(["lab", action]).action, action)
|
||||
|
||||
def test_lab_rejects_unknown_action(self):
|
||||
def test_no_lab_subcommand(self):
|
||||
with self.assertRaises(SystemExit):
|
||||
parse(["lab", "exploit"])
|
||||
parse(["lab"])
|
||||
|
||||
def test_lab_has_no_exploit_flags(self):
|
||||
ns = parse(["lab", "up"])
|
||||
for flag in ("proof", "retries", "dry_run"):
|
||||
self.assertFalse(hasattr(ns, flag), flag)
|
||||
def test_subcommands_are_exploit_only(self):
|
||||
cases = {"check": [], "leak": [], "exploit": [], "status": [],
|
||||
"exec": ["--cmd", "id"], "offsets": ["--lib", "x"], "selftest": []}
|
||||
for name, extra in cases.items():
|
||||
self.assertTrue(callable(parse([name] + extra).func), name)
|
||||
|
||||
def test_exploit_keeps_its_flags(self):
|
||||
ns = parse(["exploit", "--cmd", "id>/out/x", "--retries", "1"])
|
||||
self.assertEqual(ns.cmd, "id>/out/x")
|
||||
self.assertEqual(ns.retries, 1)
|
||||
|
||||
def test_lab_actions_do_not_run_the_chain(self):
|
||||
ns = parse(["lab", "up"])
|
||||
self.assertIs(ns.func, cli.cmd_lab)
|
||||
|
||||
def test_exploit_and_leak_are_separate_commands(self):
|
||||
self.assertIs(parse(["exploit"]).func, cli.cmd_exploit)
|
||||
self.assertIs(parse(["leak"]).func, cli.cmd_leak)
|
||||
|
||||
Reference in New Issue
Block a user