From a32e007c37c7076a5e840209537b4e37e4b9d7a9 Mon Sep 17 00:00:00 2001 From: Caleb Mazalevskis Date: Tue, 15 Oct 2024 17:10:30 +0800 Subject: [PATCH] Flag support patch. Changelog excerpt: - The scanner can now also return data specific to those flags back to CLI. --- Changelog.md | 2 +- src/CLI.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 351e8f4..aace7d8 100644 --- a/Changelog.md +++ b/Changelog.md @@ -54,4 +54,4 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co - [2024.10.15]: Parameters containing spaces weren't being parsed correctly by the recursiveCommand method; Fixed. #### Other changes. -- [2024.10.15]: Added the ability to add special, optional flags after the parameter when using the scan command, with the intent to modify scan behaviour. +- [2024.10.15]: Added the ability to add special, optional flags after the parameter when using the scan command, with the intent to modify scan behaviour. The scanner can now also return data specific to those flags back to CLI. diff --git a/src/CLI.php b/src/CLI.php index 6493db9..0e83c7f 100644 --- a/src/CLI.php +++ b/src/CLI.php @@ -239,6 +239,10 @@ public function __construct(\phpMussel\Core\Loader &$Loader, \phpMussel\Core\Sca $this->Loader->InstanceCache[$Matches[1]] = true; } echo "\n" . $this->Scanner->scan($TargetData) . "\n"; + if (isset($this->Loader->InstanceCache['Print after CLI scan']) && $this->Loader->InstanceCache['Print after CLI scan'] !== '') { + echo "\n" . $this->Loader->InstanceCache['Print after CLI scan'] . "\n"; + $this->Loader->InstanceCache['Print after CLI scan'] = ''; + } continue; }