From 47c0bbdb4c818f416c770073ed04421a546963f6 Mon Sep 17 00:00:00 2001 From: adrien Date: Mon, 14 Oct 2024 04:41:18 +0200 Subject: [PATCH] mac vendor --- hostScan.xsl | 16 ++++++++++++++-- lanScan.xsl | 14 +++++++++----- scan.php | 5 ++--- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/hostScan.xsl b/hostScan.xsl index ef46865..f00850b 100755 --- a/hostScan.xsl +++ b/hostScan.xsl @@ -54,7 +54,7 @@ - + @@ -62,7 +62,7 @@ - + @@ -130,6 +130,7 @@ var table = $('#scanResultsTable').DataTable({ [256, 512, 1024, 2048, "All"] ], responsive: true, + colReorder: true }) $('.ui.dropdown').dropdown() @@ -265,6 +266,17 @@ $.toast({ + + ui mini button + + red + orange + green + green + orange + red + + diff --git a/lanScan.xsl b/lanScan.xsl index 5bebd2c..c46fab2 100755 --- a/lanScan.xsl +++ b/lanScan.xsl @@ -8,12 +8,11 @@ - - + - + @@ -54,7 +53,7 @@ - + @@ -62,7 +61,7 @@ - + @@ -115,6 +114,7 @@ Exemples: 192.168.1.0/24 scanme.nmap.org 10.0-255.0-255.1-254"/> Etat Adresse IP Nom + Fabricant Services Scanner les services @@ -149,6 +149,7 @@ var table = $('#scanResultsTable').DataTable({ [256, 512, 1024, 2048, "All"] ], responsive: true, + colReorder: true }) table.order([1, 'asc']).draw() @@ -234,6 +235,9 @@ $.toast({ + + + diff --git a/scan.php b/scan.php index 88af3e5..546d0c4 100755 --- a/scan.php +++ b/scan.php @@ -28,7 +28,7 @@ foreach ($inputs as $arg => $value) { $tempPath = tempnam(sys_get_temp_dir(), 'scan_').".xml"; -exec("nmap$args -oX '$tempPath' $targets 2>&1", $stderr, $code); +exec("sudo nmap$args -oX '$tempPath' $targets 2>&1", $stderr, $code); if ($code) { http_response_code(500); die(implode("
\n", $stderr)); @@ -39,8 +39,7 @@ $xml->load($tempPath); `rm "$tempPath"`; $saveAsURL = $saveAs? "$BASEDIR/$SCANSDIR/$saveAs.xml" : ""; -$xml->insertBefore($xml->createProcessingInstruction('xslt-param', "name='saveAs' value='".htmlentities($saveAsURL, ENT_QUOTES)."'"), $xml->documentElement); -$xml->insertBefore($xml->createProcessingInstruction('xslt-param', "name='scansDir' value='".htmlentities($SCANSDIR, ENT_QUOTES)."'"), $xml->documentElement); +$xml->insertBefore($xml->createProcessingInstruction('xslt-param', "name='savedAs' value='".htmlentities($saveAsURL, ENT_QUOTES)."'"), $xml->documentElement); $xml->insertBefore($xml->createProcessingInstruction('xslt-param', "name='compareWith' value='".htmlentities($compareWith, ENT_QUOTES)."'"), $xml->documentElement); if ($saveAs) {