From 13f42cad369ef2b7ebd87fa5f59daecc5524eb03 Mon Sep 17 00:00:00 2001 From: adrien Date: Tue, 4 Feb 2025 10:05:12 +0100 Subject: [PATCH] undo URL --- index.php | 139 ++++++++++++++++++++++++++++---------- scan.php | 37 ++++++++++ scans/scanme.nmap.org.xml | 31 +++++++++ stylesheets/lanScan.xsl | 31 +++++---- 4 files changed, 187 insertions(+), 51 deletions(-) create mode 100644 scan.php create mode 100644 scans/scanme.nmap.org.xml diff --git a/index.php b/index.php index 01fd9b3..c1f817d 100644 --- a/index.php +++ b/index.php @@ -1,37 +1,102 @@ - ['regexp' => '/^[\da-zA-Z-. \/]+$/'], "flags" => FILTER_NULL_ON_FAILURE]); -if ($lan) { - $cmd = "$lanScanCmd $lan"; - - if (!file_exists($SCANSDIR)) mkdir($SCANSDIR); - $filename = str_replace("/", "!", $lan); - $path = "$SCANSDIR/$filename.xml"; - - if (!file_exists($path)) $cmd .= " | tee '$path'"; - - header('Content-type: text/xml'); - system("$cmd", $retcode); - - exit(); -} - -$host = filter_input(INPUT_GET, 'host', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => '/^[\da-zA-Z-. \/]+$/'], "flags" => FILTER_NULL_ON_FAILURE]); -if ($host) { - $cmd = "$hostScanCmd $host"; - - if (!file_exists($SCANSDIR)) mkdir($SCANSDIR); - $filename = str_replace("/", "!", $host); - $path = "$SCANSDIR/$filename.xml"; - - if (!file_exists($path)) $cmd .= " | tee '$path'"; - - header('Content-type: text/xml'); - system("$cmd", $retcode); - - exit(); -} - -include "home.php"; \ No newline at end of file + + + + + + + lanScan + + + + + + + + +
+
+ +
+
+

Découvrir ou superviser un réseau

+
+ +
+
+ +
+
+ + +
+
+ + + + + + + + ['regexp' => '/^[\da-zA-Z-. \/]+$/'], "flags" => FILTER_NULL_ON_FAILURE]); +if ($lan) { + $cmd = "$lanScanCmd $lan"; + + if (!file_exists($SCANSDIR)) mkdir($SCANSDIR); + $filename = str_replace("/", "!", $lan); + $path = "$SCANSDIR/$filename.xml"; + + if (!file_exists($path)) $cmd .= " | tee '$path'"; + + header('Content-type: text/xml'); + system("$cmd", $retcode); + + exit(); +} + +$host = filter_input(INPUT_GET, 'host', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => '/^[\da-zA-Z-. \/]+$/'], "flags" => FILTER_NULL_ON_FAILURE]); +if ($host) { + $cmd = "$hostScanCmd $host"; + + if (!file_exists($SCANSDIR)) mkdir($SCANSDIR); + $filename = str_replace("/", "!", $host); + $path = "$SCANSDIR/$filename.xml"; + + if (!file_exists($path)) $cmd .= " | tee '$path'"; + + header('Content-type: text/xml'); + system("$cmd", $retcode); + + exit(); +} + +include "index.php"; diff --git a/scans/scanme.nmap.org.xml b/scans/scanme.nmap.org.xml new file mode 100644 index 0000000..59dad30 --- /dev/null +++ b/scans/scanme.nmap.org.xml @@ -0,0 +1,31 @@ + + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + diff --git a/stylesheets/lanScan.xsl b/stylesheets/lanScan.xsl index 8f5330c..9eda03d 100644 --- a/stylesheets/lanScan.xsl +++ b/stylesheets/lanScan.xsl @@ -24,10 +24,11 @@ - + - - + + @@ -78,7 +79,7 @@ table.order([1, 'asc']).draw() $('.ui.dropdown').dropdown() - + @@ -143,18 +144,20 @@ $('.ui.dropdown').dropdown() - - - - - - - - - + + + + + + + + + - ?host= + scan.php?host=