diff --git a/config.php b/config.php index ebd58f5..b5cdd06 100644 --- a/config.php +++ b/config.php @@ -1,28 +1,28 @@ $DATADIR, +$NMAP = "sudo nmap"; # nmap command, E.g. 'nmap', 'sudo nmap' for root privileges or '/usr/bin/nmap' if not in PATH +$NMAPDIR = dirname(`which nmap`) . "/../share/nmap"; +$port = (($_SERVER['REQUEST_SCHEME'] == "http" && $_SERVER['SERVER_PORT'] == 80) || ($_SERVER['REQUEST_SCHEME'] == "https" && $_SERVER['SERVER_PORT'] == 443)) ? "" : ":{$_SERVER['SERVER_PORT']}"; +$BASEDIR = "{$_SERVER['REQUEST_SCHEME']}://{$_SERVER['SERVER_NAME']}$port" . dirname($_SERVER['SCRIPT_NAME']); +$SCANSDIR = "scans"; +$STYLESHEETSDIR = "stylesheets"; +$DATADIR = "."; +$SCRIPTARGSFILE = "script-args.ini"; +$COMMONOPTIONS = [ + "--datadir" => $DATADIR, "--script-args-file" => $SCRIPTARGSFILE, ]; $PRESETS = [ "lanScan" => [ - "-PS" => "microsoft-ds", - "-F" => true, - "-T" => 5, - "--script" => "http-info,smb-shares-size", + "-PS" => "microsoft-ds", + "-F" => true, + "-T" => 5, + "--script" => "http-info,smb-shares-size", "--stylesheet" => "lanTable.xsl", ], "host" => [ - "-A" => true, - "-T" => 5, - "--script" => "http-info,smb-shares-size", + "-A" => true, + "-T" => 5, + "--script" => "http-info,smb-shares-size", "--stylesheet" => "hostDetails.xsl", ], -]; \ No newline at end of file +]; diff --git a/options.php b/options.php index 288459f..c4f6eb3 100755 --- a/options.php +++ b/options.php @@ -3,763 +3,744 @@ - - - lanScan - - - - - - - - - + + + lanScan + + + + + + + + + - - -
+
-

Scanner un réseau

+

Scanner un réseau

-
-
-
- - -
+ + + + $name\n"; + } + } + } + ?> + - - - - $name\n"; + + \n"; + if (file_exists("$dir/nmap-services")) { + $nmap_services = file("$dir/nmap-services"); + foreach ($nmap_services as $service) { + if (0 !== strpos($service, '#')) { + [$name, $port] = explode("\t", $service); + $services[$name] = explode("/", $port); } } } - ?> - + } + foreach ($services as $name => [$portid, $protocol]) { + echo " \n"; + } + ?> + - - \n"; - if (file_exists("$dir/nmap-services")) { - $nmap_services = file("$dir/nmap-services"); - foreach ($nmap_services as $service) { - if (0 !== strpos($service, '#')) { - [$name, $port] = explode("\t", $service); - $services[$name] = explode("/", $port); - } - } + + + + + + + + + + + + + + + + + + + + + + + + + + + \n"; } } - foreach ($services as $name => [$portid, $protocol]) { - echo " \n"; + } + ?> + + + + - - + } + + \ No newline at end of file diff --git a/stylesheets/hostDetails.xsl b/stylesheets/hostDetails.xsl index ba262b5..c9a9b66 100644 --- a/stylesheets/hostDetails.xsl +++ b/stylesheets/hostDetails.xsl @@ -11,14 +11,18 @@ - + - + - - + + @@ -34,15 +38,17 @@
- +
-