From b445d08ce172db2521b5c8a6a7e1ae3d795587c3 Mon Sep 17 00:00:00 2001 From: adrien Date: Mon, 27 Jan 2025 18:47:38 +0100 Subject: [PATCH] outch --- config.php | 8 ++++---- index.php | 30 ++++++++++++------------------ scan.php | 8 +++++++- templates/lanScan.xsl | 4 ++-- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/config.php b/config.php index c634b9c..e38b4c5 100644 --- a/config.php +++ b/config.php @@ -14,9 +14,9 @@ $presets = [ '-PS' => 'microsoft-ds', '-F' => true, '-T' => 5, - '--stylesheet' => "lanScan.xsl", + '--stylesheet' => "lanScan", 'refreshPeriod' => 60, - 'sudo' => false, + #'sudo' => false, ], "host" => [ '-Pn' => true, @@ -24,8 +24,8 @@ $presets = [ '-sV' => true, '-T' => 5, '--script' => "http-info,smb-shares-size", - '--stylesheet' => "hostScan.xsl", + '--stylesheet' => "hostScan", 'refreshPeriod' => 60, - 'sudo' => true, + #'sudo' => true, ], ]; diff --git a/index.php b/index.php index 4cc8488..07b9c6f 100755 --- a/index.php +++ b/index.php @@ -170,10 +170,7 @@ Exemples: /24 10. -
- - Techniques de scan de ports -
+
Techniques de scan de ports
@@ -269,10 +266,7 @@ Exemples: /24 10.
-
- - Spécifications des ports et ordre du scan -
+
Spécifications des ports et ordre du scan
@@ -586,11 +580,11 @@ Exemples: /24 10. foreach (scandir($TEMPLATESDIR) as $filename) { if (substr($filename, -4) === '.xsl') { $name = substr($filename, 0, -4); - $URL = rawurlencode($filename); - if (isset($options["--stylesheet"]) && $URL == $options["--stylesheet"]) { - echo " \n"; + #$URL = rawurlencode($filename); + if (isset($options["--stylesheet"]) && $name == $options["--stylesheet"]) { + echo " \n"; } else { - echo " \n"; + echo " \n"; } } } @@ -599,19 +593,19 @@ foreach (scandir($TEMPLATESDIR) as $filename) {
- - "> $name\n"; + #$URL = "$BASEDIR/$SCANSDIR/".rawurlencode($filename); + if (isset($options["original"]) && $name == $options["original"]) { + echo " \n"; } else { - echo " \n"; + echo " \n"; } } } diff --git a/scan.php b/scan.php index 197e013..29749f9 100755 --- a/scan.php +++ b/scan.php @@ -3,10 +3,16 @@ include_once 'config.php'; include_once 'filter_inputs.php'; -$options["--stylesheet"] = "$BASEDIR/$TEMPLATESDIR/${options["--stylesheet"]}?"; +$options["--stylesheet"] = "$BASEDIR/$TEMPLATESDIR/${options["--stylesheet"]}.xsl#"; if (isset($options["name"])) { $options["--stylesheet"] .= "name=" . rawurlencode($options["name"]) . "&"; } +if (isset($options["original"])) { + $options["--stylesheet"] .= "original=" . rawurlencode($options["original"]) . "&"; +} +if (isset($options["refreshPeriod"])) { + $options["--stylesheet"] .= "refreshPeriod={$options["refreshPeriod"]}&"; +} $args = ""; foreach ($options as $option => $value) { diff --git a/templates/lanScan.xsl b/templates/lanScan.xsl index 7f0359e..5a2ad8f 100755 --- a/templates/lanScan.xsl +++ b/templates/lanScan.xsl @@ -16,7 +16,7 @@ - + @@ -51,7 +51,7 @@ -
+