From c01cfb631b8cc462c44e2399af05b257e1961b53 Mon Sep 17 00:00:00 2001 From: adrien Date: Tue, 22 Oct 2024 01:26:34 +0200 Subject: [PATCH] renaming --- README.md | 4 ++-- config.php | 4 ++-- filter_inputs.php | 2 +- index.php | 8 ++++---- scan.php | 4 ++-- templates/cards.xsl | 16 ++++++++-------- templates/compact.xsl | 16 ++++++++-------- templates/{servicesTable.xsl => hostScan.xsl} | 16 ++++++++-------- templates/{hostsTable.xsl => lanScan.xsl} | 16 ++++++++-------- templates/lib/head.xsl | 6 +++--- templates/lib/nav.xsl | 4 ++-- 11 files changed, 48 insertions(+), 48 deletions(-) rename templates/{servicesTable.xsl => hostScan.xsl} (94%) rename templates/{hostsTable.xsl => lanScan.xsl} (93%) diff --git a/README.md b/README.md index 6fdfa9b..d75c1ea 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ $presets = [ '-PS' => 'microsoft-ds', '-F' => true, '-T' => 5, - '--stylesheet' => "$BASEDIR/templates/hostsTable.xsl", + '--stylesheet' => "$BASEDIR/templates/lanScan.xsl", 'refreshPeriod' => 60, 'sudo' => false, ], @@ -21,7 +21,7 @@ $presets = [ '-sV' => true, '-T' => 5, '--script' => "http-info,smb-shares-size", - '--stylesheet' => "$BASEDIR/templates/servicesTable.xsl", + '--stylesheet' => "$BASEDIR/templates/hostScan.xsl", 'refreshPeriod' => 60, 'sudo' => true, ], diff --git a/config.php b/config.php index ab0bcf5..10bfdd5 100644 --- a/config.php +++ b/config.php @@ -11,7 +11,7 @@ $presets = [ '-PS' => 'microsoft-ds', '-F' => true, '-T' => 5, - '--stylesheet' => "$BASEDIR/templates/hostsTable.xsl", + '--stylesheet' => "$BASEDIR/templates/lanScan.xsl", 'refreshPeriod' => 60, 'sudo' => false, ], @@ -21,7 +21,7 @@ $presets = [ '-sV' => true, '-T' => 5, '--script' => "http-info,smb-shares-size", - '--stylesheet' => "$BASEDIR/templates/servicesTable.xsl", + '--stylesheet' => "$BASEDIR/templates/hostScan.xsl", 'refreshPeriod' => 60, 'sudo' => true, ], diff --git a/filter_inputs.php b/filter_inputs.php index 29a8dc7..549f48c 100644 --- a/filter_inputs.php +++ b/filter_inputs.php @@ -110,7 +110,7 @@ if ($preset && isset($presets[$preset])) { '--stylesheet' => FILTER_VALIDATE_URL, // lanScan 'saveAs' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => $fileNameRegex]], - 'original' => FILTER_VALIDATE_URL, + 'originalURL' => FILTER_VALIDATE_URL, 'refreshPeriod' => ['filter' => FILTER_VALIDATE_INT, 'options' => ['min_range' => 0]], 'sudo' => FILTER_VALIDATE_BOOLEAN, ], false) ?: $presets["default"]; diff --git a/index.php b/index.php index 940e513..0c2203a 100755 --- a/index.php +++ b/index.php @@ -593,8 +593,8 @@ foreach (scandir('templates') as $filename) {
- - "> $name\n"; } else { echo " \n"; @@ -733,7 +733,7 @@ foreach ([$DATADIR, $NMAPDIR] as $dir) { class TagsInput extends Tagify { constructor(input, options={}, delim = ",") { if (!options.delimiters) options.delimiters = " |," - if (!options.originalInputValueFormat) options.originalInputValueFormat = tags => tags.map(tag => tag.value).join(delim) + if (!options.originalURLInputValueFormat) options.originalURLInputValueFormat = tags => tags.map(tag => tag.value).join(delim) if (input.list) options.whitelist = Array.from(input.list.options).map(option => option.value) super(input, options) } diff --git a/scan.php b/scan.php index 2ac0c7d..e7febdc 100755 --- a/scan.php +++ b/scan.php @@ -41,8 +41,8 @@ $xml = new DOMDocument(); $xml->load($tempPath); `rm "$tempPath"`; -$saveAsURL = $options["saveAs"]?? false ? "$BASEDIR/$SCANSDIR/{$options["saveAs"]}.xml" : ""; -$xml->insertBefore($xml->createProcessingInstruction('xslt-param', "name='savedAs' value='".htmlentities($saveAsURL, ENT_QUOTES)."'"), $xml->documentElement); +$thisURL = $options["saveAs"]?? false ? "$BASEDIR/$SCANSDIR/{$options["saveAs"]}.xml" : ""; +$xml->insertBefore($xml->createProcessingInstruction('xslt-param', "name='thisURL' value='".htmlentities($thisURL, ENT_QUOTES)."'"), $xml->documentElement); foreach ($options as $option => $value) { if (substr($option, 0, 1) != '-') { $xml->insertBefore($xml->createProcessingInstruction('xslt-param', "name='$option' value='".htmlentities($value, ENT_QUOTES)."'"), $xml->documentElement); diff --git a/templates/cards.xsl b/templates/cards.xsl index b7f1cb2..0df5e6b 100755 --- a/templates/cards.xsl +++ b/templates/cards.xsl @@ -13,19 +13,19 @@ - - + + - - + + - - + + @@ -37,7 +37,7 @@ - + @@ -46,7 +46,7 @@ - + diff --git a/templates/compact.xsl b/templates/compact.xsl index 786a871..1b67f3a 100755 --- a/templates/compact.xsl +++ b/templates/compact.xsl @@ -12,19 +12,19 @@ - - + + - - + + - - + + @@ -36,7 +36,7 @@ - + @@ -45,7 +45,7 @@ - + diff --git a/templates/servicesTable.xsl b/templates/hostScan.xsl similarity index 94% rename from templates/servicesTable.xsl rename to templates/hostScan.xsl index 3db97ab..96e9c3f 100755 --- a/templates/servicesTable.xsl +++ b/templates/hostScan.xsl @@ -12,19 +12,19 @@ - - + + - - + + - - + + @@ -36,7 +36,7 @@ - + @@ -45,7 +45,7 @@ - + diff --git a/templates/hostsTable.xsl b/templates/lanScan.xsl similarity index 93% rename from templates/hostsTable.xsl rename to templates/lanScan.xsl index 592b773..b76935a 100755 --- a/templates/hostsTable.xsl +++ b/templates/lanScan.xsl @@ -13,19 +13,19 @@ - - + + - - + + - - + + @@ -37,7 +37,7 @@ - + @@ -46,7 +46,7 @@ - + diff --git a/templates/lib/head.xsl b/templates/lib/head.xsl index c91172b..f7f8a37 100644 --- a/templates/lib/head.xsl +++ b/templates/lib/head.xsl @@ -9,7 +9,7 @@ - + @@ -28,8 +28,8 @@ - original= - + originalURL= + &refreshPeriod= &sudo= diff --git a/templates/lib/nav.xsl b/templates/lib/nav.xsl index 5a60efb..05c1730 100644 --- a/templates/lib/nav.xsl +++ b/templates/lib/nav.xsl @@ -9,7 +9,7 @@ - +
- +