diff --git a/config.php b/config.php
index c0e94e3..1a31793 100644
--- a/config.php
+++ b/config.php
@@ -1,10 +1,18 @@
'ssh,http,https,msrpc,microsoft-ds',
- 'F' => true,
- 'T5' => true,
- 'stylesheet' => 'lanScan.xls'
+$BASEDIR = "{$_SERVER['REQUEST_SCHEME']}://{$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']}" . dirname($_SERVER['REQUEST_URI']);
+
+$LANSCAN_OPTIONS = [
+ 'PS' => 'ssh,http,https,msrpc,microsoft-ds',
+ 'F' => true,
+ 'T5' => true,
+ 'stylesheet' => "$BASEDIR/lanScan.xsl"
];
-$NMAP_DATADIR = '/usr/share/nmap';
+
+$HOSTSCAN_OPTIONS = [
+ 'sV' => true,
+ 'stylesheet' => "$BASEDIR/hostScan.xsl"
+];
+
+$SCANSDIR = 'scans';
+$DATADIR = '/usr/share/nmap';
\ No newline at end of file
diff --git a/filter_inputs.php b/filter_inputs.php
index 04f20ae..6f6db3d 100644
--- a/filter_inputs.php
+++ b/filter_inputs.php
@@ -1,25 +1,17 @@
:"\/|?]+$/';
-$targets = filter_input(INPUT_GET, 'targets', FILTER_VALIDATE_REGEXP, [
- 'flags' => FILTER_NULL_ON_FAILURE,
- 'options' => ['regexp' => "/^[\da-zA-Z-. \/]+$/"],
-]);
-
-$saveAs = filter_input(INPUT_GET, 'saveAs', FILTER_VALIDATE_REGEXP, [
- 'flags' => FILTER_NULL_ON_FAILURE,
- 'options' => ['regexp' => $fileNameRegex],
-]);
-
-$compareWith = filter_input(INPUT_GET, 'compareWith', FILTER_VALIDATE_REGEXP, [
- 'flags' => FILTER_NULL_ON_FAILURE,
- 'options' => ['regexp' => $fileNameRegex],
-]);
+$targets = filter_input(INPUT_GET, 'targets', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => $targetsListRegex]]);
+$lan = filter_input(INPUT_GET, 'lan', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => $targetsListRegex]]);
+$host = filter_input(INPUT_GET, 'host', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => $targetsListRegex]]);
+$saveAs = filter_input(INPUT_GET, 'saveAs', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => $fileNameRegex]]);
+$compareWith = filter_input(INPUT_GET, 'compareWith', FILTER_VALIDATE_URL);
$inputs = filter_input_array(INPUT_GET, [
'iR' => ['filter' => FILTER_VALIDATE_INT],
@@ -111,5 +103,5 @@ $inputs = filter_input_array(INPUT_GET, [
'V' => ['filter' => FILTER_VALIDATE_BOOLEAN],
'unprivileged' => ['filter' => FILTER_VALIDATE_BOOLEAN],
'h' => ['filter' => FILTER_VALIDATE_BOOLEAN],
- 'stylesheet' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => $fileNameRegex]],
-], false) ?: $DEFAULT_ARGS;
+ 'stylesheet' => ['filter' => FILTER_VALIDATE_URL],
+], false) ?: $LANSCAN_OPTIONS;
diff --git a/hostScan.xsl b/hostScan.xsl
new file mode 100755
index 0000000..4d7ce23
--- /dev/null
+++ b/hostScan.xsl
@@ -0,0 +1,419 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /scan.php?targets=
+
+ &
+
+
+
+
+ compareWith=
+
+
+
+
+
+
+
+
+ 60;URL=
+
+
+
+
+ lanScan -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Etat |
+ Adresse IP |
+ Nom |
+ Services |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ =
+
+
+ on
+
+ &
+
+
+
+
+
+
+ on
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ positive
+ negative
+
+
+
+
+
+
+
+
+ ui green circular label
+ ui red circular label
+
+
+
+
+
+ down
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+ /scan.php?host=
+
+
+
+ Scanner
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ui label
+
+ red
+ orange
+ green
+ green
+ orange disabled
+ red disabled
+
+
+ mini dropdown button share-size
+ small
+
+
+
+
+
+ ://
+
+ :
+
+
+
+
+
+ rdp.php?v=
+
+ &p=
+
+
+
+
+
+
+ U:
+ :
+
+
+
+
+
+
+
+
+ --free:
+
+ ; --total:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/index.php b/index.php
index 00e548b..aeb7f10 100755
--- a/index.php
+++ b/index.php
@@ -25,31 +25,26 @@ include_once 'filter_inputs.php';
@@ -58,13 +53,13 @@ echo " \n";
$name\n";
+ echo "
$name\n";
}
}
?>
diff --git a/lanScan.xsl b/lanScan.xsl
index 63caec0..4d7ce23 100755
--- a/lanScan.xsl
+++ b/lanScan.xsl
@@ -11,7 +11,7 @@
-
+
@@ -21,10 +21,22 @@
-
+
+
+
+ /scan.php?targets=
+
+ &
+
+
+
+
+ compareWith=
+
+
@@ -32,24 +44,12 @@
60;URL=
-
- /scan.php?targets=
-
- &
-
-
-
-
- compareWith=
-
+
lanScan -
-
-
-
-
+
@@ -74,24 +74,26 @@