Compare commits
40 Commits
db6643b8bb
...
master
Author | SHA1 | Date | |
---|---|---|---|
b445d08ce1 | |||
e2c1c6604e | |||
a593148c38 | |||
d45b05941f | |||
e423273752 | |||
0c72ceb620 | |||
dc8fa57c0f | |||
53679e2098 | |||
8cd0ba066f | |||
602c1fc7f3 | |||
06eb33187b | |||
43d2df7850 | |||
9d7f526080 | |||
80dc329353 | |||
81652e25c9 | |||
4e14da1860 | |||
8e5f010da0 | |||
df4648e12a | |||
154d731e55 | |||
2ef0421078 | |||
f2acc56ef7 | |||
1d5bb5446d | |||
7790369ac1 | |||
bfb7788df0 | |||
c174b3a142 | |||
1a0bb6abf5 | |||
c01cfb631b | |||
f1bb88abec | |||
f2af893303 | |||
8865da906d | |||
f05edd0fc7 | |||
2eda5ca9c9 | |||
68a98fb5a5 | |||
7bddbd3e10 | |||
0b59c94f52 | |||
bd8e988444 | |||
cadcd37408 | |||
d8bc7d99fb | |||
458c04afa1 | |||
f001e1b61d |
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,4 +1,3 @@
|
|||||||
scans/
|
scans/
|
||||||
scripts/smb-authentication.ini
|
datadir/script-args.ini
|
||||||
test.php
|
test.php
|
||||||
server.php
|
|
||||||
|
@ -11,7 +11,7 @@ $presets = [
|
|||||||
'-PS' => 'microsoft-ds',
|
'-PS' => 'microsoft-ds',
|
||||||
'-F' => true,
|
'-F' => true,
|
||||||
'-T' => 5,
|
'-T' => 5,
|
||||||
'--stylesheet' => "$BASEDIR/templates/hostsTable.xsl",
|
'--stylesheet' => "$BASEDIR/templates/lanScan.xsl",
|
||||||
'refreshPeriod' => 60,
|
'refreshPeriod' => 60,
|
||||||
'sudo' => false,
|
'sudo' => false,
|
||||||
],
|
],
|
||||||
@ -21,7 +21,7 @@ $presets = [
|
|||||||
'-sV' => true,
|
'-sV' => true,
|
||||||
'-T' => 5,
|
'-T' => 5,
|
||||||
'--script' => "http-info,smb-shares-size",
|
'--script' => "http-info,smb-shares-size",
|
||||||
'--stylesheet' => "$BASEDIR/templates/servicesTable.xsl",
|
'--stylesheet' => "$BASEDIR/templates/hostScan.xsl",
|
||||||
'refreshPeriod' => 60,
|
'refreshPeriod' => 60,
|
||||||
'sudo' => true,
|
'sudo' => true,
|
||||||
],
|
],
|
||||||
|
13
config.php
13
config.php
@ -3,17 +3,20 @@
|
|||||||
$port = (($_SERVER['REQUEST_SCHEME'] == "http" && $_SERVER['SERVER_PORT'] == 80) || ($_SERVER['REQUEST_SCHEME'] == "https" && $_SERVER['SERVER_PORT'] == 443)) ? "" : ":{$_SERVER['SERVER_PORT']}";
|
$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']);
|
$BASEDIR = "{$_SERVER['REQUEST_SCHEME']}://{$_SERVER['SERVER_NAME']}$port" . dirname($_SERVER['SCRIPT_NAME']);
|
||||||
$SCANSDIR = 'scans';
|
$SCANSDIR = 'scans';
|
||||||
|
$TEMPLATESDIR = "templates";
|
||||||
|
$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";
|
$NMAPDIR = dirname(`which nmap`) . "/../share/nmap";
|
||||||
$DATADIR = "datadir";
|
$DATADIR = ".";
|
||||||
|
$SCRIPTARGS = "script-args.ini";
|
||||||
|
|
||||||
$presets = [
|
$presets = [
|
||||||
"default" => [
|
"default" => [
|
||||||
'-PS' => 'microsoft-ds',
|
'-PS' => 'microsoft-ds',
|
||||||
'-F' => true,
|
'-F' => true,
|
||||||
'-T' => 5,
|
'-T' => 5,
|
||||||
'--stylesheet' => "$BASEDIR/templates/hostsTable.xsl",
|
'--stylesheet' => "lanScan",
|
||||||
'refreshPeriod' => 60,
|
'refreshPeriod' => 60,
|
||||||
'sudo' => false,
|
#'sudo' => false,
|
||||||
],
|
],
|
||||||
"host" => [
|
"host" => [
|
||||||
'-Pn' => true,
|
'-Pn' => true,
|
||||||
@ -21,8 +24,8 @@ $presets = [
|
|||||||
'-sV' => true,
|
'-sV' => true,
|
||||||
'-T' => 5,
|
'-T' => 5,
|
||||||
'--script' => "http-info,smb-shares-size",
|
'--script' => "http-info,smb-shares-size",
|
||||||
'--stylesheet' => "$BASEDIR/templates/servicesTable.xsl",
|
'--stylesheet' => "hostScan",
|
||||||
'refreshPeriod' => 60,
|
'refreshPeriod' => 60,
|
||||||
'sudo' => true,
|
#'sudo' => true,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
smbdomain =
|
|
||||||
smbuser =
|
|
||||||
smbpassword =
|
|
@ -7,10 +7,10 @@ $hostsListRegex = '/^[\da-zA-Z-.,:\/]+$/';
|
|||||||
$protocolePortsListRegex = '/^(([TU]:)?[0-9\-]+|[a-z\-]+)(,([TU]:)?[0-9\-]+|,[a-z\-]+)*$/';
|
$protocolePortsListRegex = '/^(([TU]:)?[0-9\-]+|[a-z\-]+)(,([TU]:)?[0-9\-]+|,[a-z\-]+)*$/';
|
||||||
$portsListRegex = '/^([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*$/';
|
$portsListRegex = '/^([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*$/';
|
||||||
$tempoRegex = '/^\d+[smh]?$/';
|
$tempoRegex = '/^\d+[smh]?$/';
|
||||||
$fileNameRegex = '/^[^<>:"\/|?]+$/';
|
$fileNameRegex = '/^[^<>:\/|?]+$/';
|
||||||
|
|
||||||
$targets = filter_input(INPUT_GET, 'targets', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => $targetsListRegex], "flags" => FILTER_NULL_ON_FAILURE]);
|
$targets = filter_input(INPUT_GET, 'targets', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => $targetsListRegex], "flags" => FILTER_NULL_ON_FAILURE]);
|
||||||
$preset = filter_input(INPUT_GET, "preset");
|
$preset = filter_input(INPUT_GET, "preset", FILTER_SANITIZE_STRING);
|
||||||
|
|
||||||
if ($preset && isset($presets[$preset])) {
|
if ($preset && isset($presets[$preset])) {
|
||||||
$options = $presets[$preset];
|
$options = $presets[$preset];
|
||||||
@ -107,13 +107,18 @@ if ($preset && isset($presets[$preset])) {
|
|||||||
'-V' => FILTER_VALIDATE_BOOLEAN,
|
'-V' => FILTER_VALIDATE_BOOLEAN,
|
||||||
'--unprivileged' => FILTER_VALIDATE_BOOLEAN,
|
'--unprivileged' => FILTER_VALIDATE_BOOLEAN,
|
||||||
'-h' => FILTER_VALIDATE_BOOLEAN,
|
'-h' => FILTER_VALIDATE_BOOLEAN,
|
||||||
'--stylesheet' => FILTER_VALIDATE_URL,
|
'--stylesheet' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => $fileNameRegex]],
|
||||||
// lanScan
|
// lanScan
|
||||||
'saveAs' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => $fileNameRegex]],
|
'name' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => $fileNameRegex]],
|
||||||
'compareWith' => FILTER_VALIDATE_URL,
|
'originalURL' => FILTER_VALIDATE_URL,
|
||||||
'refreshPeriod' => ['filter' => FILTER_VALIDATE_INT, 'options' => ['min_range' => 0]],
|
'refreshPeriod' => ['filter' => FILTER_VALIDATE_INT, 'options' => ['min_range' => 0]],
|
||||||
'sudo' => FILTER_VALIDATE_BOOLEAN,
|
'sudo' => FILTER_VALIDATE_BOOLEAN,
|
||||||
], false) ?: $presets["default"];
|
], false) ?: $presets["default"];
|
||||||
}
|
}
|
||||||
|
|
||||||
$options["--datadir"] = $DATADIR;
|
$options["--datadir"] = $DATADIR;
|
||||||
|
$options["--script-args-file"] = $SCRIPTARGS;
|
||||||
|
|
||||||
|
/*echo "<!--";
|
||||||
|
var_dump($options);
|
||||||
|
echo "-->\n";*/
|
357
index.php
357
index.php
@ -60,13 +60,13 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="excludeInput" title="--exclude">Exclure les hôtes ou réseaux</label>
|
<label for="excludeInput" title="--exclude">Exclure les hôtes ou réseaux</label>
|
||||||
<input type="text" id="excludeInput" name="--exclude" placeholder="Hôte/réseau" list="targetsList"
|
<input id="excludeInput" type="text" name="--exclude" placeholder="Hôte/réseau" list="targetsList"
|
||||||
pattern="[a-zA-Z0-9._\/,\-]*" value="<?= $options['--exclude'] ?? "" ?>">
|
pattern="[a-zA-Z0-9._\/,\-]*" value="<?= $options['--exclude'] ?? "" ?>">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="iRInput" title="-iR">Nombre de cibles au hasard</label>
|
<label for="iRInput" title="-iR">Nombre de cibles au hasard</label>
|
||||||
<input type="number" min="0" id="iRInput" name="-iR" placeholder="Nombre de cibles"
|
<input id="iRInput" type="number" min="0" name="-iR" placeholder="Nombre"
|
||||||
value="<?= $options['-iR'] ?? "" ?>">
|
value="<?= $options['-iR'] ?? "" ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -75,28 +75,28 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="PnCheckbox" name="-Pn" <?= $options['-Pn'] ?? false ? 'checked' : ''; ?> />
|
<input id="PnCheckbox" type="checkbox" name="-Pn" <?= $options['-Pn'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="PnCheckbox" title="-Pn">Sauter cette étape (considérer tous les hôtes comme actifs)</label>
|
<label for="PnCheckbox" title="-Pn">Sauter cette étape (considérer tous les hôtes comme actifs)</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="PSInput" title="-PS">TCP SYN</label>
|
<label for="PSInput" title="-PS">TCP SYN</label>
|
||||||
<input type="text" id="PSInput" name="-PS" placeholder="Ports" list="servicesList"
|
<input id="PSInput" type="text" name="-PS" placeholder="Ports" list="servicesList"
|
||||||
pattern="([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*" value="<?= $options['-PS'] ?? "" ?>"
|
pattern="([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*" value="<?= $options['-PS'] ?? "" ?>"
|
||||||
title="Liste de ports ex: 22,23,25,80,200-1024,60000-">
|
title="Liste de ports ex: 22,23,25,80,200-1024,60000-">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="PAInput" title="-PA">TCP ACK</label>
|
<label for="PAInput" title="-PA">TCP ACK</label>
|
||||||
<input type="text" id="PAInput" name="-PA" placeholder="Ports" list="servicesList"
|
<input id="PAInput" type="text" name="-PA" placeholder="Ports" list="servicesList"
|
||||||
pattern="([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*" value="<?= $options['-PA'] ?? "" ?>"
|
pattern="([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*" value="<?= $options['-PA'] ?? "" ?>"
|
||||||
title="Liste de ports ex: 22,23,25,80,200-1024,60000-">
|
title="Liste de ports ex: 22,23,25,80,200-1024,60000-">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="PUInput" title="-PU">UDP</label>
|
<label for="PUInput" title="-PU">UDP</label>
|
||||||
<input type="text" id="PUInput" name="-PU" placeholder="Ports" list="servicesList"
|
<input id="PUInput" type="text" name="-PU" placeholder="Ports" list="servicesList"
|
||||||
pattern="([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*" value="<?= $options['-PU'] ?? "" ?>"
|
pattern="([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*" value="<?= $options['-PU'] ?? "" ?>"
|
||||||
title="Liste de ports ex: 22,23,25,80,200-1024,60000-">
|
title="Liste de ports ex: 22,23,25,80,200-1024,60000-">
|
||||||
</div>
|
</div>
|
||||||
@ -106,19 +106,19 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
<div class="inline fields">
|
<div class="inline fields">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="PECheckbox" name="-PE" <?= $options['-PE'] ?? false ? 'checked' : ''; ?> />
|
<input id="PECheckbox" type="checkbox" name="-PE" <?= $options['-PE'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="PECheckbox" title="-PE">Echo request</label>
|
<label for="PECheckbox" title="-PE">Echo request</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="PPCheckbox" name="-PP" <?= $options['-PP'] ?? false ? 'checked' : ''; ?> />
|
<input id="PPCheckbox" type="checkbox" name="-PP" <?= $options['-PP'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="PPCheckbox" title="-PP">Timestamp request</label>
|
<label for="PPCheckbox" title="-PP">Timestamp request</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="PMCheckbox" name="-PM" <?= $options['-PM'] ?? false ? 'checked' : ''; ?> />
|
<input id="PMCheckbox" type="checkbox" name="-PM" <?= $options['-PM'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="PMCheckbox" title="-PM">Mask request</label>
|
<label for="PMCheckbox" title="-PM">Mask request</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -127,36 +127,36 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="POInput" title="-PO">Protocole IP (par type)</label>
|
<label for="POInput" title="-PO">Protocole IP (par type)</label>
|
||||||
<input type="text" id="POInput" name="-PO" placeholder="Protocole"
|
<input id="POInput" type="text" name="-PO" placeholder="Protocole"
|
||||||
pattern="[0-9,\-]+" value="<?= $options['-PO'] ?? "" ?>"
|
pattern="[0-9,\-]+" value="<?= $options['-PO'] ?? "" ?>"
|
||||||
title="[num de protocole]">
|
title="[num de protocole]">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="fields">
|
<div class="inline fields">
|
||||||
<div class="inline field">
|
<div class="field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="PRCheckbox" name="-PR" <?= $options['-PR'] ?? false ? 'checked' : ''; ?> />
|
<input id="PRCheckbox" type="checkbox" name="-PR" <?= $options['-PR'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="PRCheckbox" title="-PR">Ping ARP</label>
|
<label for="PRCheckbox" title="-PR">Ping ARP</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field">
|
<div class="field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="sendIPCheckbox" name="--send-ip" <?= $options['--send-ip'] ?? false ? 'checked' : ''; ?> />
|
<input id="sendIPCheckbox" type="checkbox" name="--send-ip" <?= $options['--send-ip'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="sendIPCheckbox" title="--send-ip">Pas de scan ARP</label>
|
<label for="sendIPCheckbox" title="--send-ip">Pas de scan ARP</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="fields">
|
<div class="inline fields">
|
||||||
<div class="inline field">
|
<div class="field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="nCheckbox" name="-n" <?= $options['-n'] ?? false ? 'checked' : ''; ?> />
|
<input id="nCheckbox" type="checkbox" name="-n" <?= $options['-n'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="nCheckbox" title="-n">Ne jamais résoudre les noms DNS</label>
|
<label for="nCheckbox" title="-n">Ne jamais résoudre les noms DNS</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline field">
|
<div class="field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="RCheckbox" name="-R" <?= $options['-R'] ?? false ? 'checked' : ''; ?> />
|
<input id="RCheckbox" type="checkbox" name="-R" <?= $options['-R'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="nCheckbox" title="-R">Toujours résoudre les noms DNS<br />(par défault seuls les hôtes actifs sont résolus)</label>
|
<label for="nCheckbox" title="-R">Toujours résoudre les noms DNS<br />(par défault seuls les hôtes actifs sont résolus)</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -164,34 +164,31 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="dnsServersInput" title="--dns-servers">Utiliser les serveurs DNS</label>
|
<label for="dnsServersInput" title="--dns-servers">Utiliser les serveurs DNS</label>
|
||||||
<input type="text" id="dnsServersInput" name="--dns-servers" placeholder="serveur"
|
<input id="dnsServersInput" type="text" name="--dns-servers" placeholder="serveur"
|
||||||
pattern="[a-zA-Z0-9._,\-]*" value="<?= $options['--dns-servers'] ?? "" ?>"
|
pattern="[a-zA-Z0-9._,\-]*" value="<?= $options['--dns-servers'] ?? "" ?>"
|
||||||
title="serv1[,serv2],...">
|
title="serv1[,serv2],...">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="title">
|
<div class="title"><i class="icon dropdown"></i>Techniques de scan de ports</div>
|
||||||
<i class="icon dropdown"></i>
|
|
||||||
Techniques de scan de ports
|
|
||||||
</div>
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="fields">
|
<div class="fields">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="sSCheckbox" name="-sS" <?= $options['-sS'] ?? false ? 'checked' : ''; ?> />
|
<input id="sSCheckbox" type="checkbox" name="-sS" <?= $options['-sS'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="sSCheckbox" title="-sS">TCP SYN</label>
|
<label for="sSCheckbox" title="-sS">TCP SYN</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="sTCheckbox" name="-sT" <?= $options['-sT'] ?? false ? 'checked' : ''; ?> />
|
<input id="sTCheckbox" type="checkbox" name="-sT" <?= $options['-sT'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="sTCheckbox" title="-sT">TCP Connect()</label>
|
<label for="sTCheckbox" title="-sT">TCP Connect()</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="sACheckbox" name="-sA" <?= $options['-sA'] ?? false ? 'checked' : ''; ?> />
|
<input id="sACheckbox" type="checkbox" name="-sA" <?= $options['-sA'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="sACheckbox" title="-sA">TCP ACK</label>
|
<label for="sACheckbox" title="-sA">TCP ACK</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -200,19 +197,19 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
<div class="fields">
|
<div class="fields">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="sWCheckbox" name="-sW" <?= $options['-sW'] ?? false ? 'checked' : ''; ?> />
|
<input id="sWCheckbox" type="checkbox" name="-sW" <?= $options['-sW'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="sWCheckbox" title="-sW">Fenêtre TCP</label>
|
<label for="sWCheckbox" title="-sW">Fenêtre TCP</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="sMCheckbox" name="-sM" <?= $options['-sM'] ?? false ? 'checked' : ''; ?> />
|
<input id="sMCheckbox" type="checkbox" name="-sM" <?= $options['-sM'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="sMCheckbox" title="-sM">Maimon</label>
|
<label for="sMCheckbox" title="-sM">Maimon</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="sNCheckbox" name="-sN" <?= $options['-sN'] ?? false ? 'checked' : ''; ?> />
|
<input id="sNCheckbox" type="checkbox" name="-sN" <?= $options['-sN'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="sNCheckbox" title="-sN">TCP Null</label>
|
<label for="sNCheckbox" title="-sN">TCP Null</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -221,19 +218,19 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
<div class="fields">
|
<div class="fields">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="sFCheckbox" name="-sF" <?= $options['-sF'] ?? false ? 'checked' : ''; ?> />
|
<input id="sFCheckbox" type="checkbox" name="-sF" <?= $options['-sF'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="sFCheckbox" title="-sF">TCP FIN</label>
|
<label for="sFCheckbox" title="-sF">TCP FIN</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="sXCheckbox" name="-sX" <?= $options['-sX'] ?? false ? 'checked' : ''; ?> />
|
<input id="sXCheckbox" type="checkbox" name="-sX" <?= $options['-sX'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="sXCheckbox" title="-sX">Sapin de Noël</label>
|
<label for="sXCheckbox" title="-sX">Sapin de Noël</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="sUCheckbox" name="-sU" <?= $options['-sU'] ?? false ? 'checked' : ''; ?> />
|
<input id="sUCheckbox" type="checkbox" name="-sU" <?= $options['-sU'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="sUCheckbox" title="-sU">UDP</label>
|
<label for="sUCheckbox" title="-sU">UDP</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -241,49 +238,46 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="scanflagsInput" title="--scanflags">Scan TCP personnalisé</label>
|
<label for="scanflagsInput" title="--scanflags">Scan TCP personnalisé</label>
|
||||||
<input type="text" id="scanflagsInput" name="--scanflags" placeholder="Drapeaux TCP" list="flagsList"
|
<input id="scanflagsInput" type="text" name="--scanflags" placeholder="Drapeaux TCP" list="flagsList"
|
||||||
pattern="(URG|ACK|PSH|RST|SYN|FIN|,)+|[1-9]?[0-9]|[1-2][0-9][0-9]" value="<?= $options['--scanflags'] ?? "" ?>"
|
pattern="(URG|ACK|PSH|RST|SYN|FIN|,)+|[1-9]?[0-9]|[1-2][0-9][0-9]" value="<?= $options['--scanflags'] ?? "" ?>"
|
||||||
title="Mélanger simplement les drapeaux URG, ACK, PSH, RST, SYN et FIN.">
|
title="Mélanger simplement les drapeaux URG, ACK, PSH, RST, SYN et FIN.">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="sIInput" title="-sI">Hôte zombie</label>
|
<label for="sIInput" title="-sI">Hôte zombie</label>
|
||||||
<input type="text" id="sIInput" name="-p" placeholder="zombie host[:probeport]"
|
<input id="sIInput" type="text" name="-p" placeholder="zombie host[:probeport]"
|
||||||
pattern="[a-zA-Z0-9._\-]+(:[0-9]+)?" value="<?= $options['-sI'] ?? "" ?>"
|
pattern="[a-zA-Z0-9._\-]+(:[0-9]+)?" value="<?= $options['-sI'] ?? "" ?>"
|
||||||
title="zombie host[:probeport]">
|
title="zombie host[:probeport]">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="bInput" title="-b">Rebond FTP</label>
|
<label for="bInput" title="-b">Rebond FTP</label>
|
||||||
<input type="text" id="bInput" name="-p" placeholder="[<username>[:<password>]@]<server>[:<port>]"
|
<input id="bInput" type="text" name="-p" placeholder="[<username>[:<password>]@]<server>[:<port>]"
|
||||||
pattern="([a-zA-Z0-9._\-]+(:.+)?@)?[a-zA-Z0-9._\-]+(:[0-9]+)?" value="<?= $options['-b'] ?? "" ?>"
|
pattern="([a-zA-Z0-9._\-]+(:.+)?@)?[a-zA-Z0-9._\-]+(:[0-9]+)?" value="<?= $options['-b'] ?? "" ?>"
|
||||||
title="[<username>[:<password>]@]<server>[:<port>]">
|
title="[<username>[:<password>]@]<server>[:<port>]">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="sUCheckbox" name="-sU" <?= $options['-sU'] ?? false ? 'checked' : ''; ?> />
|
<input id="sUCheckbox" type="checkbox" name="-sU" <?= $options['-sU'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="sUCheckbox" title="-sO">Scan des protocoles supportés par la couche IP</label>
|
<label for="sUCheckbox" title="-sO">Scan des protocoles supportés par la couche IP</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="title">
|
<div class="title"><i class="icon dropdown"></i>Spécifications des ports et ordre du scan</div>
|
||||||
<i class="icon dropdown"></i>
|
|
||||||
Spécifications des ports et ordre du scan
|
|
||||||
</div>
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<div class="ui toggle checkbox" title="-sP">
|
<div class="ui toggle checkbox" title="-sP">
|
||||||
<input type="checkbox" id="sPCheckbox" name="-sP" <?= $options['-sP'] ?? false ? 'checked' : ''; ?> />
|
<input id="sPCheckbox" type="checkbox" name="-sP" <?= $options['-sP'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="sPCheckbox">Sauter cette étape</label>
|
<label for="sPCheckbox">Sauter cette étape</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<div class="ui toggle checkbox" title="-F">
|
<div class="ui toggle checkbox" title="-F">
|
||||||
<input type="checkbox" id="FCheckbox" name="-F" <?= $options['-F'] ?? false ? 'checked' : ''; ?>
|
<input id="FCheckbox" type="checkbox" name="-F" <?= $options['-F'] ?? false ? 'checked' : ''; ?>
|
||||||
onchange="pInput.disabled = FCheckbox.checked" />
|
onchange="pInput.disabled = FCheckbox.checked" />
|
||||||
<label for="FCheckbox">Scanner les ports connus</label>
|
<label for="FCheckbox">Scanner les ports connus</label>
|
||||||
</div>
|
</div>
|
||||||
@ -291,14 +285,14 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="pInput" title="-p">Scanner les ports</label>
|
<label for="pInput" title="-p">Scanner les ports</label>
|
||||||
<input type="text" id="pInput" name="-p" placeholder="Ports" list="servicesList" <?= $options['-F'] ?? false ? 'disabled' : ''; ?>
|
<input id="pInput" type="text" name="-p" placeholder="Ports" list="servicesList" <?= $options['-F'] ?? false ? 'disabled' : ''; ?>
|
||||||
pattern="(([TU]:)?[0-9\-]+|[a-z\-]+)(,([TU]:)?[0-9\-]+|,[a-z\-]+)*" value="<?= $options['-p'] ?? "" ?>"
|
pattern="(([TU]:)?[0-9\-]+|[a-z\-]+)(,([TU]:)?[0-9\-]+|,[a-z\-]+)*" value="<?= $options['-p'] ?? "" ?>"
|
||||||
title="Liste de ports ex: ssh,ftp,U:53,111,137,T:21-25,80,139,8080">
|
title="Liste de ports ex: ssh,ftp,U:53,111,137,T:21-25,80,139,8080">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<div class="ui toggle checkbox" title="-r">
|
<div class="ui toggle checkbox" title="-r">
|
||||||
<input type="checkbox" id="rCheckbox" name="-r" <?= $options['-r'] ?? false ? 'checked' : ''; ?> />
|
<input id="rCheckbox" type="checkbox" name="-r" <?= $options['-r'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="rCheckbox">Ne pas mélanger les ports</label>
|
<label for="rCheckbox">Ne pas mélanger les ports</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -308,27 +302,27 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<div class="ui toggle checkbox" title="-sV">
|
<div class="ui toggle checkbox" title="-sV">
|
||||||
<input type="checkbox" id="sVCheckbox" name="-sV" <?= $options['-sV'] ?? false ? 'checked' : ''; ?> />
|
<input id="sVCheckbox" type="checkbox" name="-sV" <?= $options['-sV'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="sVCheckbox">Détection de version</label>
|
<label for="sVCheckbox">Détection de version</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="allportsCheckbox" name="--allports" <?= $options['--allports'] ?? false ? 'checked' : ''; ?> />
|
<input id="allportsCheckbox" type="checkbox" name="--allports" <?= $options['--allports'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="allportsCheckbox" title="--allports">N'exclure aucun port de la détection de version</label>
|
<label for="allportsCheckbox" title="--allports">N'exclure aucun port de la détection de version</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="versionIntensityInput" title="--version-intensity">Intensité des tests de version</label>
|
<label for="versionIntensityInput" title="--version-intensity">Intensité des tests de version</label>
|
||||||
<input type="number" min="0" max="9" id="versionIntensityInput" name="--version-intensity" placeholder="Intensité"
|
<input type="number" min="0" max="9" id="versionIntensityInput" name="--version-intensity" placeholder="0-9"
|
||||||
value="<?= $options["--version-intensity"] ?? "" ?>" title="2: léger, 9: tous, défaut: 7">
|
value="<?= $options["--version-intensity"] ?? "" ?>" title="2: léger, 9: tous, défaut: 7">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="sRCheckbox" name="-sR" <?= $options['-sR'] ?? false ? 'checked' : ''; ?> />
|
<input id="sRCheckbox" type="checkbox" name="-sR" <?= $options['-sR'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="sRCheckbox" title="-sR">Scan RPC</label>
|
<label for="sRCheckbox" title="-sR">Scan RPC</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -338,52 +332,66 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="sCCheckbox" name="-sC" <?= $options['-sC'] ?? false ? 'checked' : ''; ?> />
|
<input id="sCCheckbox" type="checkbox" name="-sC" <?= $options['-sC'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="sCCheckbox" title="-sC">Scripts par défaut</label>
|
<label for="sCCheckbox" title="-sC">Scripts par défaut</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="scriptInput">Scripts</label>
|
<label for="scriptInput">Scripts</label>
|
||||||
<input id="scriptInput" type="text" name="--script" placeholder="script"
|
<input id="scriptInput" type="text" name="--script" placeholder="Nom"
|
||||||
title="<catégories|répertoire|nom|all>" list="scripts" pattern="[a-z][a-z0-9\-\.\/]*"
|
title="<catégories|répertoire|nom|all>" list="scripts" pattern="[a-z][a-z0-9\-\.\/]*"
|
||||||
value="<?= htmlentities($options["--script"] ?? "", ENT_QUOTES); ?>">
|
value="<?= $options["--script"] ?? ""; ?>">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="scriptArgsInput" title="--script-args">Arguments des scripts</label>
|
<label for="scriptArgsInput" title="--script-args">Arguments des scripts</label>
|
||||||
<input type="text" id="scriptArgsInput" name="--script-args" placeholder="nom=valeur"
|
<input id="scriptArgsInput" type="text" name="--script-args" placeholder="arg=valeur"
|
||||||
pattern='[a-zA-Z][a-zA-Z0-9\-_]*=[^"]+(,[a-zA-Z][a-zA-Z0-9\-_]*=[^"]+)?' value="<?= $options['--script-args'] ?? "" ?>"
|
pattern='[a-zA-Z][a-zA-Z0-9\-_]*=[^"]+(,[a-zA-Z][a-zA-Z0-9\-_]*=[^"]+)?' value="<?= $options['--script-args'] ?? "" ?>"
|
||||||
title="<n1=v1,[n2=v2,...]>">
|
title="<n1=v1,[n2=v2,...]>">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="inline field">
|
||||||
|
<div class="ui toggle checkbox">
|
||||||
|
<input id="scriptTraceCheckbox" type="checkbox" name="--script-trace" <?= $options['--script-trace'] ?? false ? 'checked' : ''; ?> />
|
||||||
|
<label for="scriptTraceCheckbox" title="--script-trace">Montrer toutes les données envoyées ou recues</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="inline field">
|
||||||
|
<div class="ui toggle checkbox">
|
||||||
|
<input id="scriptUpdateDBCheckbox" type="checkbox" name="--script-updatedb" <?= $options['--script-updatedb'] ?? false ? 'checked' : ''; ?> />
|
||||||
|
<label for="scriptUpdateDBCheckbox" title="--script-updatedb">Mettre à jour la base de données des scripts</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="title"><i class="icon dropdown"></i>Détection du système d'exploitation</div>
|
<div class="title"><i class="icon dropdown"></i>Détection du système d'exploitation</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="OCheckbox" name="-O" <?= $options['-O'] ?? false ? 'checked' : ''; ?> />
|
<input id="OCheckbox" type="checkbox" name="-O" <?= $options['-O'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="OCheckbox" title="-O">Détecter le système d'exploitation</label>
|
<label for="OCheckbox" title="-O">Détecter le système d'exploitation</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="osscan-limitCheckbox" name="--osscan-limit" <?= $options['--osscan-limit'] ?? false ? 'checked' : ''; ?> />
|
<input id="osscanLimitCheckbox" type="checkbox" name="--osscan-limit" <?= $options['--osscan-limit'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="osscan-limitCheckbox" title="--osscan-limit">Seulement les cibles prometteuses</label>
|
<label for="osscanLimitCheckbox" title="--osscan-limit">Seulement les cibles prometteuses</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="osscan-guessCheckbox" name="--osscan-guess" <?= $options['--osscan-guess'] ?? false ? 'checked' : ''; ?> />
|
<input id="osscanGuessCheckbox" type="checkbox" name="--osscan-guess" <?= $options['--osscan-guess'] ?? false ? 'checked' : ''; ?> />
|
||||||
<label for="osscan-guessCheckbox" title="--osscan-guess">Essayer de deviner</label>
|
<label for="osscanGuessCheckbox" title="--osscan-guess">Essayer de deviner</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="maxOSTriesInput" title="--max-os-tries">Nombre d'essais maximum</label>
|
<label for="maxOSTriesInput" title="--max-os-tries">Nombre d'essais maximum</label>
|
||||||
<input type="number" min="0" id="maxOSTriesInput" name="--max-os-tries" placeholder="Nombre d'essais"
|
<input type="number" min="0" id="maxOSTriesInput" name="--max-os-tries" placeholder="Nombre"
|
||||||
value="<?= $options["--max-os-tries"] ?? "" ?>">
|
value="<?= $options["--max-os-tries"] ?? "" ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -392,7 +400,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="TSelect" title="--T">Intensité des tests de version</label>
|
<label for="TSelect" title="--T">Intensité des tests de version</label>
|
||||||
<select class="ui dropdown" id="TSelect" name="-T" value="<?= $options["-T"] ?? ""?>">
|
<select id="TSelect" class="ui clearable dropdown" name="-T" value="<?= $options["-T"] ?? ""?>">
|
||||||
<option value="0"<?=($options["-T"]??"")==0?" selected":""?>>Paranoïaque</option>
|
<option value="0"<?=($options["-T"]??"")==0?" selected":""?>>Paranoïaque</option>
|
||||||
<option value="1"<?=($options["-T"]??"")==1?" selected":""?>>Sournois</option>
|
<option value="1"<?=($options["-T"]??"")==1?" selected":""?>>Sournois</option>
|
||||||
<option value="2"<?=($options["-T"]??"")==2?" selected":""?>>Poli</option>
|
<option value="2"<?=($options["-T"]??"")==2?" selected":""?>>Poli</option>
|
||||||
@ -401,22 +409,182 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
<option value="5"<?=($options["-T"]??"")==5?" selected":""?>>Dément</option>
|
<option value="5"<?=($options["-T"]??"")==5?" selected":""?>>Dément</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="field">
|
||||||
|
<label>Tailles des groupes d'hôtes à scanner en parallèle</label>
|
||||||
|
<div class="two fields">
|
||||||
|
<div class="field">
|
||||||
|
<label for="minHostgroupInput" title="--min-hostgroup">Minimum</label>
|
||||||
|
<input id="minHostgroupInput" type="number" min="0" placeholder="Nombre"
|
||||||
|
value="<?= $options["--min-hostgroup"] ?? "" ?>"
|
||||||
|
oninput="maxHostgroupInput.min = minHostgroupInput.value">
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label for="maxHostgroupInput" title="--max-hostgroup">Maximum</label>
|
||||||
|
<input id="maxHostgroupInput" type="number" min="0" placeholder="Nombre"
|
||||||
|
value="<?= $options["--max-hostgroup"] ?? "" ?>"
|
||||||
|
oninput="minHostgroupInput.max = maxHostgroupInput.value">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field">
|
||||||
|
<label>Parallélisation des paquets de tests</label>
|
||||||
|
<div class="two fields">
|
||||||
|
<div class="field">
|
||||||
|
<label for="minParallelismInput" title="--min-parallelism">Minimum</label>
|
||||||
|
<input id="minParallelismInput" type="number" min="0" placeholder="Nombre"
|
||||||
|
value="<?= $options["--min-parallelism"] ?? "" ?>"
|
||||||
|
oninput="maxParallelismInput.min = minParallelismInput.value">
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label for="maxParallelismInput" title="--max-parallelism">Maximum</label>
|
||||||
|
<input id="maxParallelismInput" type="number" min="0" placeholder="Nombre"
|
||||||
|
value="<?= $options["--max-parallelism"] ?? "" ?>"
|
||||||
|
oninput="minParallelismInput.max = maxParallelismInput.value">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field">
|
||||||
|
<label>Temps d'aller-retour des paquets de tests</label>
|
||||||
|
<div class="three fields">
|
||||||
|
<div class="field">
|
||||||
|
<label for="initialRTTNumber" title="--initial-rtt-timeout">Initial</label>
|
||||||
|
<div class="ui right labeled input">
|
||||||
|
<input type="number" min="0" id="initialRTTNumber" placeholder="Durée"
|
||||||
|
oninput="initialRTTHidden.value = initialRTTNumber.value? initialRTTNumber.value+initialRTTUnit.value: ''; maxRTTHidden.initial=initialRTTHidden.value"
|
||||||
|
<?= preg_match("/^\d+/", $options["--initial-rtt-timeout"] ?? "", $matches) ? "value='{$matches[0]}'" : "" ?>>
|
||||||
|
<select id="initialRTTUnit" class="ui clearable dropdown label"
|
||||||
|
oninput="initialRTTHidden.value = initialRTTNumber.value? initialRTTNumber.value+initialRTTUnit.value: ''">
|
||||||
|
<option value="">ms</option>
|
||||||
|
<option value="s" <?=substr($options["--initial-rtt-timeout"]??"", -1)=="s"?"selected":"" ?>>secondes</option>
|
||||||
|
<option value="m" <?=substr($options["--initial-rtt-timeout"]??"", -1)=="m"?"selected":"" ?>>minutes</option>
|
||||||
|
<option value="h" <?=substr($options["--initial-rtt-timeout"]??"", -1)=="h"?"selected":"" ?>>heures</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<input id="initialRTTHidden" type="hidden" name="--initial-rtt-timeout"
|
||||||
|
value="<?= $options["--initial-rtt-timeout"] ?? "" ?>">
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label for="minRTTNumber" title="--min-rtt-timeout">Minimum</label>
|
||||||
|
<div class="ui right labeled input">
|
||||||
|
<input type="number" min="0" id="minRTTNumber" placeholder="Durée"
|
||||||
|
oninput="minRTTHidden.value = minRTTNumber.value? minRTTNumber.value+minRTTUnit.value: ''; maxRTTHidden.min=minRTTHidden.value"
|
||||||
|
<?= preg_match("/^\d+/", $options["--min-rtt-timeout"] ?? "", $matches) ? "value='{$matches[0]}'" : "" ?>>
|
||||||
|
<select id="minRTTUnit" class="ui clearable dropdown label"
|
||||||
|
oninput="minRTTHidden.value = minRTTNumber.value? minRTTNumber.value+minRTTUnit.value: ''">
|
||||||
|
<option value="">ms</option>
|
||||||
|
<option value="s" <?=substr($options["--min-rtt-timeout"]??"", -1)=="s"?"selected":"" ?>>secondes</option>
|
||||||
|
<option value="m" <?=substr($options["--min-rtt-timeout"]??"", -1)=="m"?"selected":"" ?>>minutes</option>
|
||||||
|
<option value="h" <?=substr($options["--min-rtt-timeout"]??"", -1)=="h"?"selected":"" ?>>heures</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<input id="minRTTHidden" type="hidden" name="--min-rtt-timeout"
|
||||||
|
value="<?= $options["--min-rtt-timeout"] ?? "" ?>">
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label for="maxRTTNumber" title="--max-rtt-timeout">Maximum</label>
|
||||||
|
<div class="ui right labeled input">
|
||||||
|
<input type="number" min="0" id="maxRTTNumber" placeholder="Durée"
|
||||||
|
oninput="maxRTTHidden.value = maxRTTNumber.value? maxRTTNumber.value+maxRTTUnit.value: ''; minRTTHidden.max=maxRTTHidden.value"
|
||||||
|
<?= preg_match("/^\d+/", $options["--max-rtt-timeout"] ?? "", $matches) ? "value='{$matches[0]}'" : "" ?>>
|
||||||
|
<select id="maxRTTUnit" class="ui clearable dropdown label"
|
||||||
|
oninput="maxRTTHidden.value = maxRTTNumber.value? maxRTTNumber.value+maxRTTUnit.value: ''">
|
||||||
|
<option value="">ms</option>
|
||||||
|
<option value="s" <?=substr($options["--max-rtt-timeout"]??"", -1)=="s"?"selected":"" ?>>secondes</option>
|
||||||
|
<option value="m" <?=substr($options["--max-rtt-timeout"]??"", -1)=="m"?"selected":"" ?>>minutes</option>
|
||||||
|
<option value="h" <?=substr($options["--max-rtt-timeout"]??"", -1)=="h"?"selected":"" ?>>heures</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<input id="maxRTTHidden" type="hidden" name="--max-rtt-timeout"
|
||||||
|
value="<?= $options["--max-rtt-timeout"] ?? "" ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field">
|
||||||
|
<label for="maxRetriesInput" title="--max-retries">Nombre de retransmissions des paquets de tests des scans de ports</label>
|
||||||
|
<input type="number" min="0" id="maxRetriesInput" name="--max-retries" placeholder="Nombre"
|
||||||
|
value="<?= $options["--max-retries"] ?? "" ?>">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="field">
|
||||||
|
<label for="hostTimoutInput" title="--host-timeout">Délai d'expiration du scan d'un hôte trop lent</label>
|
||||||
|
<div class="ui right labeled input">
|
||||||
|
<input type="number" min="0" id="hostTimoutNumber" placeholder="Durée"
|
||||||
|
oninput="hostTimoutHidden.value = hostTimoutNumber.value? hostTimoutNumber.value+hostTimoutUnit.value: ''"
|
||||||
|
<?= preg_match("/^\d+/", $options["--host-timeout"] ?? "", $matches) ? "value='{$matches[0]}'" : "" ?>>
|
||||||
|
<select id="hostTimoutUnit" class="ui clearable dropdown label"
|
||||||
|
oninput="hostTimoutHidden.value = hostTimoutNumber.value? hostTimoutNumber.value+hostTimoutUnit.value: ''">
|
||||||
|
<option value="">ms</option>
|
||||||
|
<option value="s" <?=substr($options["--host-timeout"]??"", -1)=="s"?"selected":"" ?>>secondes</option>
|
||||||
|
<option value="m" <?=substr($options["--host-timeout"]??"", -1)=="m"?"selected":"" ?>>minutes</option>
|
||||||
|
<option value="h" <?=substr($options["--host-timeout"]??"", -1)=="h"?"selected":"" ?>>heures</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<input id="hostTimoutHidden" type="hidden" name="--host-timeout"
|
||||||
|
value="<?= $options["--host-timeout"] ?? "" ?>">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="two fields">
|
||||||
|
<div class="field">
|
||||||
|
<label for="scanDelayNumber" title="--scan-delay">Délai entre les paquets de tests</label>
|
||||||
|
<div class="ui right labeled input">
|
||||||
|
<input type="number" min="0" id="scanDelayNumber" placeholder="Durée"
|
||||||
|
oninput="scanDelayHidden.value = scanDelayNumber.value? scanDelayNumber.value+scanDelayUnit.value: ''"
|
||||||
|
<?= preg_match("/^\d+/", $options["--scan-delay"] ?? "", $matches) ? "value='{$matches[0]}'" : "" ?>>
|
||||||
|
<select id="scanDelayUnit" class="ui clearable dropdown label"
|
||||||
|
oninput="scanDelayHidden.value = scanDelayNumber.value? scanDelayNumber.value+scanDelayUnit.value: ''">
|
||||||
|
<option value="">ms</option>
|
||||||
|
<option value="s" <?=substr($options["--scan-delay"]??"", -1)=="s"?"selected":"" ?>>secondes</option>
|
||||||
|
<option value="m" <?=substr($options["--scan-delay"]??"", -1)=="m"?"selected":"" ?>>minutes</option>
|
||||||
|
<option value="h" <?=substr($options["--scan-delay"]??"", -1)=="h"?"selected":"" ?>>heures</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<input id="scanDelayHidden" type="hidden" name="--scan-delay"
|
||||||
|
value="<?= $options["--scan-delay"] ?? "" ?>">
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label for="maxScanDelay" title="--max-scan-delay">Maximum</label>
|
||||||
|
<div class="ui right labeled input">
|
||||||
|
<input type="number" min="0" id="maxScanDelay" placeholder="Durée"
|
||||||
|
oninput="maxRTTHidden.value = maxScanDelay.value? maxScanDelay.value+maxRTTUnit.value: ''"
|
||||||
|
<?= preg_match("/^\d+/", $options["--max-scan-delay"] ?? "", $matches) ? "value='{$matches[0]}'" : "" ?>>
|
||||||
|
<select id="maxRTTUnit" class="ui clearable dropdown label"
|
||||||
|
oninput="maxRTTHidden.value = maxScanDelay.value? maxScanDelay.value+maxRTTUnit.value: ''">
|
||||||
|
<option value="">ms</option>
|
||||||
|
<option value="s" <?=substr($options["--max-scan-delay"]??"", -1)=="s"?"selected":"" ?>>secondes</option>
|
||||||
|
<option value="m" <?=substr($options["--max-scan-delay"]??"", -1)=="m"?"selected":"" ?>>minutes</option>
|
||||||
|
<option value="h" <?=substr($options["--max-scan-delay"]??"", -1)=="h"?"selected":"" ?>>heures</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<input id="maxRTTHidden" type="hidden" name="--max-scan-delay"
|
||||||
|
value="<?= $options["--max-scan-delay"] ?? "" ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="inline field">
|
||||||
|
<div class="ui toggle checkbox">
|
||||||
|
<input id="defeatRSTRateLimitCheckbox" type="checkbox" name="--defeat-rst-ratelimit" <?= $options['--defeat-rst-ratelimit'] ?? false ? 'checked' : ''; ?> />
|
||||||
|
<label for="defeatRSTRateLimitCheckbox" title="--defeat-rst-ratelimit">Ignorer les limitations de paquets RST</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="title"><i class="icon dropdown"></i>Divers</div>
|
<div class="title"><i class="icon dropdown"></i>Divers</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="stylesheetSelect" title="--stylesheet">Feuille de style</label>
|
<label for="stylesheetSelect" title="--stylesheet">Feuille de style</label>
|
||||||
<select class="ui dropdown" id="stylesheetSelect" name="--stylesheet" value="<?= $options["--stylesheet"] ?? ""?>">
|
<select id="stylesheetSelect" class="ui dropdown" name="--stylesheet" value="<?= $options["--stylesheet"] ?? ""?>">
|
||||||
<?php
|
<?php
|
||||||
foreach (scandir('templates') as $filename) {
|
foreach (scandir($TEMPLATESDIR) as $filename) {
|
||||||
if (substr($filename, -4) === '.xsl') {
|
if (substr($filename, -4) === '.xsl') {
|
||||||
$name = substr($filename, 0, -4);
|
$name = substr($filename, 0, -4);
|
||||||
$URL = htmlentities("$BASEDIR/templates/$filename", ENT_QUOTES);
|
#$URL = rawurlencode($filename);
|
||||||
if (isset($options["--stylesheet"]) && $URL == $options["--stylesheet"]) {
|
if (isset($options["--stylesheet"]) && $name == $options["--stylesheet"]) {
|
||||||
echo " <option value='$URL' selected>$name</option>\n";
|
echo " <option value='$name' selected>$name</option>\n";
|
||||||
} else {
|
} else {
|
||||||
echo " <option value='$URL'>$name</option>\n";
|
echo " <option value='$name'>$name</option>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -425,19 +593,19 @@ foreach (scandir('templates') as $filename) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="compareWithSelect">Comparer avec un précédent scan</label>
|
<label for="originalSelect">Comparer avec un précédent scan</label>
|
||||||
<select class="ui dropdown" id="compareWithSelect" name="compareWith" value="<?= $options["compareWith"] ?? "" ?>">
|
<select id="originalSelect" class="ui clearable dropdown" name="original" value="<?= $options["original"] ?? "" ?>">
|
||||||
<option value="">Précédent scan</option>
|
<option value="">Précédent scan</option>
|
||||||
<?php
|
<?php
|
||||||
if (!file_exists($SCANSDIR)) mkdir($SCANSDIR);
|
if (!file_exists($SCANSDIR)) mkdir($SCANSDIR);
|
||||||
foreach (scandir($SCANSDIR) as $filename) {
|
foreach (scandir($SCANSDIR) as $filename) {
|
||||||
if (substr($filename, -4) === '.xml') {
|
if (substr($filename, -4) === '.xml') {
|
||||||
$name = substr($filename, 0, -4);
|
$name = substr($filename, 0, -4);
|
||||||
$URL = htmlentities("$BASEDIR/$SCANSDIR/$filename", ENT_QUOTES);
|
#$URL = "$BASEDIR/$SCANSDIR/".rawurlencode($filename);
|
||||||
if (isset($options["compareWith"]) && $URL == $options["compareWith"]) {
|
if (isset($options["original"]) && $name == $options["original"]) {
|
||||||
echo " <option value='$URL' selected>$name</option>\n";
|
echo " <option value='$name' selected>$name</option>\n";
|
||||||
} else {
|
} else {
|
||||||
echo " <option value='$URL'>$name</option>\n";
|
echo " <option value='$name'>$name</option>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -448,49 +616,45 @@ foreach (scandir($SCANSDIR) as $filename) {
|
|||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="refreshPeriodInput">Rafraîchir toutes les</label>
|
<label for="refreshPeriodInput">Rafraîchir toutes les</label>
|
||||||
<div class="ui right labeled input">
|
<div class="ui right labeled input">
|
||||||
<input type="number" min="0" id="refreshPeriodInput" name="refreshPeriod" placeholder="Période"
|
<input id="refreshPeriodInput" type="number" min="0" name="refreshPeriod" placeholder="Période"
|
||||||
value="<?= $options["refreshPeriod"] ?? "" ?>">
|
value="<?= $options["refreshPeriod"] ?? "" ?>">
|
||||||
<div class="ui label">secondes</div>
|
<div class="ui label">secondes</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!--
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<div class="ui toggle checkbox">
|
<div class="ui toggle checkbox">
|
||||||
<input type="checkbox" id="sudoCheckbox" name="sudo" <?= $options["sudo"] ?? false ? 'checked' : ''; ?>/>
|
<input id="sudoCheckbox" type="checkbox" name="sudo" <?= $options["sudo"] ?? false ? 'checked' : ''; ?>/>
|
||||||
<label for="sudoCheckbox" title="sudo">Exécuter en tant qu'administrateur</label>
|
<label for="sudoCheckbox" title="sudo">Exécuter en tant qu'administrateur</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label for="saveAsInput">Enregistrer sous le nom</label>
|
<label for="nameInput">Enregistrer sous le nom</label>
|
||||||
<input id="saveAsInput" type="text" name="saveAs" placeholder="Réseau local" pattern='[^<>:"\\\/\|@?]+'
|
<input id="nameInput" type="text" name="name" placeholder="Réseau local" pattern='[^<>:"\\\/\|@?]+'
|
||||||
title="Caractères interdits : <>:"\/|@?"
|
title="Caractères interdits : <>:"\/|@?"
|
||||||
value="<?= htmlentities($options["saveAs"] ?? "", ENT_QUOTES); ?>">
|
value="<?= $options["name"] ?? ""; ?>">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit" class="ui teal submit button">Démarrer</button>
|
<button type="submit" class="ui teal submit button">Démarrer</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<h2 class="ui header">Scans enregistrés</h1>
|
<h2 class="ui header">Scans enregistrés</h2>
|
||||||
<div class="ui large relaxed card">
|
<div class="ui link list">
|
||||||
<div class="content">
|
|
||||||
<div class="ui divided link list">
|
|
||||||
<?php
|
<?php
|
||||||
if (!file_exists($SCANSDIR)) {
|
if (file_exists($SCANSDIR)) {
|
||||||
mkdir($SCANSDIR);
|
|
||||||
}
|
|
||||||
foreach (scandir($SCANSDIR) as $filename) {
|
foreach (scandir($SCANSDIR) as $filename) {
|
||||||
if (substr($filename, -4) == '.xml') {
|
if (substr($filename, -4) == '.xml') {
|
||||||
$name = str_replace('!', '/', substr_replace($filename, '', -4));
|
$name = str_replace('!', '/', substr_replace($filename, '', -4));
|
||||||
echo "<a class='item' href='".htmlentities("$SCANSDIR/$filename", ENT_QUOTES)."'>$name</a>\n";
|
echo "<a class='item' href='$SCANSDIR/".rawurlencode($filename)."'>$name</a>\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer class="ui footer segment">
|
<footer class="ui footer segment">
|
||||||
@ -573,10 +737,12 @@ foreach ([$DATADIR, $NMAPDIR] as $dir) {
|
|||||||
|
|
||||||
$(".ui.accordion").accordion()
|
$(".ui.accordion").accordion()
|
||||||
|
|
||||||
$("#stylesheetSelect").dropdown()
|
$(".ui.clearable.dropdown").dropdown({
|
||||||
$("#compareWithSelect").dropdown({
|
|
||||||
clearable: true
|
clearable: true
|
||||||
})
|
})
|
||||||
|
$(".ui:not(.clearable).dropdown").dropdown({
|
||||||
|
clearable: false
|
||||||
|
})
|
||||||
|
|
||||||
new TagsInput(targetsInput, {}, " ")
|
new TagsInput(targetsInput, {}, " ")
|
||||||
new TagsInput(excludeInput)
|
new TagsInput(excludeInput)
|
||||||
@ -597,6 +763,15 @@ foreach ([$DATADIR, $NMAPDIR] as $dir) {
|
|||||||
newScanForm.onsubmit = function(event) {
|
newScanForm.onsubmit = function(event) {
|
||||||
if (this.checkValidity()) {
|
if (this.checkValidity()) {
|
||||||
newScanForm.classList.add("loading")
|
newScanForm.classList.add("loading")
|
||||||
|
$.toast({
|
||||||
|
title : 'Scan en cours...',
|
||||||
|
message : 'Merci de patienter',
|
||||||
|
class : 'info',
|
||||||
|
showIcon : 'satellite dish',
|
||||||
|
displayTime: 0,
|
||||||
|
closeIcon : true,
|
||||||
|
position : 'bottom right',
|
||||||
|
})
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<nav class="ui inverted teal fixed menu">
|
<nav class="ui inverted teal menu">
|
||||||
<a class="ui teal button item" href=".">
|
<a class="ui teal button item" href=".">
|
||||||
lan<?php include 'logo.svg'; ?>can
|
lan<?php include 'logo.svg'; ?>can
|
||||||
</a>
|
</a>
|
||||||
@ -32,7 +32,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
|
|||||||
</div>
|
</div>
|
||||||
<button id="hiddenButton" style="display: none;" type="submit" formmethod="get" formaction="scan.php"></button>
|
<button id="hiddenButton" style="display: none;" type="submit" formmethod="get" formaction="scan.php"></button>
|
||||||
<button class="ui teal icon submit button" type="submit" formmethod="get" formaction="options.php" onclick="targetsInput.required=false">
|
<button class="ui teal icon submit button" type="submit" formmethod="get" formaction="options.php" onclick="targetsInput.required=false">
|
||||||
<i class="sliders horizontal icon"></i>
|
<i class="settings icon"></i>
|
||||||
</button>
|
</button>
|
||||||
<a class="ui teal icon button" href="https://nmap.org/man/fr/index.html" target="_blank">
|
<a class="ui teal icon button" href="https://nmap.org/man/fr/index.html" target="_blank">
|
||||||
<i class="question circle icon"></i>
|
<i class="question circle icon"></i>
|
||||||
|
57
scan.php
57
scan.php
@ -3,9 +3,18 @@
|
|||||||
include_once 'config.php';
|
include_once 'config.php';
|
||||||
include_once 'filter_inputs.php';
|
include_once 'filter_inputs.php';
|
||||||
|
|
||||||
if (!file_exists($SCANSDIR)) mkdir($SCANSDIR);
|
$options["--stylesheet"] = "$BASEDIR/$TEMPLATESDIR/${options["--stylesheet"]}.xsl#";
|
||||||
|
if (isset($options["name"])) {
|
||||||
|
$options["--stylesheet"] .= "name=" . rawurlencode($options["name"]) . "&";
|
||||||
|
}
|
||||||
|
if (isset($options["original"])) {
|
||||||
|
$options["--stylesheet"] .= "original=" . rawurlencode($options["original"]) . "&";
|
||||||
|
}
|
||||||
|
if (isset($options["refreshPeriod"])) {
|
||||||
|
$options["--stylesheet"] .= "refreshPeriod={$options["refreshPeriod"]}&";
|
||||||
|
}
|
||||||
|
|
||||||
$command = ($options["sudo"]?? false ? "sudo " : "") . "nmap";
|
$args = "";
|
||||||
foreach ($options as $option => $value) {
|
foreach ($options as $option => $value) {
|
||||||
if (substr($option, 0, 1) == '-') {
|
if (substr($option, 0, 1) == '-') {
|
||||||
if (is_null($value)) {
|
if (is_null($value)) {
|
||||||
@ -15,47 +24,25 @@ foreach ($options as $option => $value) {
|
|||||||
die();
|
die();
|
||||||
} else if ($value) {
|
} else if ($value) {
|
||||||
if ($value === true) {
|
if ($value === true) {
|
||||||
$command .= " $option";
|
$args .= " $option";
|
||||||
} else {
|
} else {
|
||||||
if (substr($option, 0, 2) == '--') $command .= " $option " . escapeshellarg($value);
|
if (substr($option, 0, 2) == '--') $args .= " $option " . escapeshellarg($value);
|
||||||
else $command .= " $option" . escapeshellarg($value);
|
else $args .= " $option" . escapeshellarg($value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$tempPath = tempnam(sys_get_temp_dir(), 'scan_').".xml";
|
|
||||||
|
|
||||||
$command .= " -oX '$tempPath' $targets 2>&1";
|
$command = "$NMAP $args -oX - $targets";
|
||||||
|
|
||||||
exec($command, $stderr, $retcode);
|
if (isset($options["name"])) {
|
||||||
|
if (!file_exists($SCANSDIR)) mkdir($SCANSDIR);
|
||||||
if ($retcode) {
|
$path = "$SCANSDIR/{$options["name"]}.xml";
|
||||||
http_response_code(500);
|
$command .= " | tee '$path'";
|
||||||
$errorMessage = implode("<br/>\n", $stderr);
|
|
||||||
include_once ".";
|
|
||||||
die();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$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);
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($options["saveAs"] ?? false) {
|
|
||||||
$path = "$SCANSDIR/{$options["saveAs"]}.xml";
|
|
||||||
$xml->save($path);
|
|
||||||
|
|
||||||
header("Location: $path");
|
|
||||||
exit();
|
|
||||||
} else {
|
|
||||||
header('Content-type: text/xml');
|
header('Content-type: text/xml');
|
||||||
exit($xml->saveXML());
|
system($command, $retcode);
|
||||||
}
|
|
||||||
|
exit();
|
||||||
|
0
script-args.ini
Normal file
0
script-args.ini
Normal file
@ -23,7 +23,7 @@ categories = {"discovery", "intrusive"}
|
|||||||
author = "Adrien Malingrey"
|
author = "Adrien Malingrey"
|
||||||
license = "Same as Nmap--See https://nmap.org/book/man-legal.html"
|
license = "Same as Nmap--See https://nmap.org/book/man-legal.html"
|
||||||
|
|
||||||
portrule = shortport.service({"http", "https", "ssl"})
|
portrule = shortport.http
|
||||||
|
|
||||||
local http = require "http"
|
local http = require "http"
|
||||||
local stdnse = require "stdnse"
|
local stdnse = require "stdnse"
|
||||||
@ -32,28 +32,28 @@ action = function(host, port)
|
|||||||
local scheme = ""
|
local scheme = ""
|
||||||
local hostaddress = (host.name ~= '' and host.name) or host.ip
|
local hostaddress = (host.name ~= '' and host.name) or host.ip
|
||||||
local path = "/"
|
local path = "/"
|
||||||
local uri
|
|
||||||
local favicon_relative_uri = "/favicon.ico"
|
local favicon_relative_uri = "/favicon.ico"
|
||||||
local favicon
|
local favicon
|
||||||
|
|
||||||
|
stdnse.debug1("port", port.service)
|
||||||
if (port.service == "ssl") then
|
if (port.service == "ssl") then
|
||||||
scheme = "https"
|
scheme = "https"
|
||||||
else
|
else
|
||||||
scheme = port.service
|
scheme = port.service
|
||||||
end
|
end
|
||||||
|
stdnse.debug1("scheme", scheme)
|
||||||
|
|
||||||
if(stdnse.get_script_args('http-get.path')) then
|
if(stdnse.get_script_args('http-get.path')) then
|
||||||
path = stdnse.get_script_args('http-info.path')
|
path = stdnse.get_script_args('http-info.path')
|
||||||
end
|
end
|
||||||
|
|
||||||
uri = scheme.."://"..hostaddress..":"..port.number..path
|
stdnse.debug1("Try to download %s", path)
|
||||||
stdnse.debug1("Try to download %s", uri)
|
local answer = http.get(hostaddress, port, path)
|
||||||
local answer = http.get_url(uri, {})
|
|
||||||
|
|
||||||
local output = {status=answer.status, ["status-line"]=answer["status-line"]}
|
local output = {status=answer.status, ["status-line"]=answer["status-line"]}
|
||||||
|
|
||||||
if (answer and answer.status == 200) then
|
if (answer and answer.status == 200) then
|
||||||
stdnse.debug1("[SUCCESS] Load page %s", uri)
|
stdnse.debug1("[SUCCESS] Load page %s", path)
|
||||||
-- Taken from http-title.nse by Diman Todorov
|
-- Taken from http-title.nse by Diman Todorov
|
||||||
local title = string.match(answer.body, "<[Tt][Ii][Tt][Ll][Ee][^>]*>([^<]*)</[Tt][Ii][Tt][Ll][Ee]>")
|
local title = string.match(answer.body, "<[Tt][Ii][Tt][Ll][Ee][^>]*>([^<]*)</[Tt][Ii][Tt][Ll][Ee]>")
|
||||||
if (title) then
|
if (title) then
|
||||||
@ -62,17 +62,16 @@ action = function(host, port)
|
|||||||
stdnse.debug1("[INFO] Try favicon %s", favicon_relative_uri)
|
stdnse.debug1("[INFO] Try favicon %s", favicon_relative_uri)
|
||||||
favicon_relative_uri = parseIcon(answer.body) or favicon_relative_uri
|
favicon_relative_uri = parseIcon(answer.body) or favicon_relative_uri
|
||||||
else
|
else
|
||||||
stdnse.debug1("[ERROR] Can't load page %s", uri)
|
stdnse.debug1("[ERROR] Can't load page %s", path)
|
||||||
end
|
end
|
||||||
|
|
||||||
favicon_absolute_uri = scheme.."://"..hostaddress..":"..port.number..favicon_relative_uri
|
favicon = http.get(hostaddress, port, favicon_relative_uri)
|
||||||
favicon = http.get_url(favicon_absolute_uri, {})
|
|
||||||
|
|
||||||
if (favicon and favicon.status == 200) then
|
if (favicon and favicon.status == 200) then
|
||||||
stdnse.debug1("[SUCCESS] Load favicon %s", favicon_absolute_uri)
|
stdnse.debug1("[SUCCESS] Load favicon %s", favicon_relative_uri)
|
||||||
output.favicon = favicon_absolute_uri
|
output.favicon = favicon_relative_uri
|
||||||
else
|
else
|
||||||
stdnse.debug1("[ERROR] Can't load favicon %s", favicon_absolute_uri)
|
stdnse.debug1("[ERROR] Can't load favicon %s", favicon_relative_uri)
|
||||||
end
|
end
|
||||||
|
|
||||||
return output
|
return output
|
@ -28,7 +28,7 @@ local stdnse = require "stdnse"
|
|||||||
local smb = require "smb"
|
local smb = require "smb"
|
||||||
local smb2 = require "smb2"
|
local smb2 = require "smb2"
|
||||||
local msrpc = require "msrpc"
|
local msrpc = require "msrpc"
|
||||||
local string = require "string"
|
local bin = require "bin"
|
||||||
|
|
||||||
action = function(host)
|
action = function(host)
|
||||||
local status, shares, extra
|
local status, shares, extra
|
||||||
@ -76,7 +76,7 @@ function get_share_info(host, share)
|
|||||||
|
|
||||||
stdnse.debug1("SMB: Getting information for share: %s", path)
|
stdnse.debug1("SMB: Getting information for share: %s", path)
|
||||||
|
|
||||||
local status, err = send_transaction2(smbstate, TRANS2_QUERY_FS_INFORMATION, string.pack("<S", SMB_QUERY_FS_SIZE_INFO))
|
local status, err = send_transaction2(smbstate, TRANS2_QUERY_FS_INFORMATION, bin.pack("<S", SMB_QUERY_FS_SIZE_INFO))
|
||||||
if ( not(status) ) then
|
if ( not(status) ) then
|
||||||
status, err = smb.stop(smbstate)
|
status, err = smb.stop(smbstate)
|
||||||
return false, "Failed to send data to server: send_transaction2"
|
return false, "Failed to send data to server: send_transaction2"
|
3
server.php
Normal file
3
server.php
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
print_r($_SERVER);
|
75
style.css
75
style.css
@ -1,11 +1,24 @@
|
|||||||
svg {
|
:root{
|
||||||
margin: -.3em -.5em -.5em -.4em;
|
--nav-height: 3.6rem;
|
||||||
fill: currentColor;
|
--footer-height: 3.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
height: var(--nav-height);
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
padding-top: 7em;
|
padding-top: var(--nav-height);
|
||||||
min-height: calc(100vh - 4.4285em - 2px);
|
min-height: calc(100vh - var(--footer-height) - 1rem)
|
||||||
|
}
|
||||||
|
|
||||||
|
h1:first-child, h2:first-child, h3:first-child, h4:first-child, h5:first-child, .ui.header:first-child {
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
margin: -0.3em -0.5em -0.5em -0.4em;
|
||||||
|
fill: currentColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui.footer.segment {
|
.ui.footer.segment {
|
||||||
@ -14,10 +27,10 @@ main {
|
|||||||
|
|
||||||
.tagify {
|
.tagify {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: .28571429rem;
|
border-radius: 0.28571429rem;
|
||||||
--tags-focus-border-color: #85b7d9;
|
--tags-focus-border-color: #85b7d9;
|
||||||
--placeholder-color: rgba(191,191,191,.87);
|
--placeholder-color: rgba(191, 191, 191, 0.87);
|
||||||
--placeholder-color-focus: rgba(115,115,115,.87);
|
--placeholder-color-focus: rgba(115, 115, 115, 0.87);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui.table {
|
.ui.table {
|
||||||
@ -25,11 +38,11 @@ main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ui.label {
|
.ui.label {
|
||||||
margin: .14285714em;
|
margin: 0.14285714em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui.label > .detail {
|
.ui.label > .detail {
|
||||||
margin-left: .3em;
|
margin-left: 0.3em;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,6 +54,14 @@ main {
|
|||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ui.dropdown.label {
|
||||||
|
min-width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui.dropdown.label > .remove.icon {
|
||||||
|
right: 2.3em;
|
||||||
|
}
|
||||||
|
|
||||||
.toast-container .ui.header {
|
.toast-container .ui.header {
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
@ -49,5 +70,37 @@ main {
|
|||||||
--free-ratio: calc(var(--free) / var(--total));
|
--free-ratio: calc(var(--free) / var(--total));
|
||||||
--used-percent: calc(100% - 100% * var(--free-ratio));
|
--used-percent: calc(100% - 100% * var(--free-ratio));
|
||||||
--color: hsl(calc(120 * var(--free-ratio)) 100% 50%);
|
--color: hsl(calc(120 * var(--free-ratio)) 100% 50%);
|
||||||
background-image: linear-gradient(to right, var(--color) var(--used-percent), transparent var(--used-percent), transparent) !important;
|
background-image: linear-gradient(
|
||||||
|
to right,
|
||||||
|
var(--color) var(--used-percent),
|
||||||
|
transparent var(--used-percent),
|
||||||
|
transparent
|
||||||
|
) !important;
|
||||||
|
text-align: center !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.compact {
|
||||||
|
position: static !important;
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.compact > input {
|
||||||
|
min-width: 10em;
|
||||||
|
padding-right: 0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.compact .ui.buttons .mini.button {
|
||||||
|
padding: 0.5em;
|
||||||
|
position: static;
|
||||||
|
}
|
||||||
|
|
||||||
|
.compact .ui.dropdown.button:not(.pointing):not(.floating).active {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.compact .ui.dropdown .menu {
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
margin: -.7em .7em;
|
||||||
|
min-width: auto;
|
||||||
}
|
}
|
@ -4,26 +4,28 @@
|
|||||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
version="1.1">
|
version="1.1">
|
||||||
|
|
||||||
<xsl:import href="lib/parseCommand.xsl"/>
|
<xsl:import href="lib/head.xsl"/>
|
||||||
<xsl:import href="lib/serviceLabel.xsl"/>
|
<xsl:import href="lib/nav.xsl"/>
|
||||||
|
<xsl:import href="lib/service.xsl"/>
|
||||||
|
<xsl:import href="lib/toast.xsl"/>
|
||||||
|
|
||||||
<xsl:output method="html" encoding="UTF-8"/>
|
<xsl:output method="html" encoding="UTF-8"/>
|
||||||
<xsl:output indent="yes"/>
|
<xsl:output indent="yes"/>
|
||||||
<xsl:strip-space elements='*'/>
|
<xsl:strip-space elements='*'/>
|
||||||
|
|
||||||
<xsl:param name="savedAs" select=""/>
|
<xsl:param name="thisURL" select=""/>
|
||||||
<xsl:param name="compareWith" select=""/>
|
<xsl:param name="originalURL" select=""/>
|
||||||
<xsl:param name="refreshPeriod" select="0"/>
|
<xsl:param name="refreshPeriod" select="0"/>
|
||||||
<xsl:param name="sudo" select="false"/>
|
<xsl:param name="sudo" select="false"/>
|
||||||
|
|
||||||
<xsl:variable name="current" select="./nmaprun"/>
|
<xsl:variable name="current" select="./nmaprun"/>
|
||||||
<xsl:variable name="stylesheetURL" select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'href="'),'"')"/>
|
<xsl:variable name="stylesheetURL" select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'href="'), '?')"/>
|
||||||
<xsl:variable name="basedir" select="concat($stylesheetURL, '/../..')"/>
|
<xsl:variable name="basedir" select="concat($stylesheetURL, '/../..')"/>
|
||||||
<xsl:variable name="init" select="document($compareWith)/nmaprun"/>
|
<xsl:variable name="init" select="document($originalURL)/nmaprun"/>
|
||||||
<xsl:variable name="nextCompareWith">
|
<xsl:variable name="nextComparison">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$savedAs"><xsl:value-of select="$savedAs"/></xsl:when>
|
<xsl:when test="$thisURL"><xsl:value-of select="$thisURL"/></xsl:when>
|
||||||
<xsl:when test="$compareWith"><xsl:value-of select="$compareWith"/></xsl:when>
|
<xsl:when test="$originalURL"><xsl:value-of select="$originalURL"/></xsl:when>
|
||||||
<xsl:otherwise></xsl:otherwise>
|
<xsl:otherwise></xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
@ -32,84 +34,22 @@
|
|||||||
<xsl:variable name="targets" select="substring-after(@args, '.xml ')"/>
|
<xsl:variable name="targets" select="substring-after(@args, '.xml ')"/>
|
||||||
|
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
<head>
|
<xsl:apply-templates select="." mode="head">
|
||||||
<meta charset="utf-8"/>
|
<xsl:with-param name="basedir" select="$basedir"/>
|
||||||
<xsl:if test="$refreshPeriod > 0">
|
<xsl:with-param name="targets" select="$targets"/>
|
||||||
<meta http-equiv="refresh">
|
<xsl:with-param name="nextComparison" select="$nextComparison"/>
|
||||||
<xsl:attribute name="content">
|
<xsl:with-param name="refreshPeriod" select="$refreshPeriod"/>
|
||||||
<xsl:value-of select="$refreshPeriod"/>
|
<xsl:with-param name="sudo" select="$sudo"/>
|
||||||
<xsl:text>;URL=</xsl:text>
|
</xsl:apply-templates>
|
||||||
<xsl:value-of select="$basedir"/>
|
|
||||||
<xsl:text>/scan.php?targets=</xsl:text>
|
|
||||||
<xsl:value-of select="$targets"/>
|
|
||||||
<xsl:text>&</xsl:text>
|
|
||||||
<xsl:call-template name="parseCommand">
|
|
||||||
<xsl:with-param name="argList" select="substring-before(substring-after(@args, ' -'), ' -oX')"/>
|
|
||||||
<xsl:with-param name="asURL" select="true()"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
<xsl:text>compareWith=</xsl:text>
|
|
||||||
<xsl:value-of select="$nextCompareWith"/>
|
|
||||||
<xsl:text>&refreshPeriod=</xsl:text>
|
|
||||||
<xsl:value-of select="$refreshPeriod"/>
|
|
||||||
<xsl:text>&sudo=</xsl:text>
|
|
||||||
<xsl:value-of select="$sudo"/>
|
|
||||||
</xsl:attribute>
|
|
||||||
</meta>
|
|
||||||
</xsl:if>
|
|
||||||
<title>
|
|
||||||
<xsl:text>lanScan - </xsl:text>
|
|
||||||
<xsl:value-of select="$targets"/>
|
|
||||||
</title>
|
|
||||||
<link rel="icon" href="{$basedir}/favicon.ico"/>
|
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.9.3/dist/semantic.min.css"/>
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.css" rel="stylesheet" type="text/css"/>
|
|
||||||
<link href="https://cdn.datatables.net/v/se/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/cr-2.0.4/fc-5.0.3/fh-4.0.1/r-3.0.3/datatables.min.css" rel="stylesheet"/>
|
|
||||||
<link href="{$basedir}/style.css" rel="stylesheet" type="text/css"/>
|
|
||||||
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.2/semantic.min.js"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.polyfills.min.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
|
|
||||||
<script src="https://cdn.datatables.net/v/se/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/cr-2.0.4/fc-5.0.3/fh-4.0.1/r-3.0.3/datatables.min.js"></script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<nav class="ui inverted teal fixed menu">
|
<xsl:apply-templates select="." mode="nav">
|
||||||
<a class="ui teal button item" href="{$basedir}">
|
<xsl:with-param name="basedir" select="$basedir"/>
|
||||||
<xsl:text>lan</xsl:text>
|
<xsl:with-param name="targets" select="$targets"/>
|
||||||
<svg class="logo" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 24 24" xml:space="preserve" width="40" height="40" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs206"/><g id="g998" transform="matrix(0,0.04687491,-0.04687491,0,24,2.2682373e-5)"><g id="g147"><g id="g145"><path d="m 322.065,92.046 c -46.24,0 -83.851,37.619 -83.851,83.857 v 168.712 c 0,25.224 -21.148,45.745 -46.372,45.745 -25.224,0 -46.372,-20.521 -46.372,-45.745 V 199.464 h -38.114 v 145.151 c 0,46.24 38.246,83.859 84.486,83.859 46.24,0 84.486,-37.619 84.486,-83.859 V 175.903 c 0,-25.223 20.514,-45.743 45.737,-45.743 25.223,0 45.737,20.521 45.737,45.743 v 134.092 h 38.114 V 175.903 c 0,-46.239 -37.611,-83.857 -83.851,-83.857 z" id="path143"/></g></g><g id="g153"><g id="g151"><path d="M 144.198,0 H 108.625 C 98.101,0 89.568,8.746 89.568,19.271 c 0,1.157 0.121,2.328 0.318,3.598 h 73.052 c 0.197,-1.27 0.318,-2.441 0.318,-3.598 C 163.256,8.746 154.723,0 144.198,0 Z" id="path149"/></g></g><g id="g159"><g id="g157"><path d="m 420.183,486.591 h -71.731 c -0.626,2.541 -0.978,4.077 -0.978,6.176 0,10.525 8.532,19.234 19.057,19.234 h 35.573 c 10.525,0 19.057,-8.709 19.057,-19.234 0,-2.098 -0.352,-3.635 -0.978,-6.176 z" id="path155"/></g></g><g id="g165"><g id="g163"><rect x="87.027" y="41.925999" width="80.040001" height="138.481" id="rect161"/></g></g><g id="g171"><g id="g169"><rect x="344.93301" y="329.052" width="80.040001" height="138.481" id="rect167"/></g></g><g id="g173"></g><g id="g175"></g><g id="g177"></g><g id="g179"></g><g id="g181"></g><g id="g183"></g><g id="g185"></g><g id="g187"></g><g id="g189"></g><g id="g191"></g><g id="g193"></g><g id="g195"></g><g id="g197"></g><g id="g199"></g><g id="g201"></g></g></svg>
|
<xsl:with-param name="nextComparison" select="$nextComparison"/>
|
||||||
<xsl:text>can</xsl:text>
|
<xsl:with-param name="refreshPeriod" select="$refreshPeriod"/>
|
||||||
</a>
|
<xsl:with-param name="sudo" select="$sudo"/>
|
||||||
<form id="lanScanForm" class="right menu">
|
</xsl:apply-templates>
|
||||||
<xsl:call-template name="parseCommand">
|
|
||||||
<xsl:with-param name="argList" select="substring-before(substring-after(@args, ' -'), ' -oX')"/>
|
|
||||||
<xsl:with-param name="asURL" select="false()"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
<div class="ui category search item">
|
|
||||||
<div id="targetsInputDiv" class="ui icon input">
|
|
||||||
<input class="prompt" type="text" id="targetsInput" name="targets" oninput="hiddenInput.value=this.value"
|
|
||||||
pattern="[a-zA-Z0-9._\/ \-]+" value="{$targets}" placeholder="Scanner un réseau..."
|
|
||||||
title="Les cibles peuvent être spécifiées par des noms d'hôtes, des adresses IP, des adresses de réseaux, etc.
|
|
||||||
Exemples: 192.168.1.0/24 scanme.nmap.org 10.0-255.0-255.1-254"/>
|
|
||||||
<i class="satellite dish icon"></i>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" name="compareWith" value="{$nextCompareWith}"/>
|
|
||||||
<input type="hidden" name="refreshPeriod" value="{$refreshPeriod}"/>
|
|
||||||
<input type="hidden" name="sudo" value="{$sudo}"/>
|
|
||||||
<button id="hiddenButton" style="display: none;" type="submit" formmethod="get" formaction="{$basedir}/scan.php"></button>
|
|
||||||
<button id="refreshButton" class="ui teal icon submit button" type="submit" formmethod="get" formaction="{$basedir}/scan.php">
|
|
||||||
<i class="sync icon"></i>
|
|
||||||
</button>
|
|
||||||
<button class="ui teal icon submit button" type="submit" formmethod="get" formaction="{$basedir}/">
|
|
||||||
<i class="sliders horizontal icon"></i>
|
|
||||||
</button>
|
|
||||||
<a class="ui teal icon button" href="https://nmap.org/man/fr/index.html" target="_blank">
|
|
||||||
<i class="question circle icon"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<main class="ui wide container">
|
<main class="ui wide container">
|
||||||
<div class="ui header container">
|
<div class="ui header container">
|
||||||
@ -130,65 +70,6 @@ Exemples: 192.168.1.0/24 scanme.nmap.org 10.0-255.0-255.1-254"/>
|
|||||||
<script>
|
<script>
|
||||||
$('.ui.dropdown').dropdown()
|
$('.ui.dropdown').dropdown()
|
||||||
|
|
||||||
<xsl:if test="runstats/finished/@summary">
|
|
||||||
$.toast({
|
|
||||||
title : '<xsl:value-of select="runstats/finished/@exit"/>',
|
|
||||||
message : '<xsl:value-of select="runstats/finished/@summary"/>',
|
|
||||||
showIcon : 'satellite dish',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="runstats/finished/@errormsg">
|
|
||||||
$.toast({
|
|
||||||
title : '<xsl:value-of select="runstats/finished/@exit"/>',
|
|
||||||
message : '<xsl:value-of select="runstats/finished/@errormsg"/>',
|
|
||||||
showIcon : 'exclamation triangle',
|
|
||||||
class : 'error',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="$init">
|
|
||||||
$.toast({
|
|
||||||
message : 'Comparaison avec les résultats du <xsl:value-of select="$init/runstats/finished/@timestr"/>',
|
|
||||||
class : 'info',
|
|
||||||
showIcon : 'calendar',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
</xsl:if>
|
|
||||||
|
|
||||||
hiddenButton.onclick = function(event) {
|
|
||||||
if (lanScanForm.checkValidity()) {
|
|
||||||
targetsInputDiv.classList.add('loading')
|
|
||||||
$.toast({
|
|
||||||
title : 'Scan en cours...',
|
|
||||||
message : 'Merci de patienter',
|
|
||||||
class : 'info',
|
|
||||||
showIcon : 'satellite dish',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
refreshButton.onclick = function(event) {
|
|
||||||
refreshButton.getElementsByTagName('i')[0].className = 'loading spinner icon'
|
|
||||||
$.toast({
|
|
||||||
title : 'Scan en cours...',
|
|
||||||
message : 'Merci de patienter',
|
|
||||||
class : 'info',
|
|
||||||
showIcon : 'satellite dish',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function hostScanning(link) {
|
function hostScanning(link) {
|
||||||
link.parentElement.parentElement.classList.add("loading")
|
link.parentElement.parentElement.classList.add("loading")
|
||||||
$.toast({
|
$.toast({
|
||||||
@ -202,6 +83,10 @@ function hostScanning(link) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<xsl:apply-templates select="runstats">
|
||||||
|
<xsl:with-param name="init" select="$init"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
@ -237,12 +122,12 @@ function hostScanning(link) {
|
|||||||
<xsl:text>ui empty circular label </xsl:text>
|
<xsl:text>ui empty circular label </xsl:text>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$currentHost/status/@state='up'">green</xsl:when>
|
<xsl:when test="$currentHost/status/@state='up'">green</xsl:when>
|
||||||
<xsl:otherwise>red disabled</xsl:otherwise>
|
<xsl:otherwise>red</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</div>
|
</div>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise><div class="ui red disabled circular label"></div></xsl:otherwise>
|
<xsl:otherwise><div class="ui empty circular label red"></div></xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:text> </xsl:text>
|
<xsl:text> </xsl:text>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
@ -267,10 +152,11 @@ function hostScanning(link) {
|
|||||||
</xsl:if>
|
</xsl:if>
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
<xsl:apply-templates select="$currentHost/ports/port | $initHost/ports/port[not(@portid=$currentHost/ports/port/@portid)][not(state/@state='closed')]">
|
<xsl:apply-templates select="$currentHost/ports/port | $initHost/ports/port[not(@portid=$currentHost/ports/port/@portid)][not(state/@state='closed')]" mode="service">
|
||||||
<xsl:with-param name="initHost" select="$initHost"/>
|
<xsl:with-param name="initHost" select="$initHost"/>
|
||||||
<xsl:with-param name="currentHost" select="$currentHost"/>
|
<xsl:with-param name="currentHost" select="$currentHost"/>
|
||||||
<xsl:with-param name="hostAddress" select="$hostAddress"/>
|
<xsl:with-param name="hostAddress" select="$hostAddress"/>
|
||||||
|
<xsl:with-param name="class" select="'ui label'"/>
|
||||||
<xsl:sort select="number(@portid)" order="ascending"/>
|
<xsl:sort select="number(@portid)" order="ascending"/>
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</div>
|
</div>
|
||||||
@ -291,7 +177,7 @@ function hostScanning(link) {
|
|||||||
<xsl:text>/?preset=host&targets=</xsl:text>
|
<xsl:text>/?preset=host&targets=</xsl:text>
|
||||||
<xsl:value-of select="$hostAddress"/>
|
<xsl:value-of select="$hostAddress"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<i class="sliders horizontal icon"></i>
|
<i class="settings icon"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,25 +4,28 @@
|
|||||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
version="1.1">
|
version="1.1">
|
||||||
|
|
||||||
<xsl:import href="lib/parseCommand.xsl"/>
|
<xsl:import href="lib/head.xsl"/>
|
||||||
|
<xsl:import href="lib/nav.xsl"/>
|
||||||
|
<xsl:import href="lib/service.xsl"/>
|
||||||
|
<xsl:import href="lib/toast.xsl"/>
|
||||||
|
|
||||||
<xsl:output method="html" encoding="UTF-8"/>
|
<xsl:output method="html" encoding="UTF-8"/>
|
||||||
<xsl:output indent="yes"/>
|
<xsl:output indent="yes"/>
|
||||||
<xsl:strip-space elements='*'/>
|
<xsl:strip-space elements='*'/>
|
||||||
|
|
||||||
<xsl:param name="savedAs" select=""/>
|
<xsl:param name="thisURL" select=""/>
|
||||||
<xsl:param name="compareWith" select=""/>
|
<xsl:param name="originalURL" select=""/>
|
||||||
<xsl:param name="refreshPeriod" select="0"/>
|
<xsl:param name="refreshPeriod" select="0"/>
|
||||||
<xsl:param name="sudo" select="false"/>
|
<xsl:param name="sudo" select="false"/>
|
||||||
|
|
||||||
<xsl:variable name="current" select="./nmaprun"/>
|
<xsl:variable name="current" select="./nmaprun"/>
|
||||||
<xsl:variable name="stylesheetURL" select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'href="'),'"')"/>
|
<xsl:variable name="stylesheetURL" select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'href="'), '?')"/>
|
||||||
<xsl:variable name="basedir" select="concat($stylesheetURL, '/../..')"/>
|
<xsl:variable name="basedir" select="concat($stylesheetURL, '/../..')"/>
|
||||||
<xsl:variable name="init" select="document($compareWith)/nmaprun"/>
|
<xsl:variable name="init" select="document($originalURL)/nmaprun"/>
|
||||||
<xsl:variable name="nextCompareWith">
|
<xsl:variable name="nextComparison">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$savedAs"><xsl:value-of select="$savedAs"/></xsl:when>
|
<xsl:when test="$thisURL"><xsl:value-of select="$thisURL"/></xsl:when>
|
||||||
<xsl:when test="$compareWith"><xsl:value-of select="$compareWith"/></xsl:when>
|
<xsl:when test="$originalURL"><xsl:value-of select="$originalURL"/></xsl:when>
|
||||||
<xsl:otherwise></xsl:otherwise>
|
<xsl:otherwise></xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
@ -31,105 +34,31 @@
|
|||||||
<xsl:variable name="targets" select="substring-after(@args, '.xml ')"/>
|
<xsl:variable name="targets" select="substring-after(@args, '.xml ')"/>
|
||||||
|
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
<head>
|
<xsl:apply-templates select="." mode="head">
|
||||||
<meta charset="utf-8"/>
|
<xsl:with-param name="basedir" select="$basedir"/>
|
||||||
<xsl:if test="$refreshPeriod > 0">
|
<xsl:with-param name="targets" select="$targets"/>
|
||||||
<meta http-equiv="refresh">
|
<xsl:with-param name="nextComparison" select="$nextComparison"/>
|
||||||
<xsl:attribute name="content">
|
<xsl:with-param name="refreshPeriod" select="$refreshPeriod"/>
|
||||||
<xsl:value-of select="$refreshPeriod"/>
|
<xsl:with-param name="sudo" select="$sudo"/>
|
||||||
<xsl:text>;URL=</xsl:text>
|
</xsl:apply-templates>
|
||||||
<xsl:value-of select="$basedir"/>
|
|
||||||
<xsl:text>/scan.php?targets=</xsl:text>
|
|
||||||
<xsl:value-of select="$targets"/>
|
|
||||||
<xsl:text>&</xsl:text>
|
|
||||||
<xsl:call-template name="parseCommand">
|
|
||||||
<xsl:with-param name="argList" select="substring-before(substring-after(@args, ' -'), ' -oX')"/>
|
|
||||||
<xsl:with-param name="asURL" select="true()"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
<xsl:text>compareWith=</xsl:text>
|
|
||||||
<xsl:value-of select="$nextCompareWith"/>
|
|
||||||
<xsl:text>&refreshPeriod=</xsl:text>
|
|
||||||
<xsl:value-of select="$refreshPeriod"/>
|
|
||||||
<xsl:text>&sudo=</xsl:text>
|
|
||||||
<xsl:value-of select="$sudo"/>
|
|
||||||
</xsl:attribute>
|
|
||||||
</meta>
|
|
||||||
</xsl:if>
|
|
||||||
<title>
|
|
||||||
<xsl:text>lanScan - </xsl:text>
|
|
||||||
<xsl:value-of select="$targets"/>
|
|
||||||
</title>
|
|
||||||
<link rel="icon" href="{$basedir}/favicon.ico"/>
|
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.9.3/dist/semantic.min.css"/>
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.css" rel="stylesheet" type="text/css"/>
|
|
||||||
<link href="https://cdn.datatables.net/v/se/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/cr-2.0.4/fc-5.0.3/fh-4.0.1/r-3.0.3/datatables.min.css" rel="stylesheet"/>
|
|
||||||
<link href="{$basedir}/style.css" rel="stylesheet" type="text/css"/>
|
|
||||||
<style>
|
|
||||||
.ui.icon.buttons .mini.button {
|
|
||||||
padding: 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.action {
|
|
||||||
overflow-x: scroll;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui.ui.ui.ui[class*="left icon"]:not(.corner).input > input{
|
|
||||||
min-width: 10em;
|
|
||||||
padding-right: .1em;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.2/semantic.min.js"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.polyfills.min.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
|
|
||||||
<script src="https://cdn.datatables.net/v/se/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/cr-2.0.4/fc-5.0.3/fh-4.0.1/r-3.0.3/datatables.min.js"></script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<nav class="ui inverted teal fixed menu">
|
<xsl:apply-templates select="." mode="nav">
|
||||||
<a class="ui teal button item" href="{$basedir}">
|
<xsl:with-param name="basedir" select="$basedir"/>
|
||||||
<xsl:text>lan</xsl:text>
|
<xsl:with-param name="targets" select="$targets"/>
|
||||||
<svg class="logo" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 24 24" xml:space="preserve" width="40" height="40" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs206"/><g id="g998" transform="matrix(0,0.04687491,-0.04687491,0,24,2.2682373e-5)"><g id="g147"><g id="g145"><path d="m 322.065,92.046 c -46.24,0 -83.851,37.619 -83.851,83.857 v 168.712 c 0,25.224 -21.148,45.745 -46.372,45.745 -25.224,0 -46.372,-20.521 -46.372,-45.745 V 199.464 h -38.114 v 145.151 c 0,46.24 38.246,83.859 84.486,83.859 46.24,0 84.486,-37.619 84.486,-83.859 V 175.903 c 0,-25.223 20.514,-45.743 45.737,-45.743 25.223,0 45.737,20.521 45.737,45.743 v 134.092 h 38.114 V 175.903 c 0,-46.239 -37.611,-83.857 -83.851,-83.857 z" id="path143"/></g></g><g id="g153"><g id="g151"><path d="M 144.198,0 H 108.625 C 98.101,0 89.568,8.746 89.568,19.271 c 0,1.157 0.121,2.328 0.318,3.598 h 73.052 c 0.197,-1.27 0.318,-2.441 0.318,-3.598 C 163.256,8.746 154.723,0 144.198,0 Z" id="path149"/></g></g><g id="g159"><g id="g157"><path d="m 420.183,486.591 h -71.731 c -0.626,2.541 -0.978,4.077 -0.978,6.176 0,10.525 8.532,19.234 19.057,19.234 h 35.573 c 10.525,0 19.057,-8.709 19.057,-19.234 0,-2.098 -0.352,-3.635 -0.978,-6.176 z" id="path155"/></g></g><g id="g165"><g id="g163"><rect x="87.027" y="41.925999" width="80.040001" height="138.481" id="rect161"/></g></g><g id="g171"><g id="g169"><rect x="344.93301" y="329.052" width="80.040001" height="138.481" id="rect167"/></g></g><g id="g173"></g><g id="g175"></g><g id="g177"></g><g id="g179"></g><g id="g181"></g><g id="g183"></g><g id="g185"></g><g id="g187"></g><g id="g189"></g><g id="g191"></g><g id="g193"></g><g id="g195"></g><g id="g197"></g><g id="g199"></g><g id="g201"></g></g></svg>
|
<xsl:with-param name="nextComparison" select="$nextComparison"/>
|
||||||
<xsl:text>can</xsl:text>
|
<xsl:with-param name="refreshPeriod" select="$refreshPeriod"/>
|
||||||
</a>
|
<xsl:with-param name="sudo" select="$sudo"/>
|
||||||
<form id="lanScanForm" class="right menu">
|
</xsl:apply-templates>
|
||||||
<xsl:call-template name="parseCommand">
|
|
||||||
<xsl:with-param name="argList" select="substring-before(substring-after(@args, ' -'), ' -oX')"/>
|
|
||||||
<xsl:with-param name="asURL" select="false()"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
<div class="ui category search item">
|
|
||||||
<div id="targetsInputDiv" class="ui icon input">
|
|
||||||
<input class="prompt" type="text" id="targetsInput" name="targets" oninput="hiddenInput.value=this.value"
|
|
||||||
pattern="[a-zA-Z0-9._\/ \-]+" value="{$targets}" placeholder="Scanner un réseau..."
|
|
||||||
title="Les cibles peuvent être spécifiées par des noms d'hôtes, des adresses IP, des adresses de réseaux, etc.
|
|
||||||
Exemples: 192.168.1.0/24 scanme.nmap.org 10.0-255.0-255.1-254"/>
|
|
||||||
<i class="satellite dish icon"></i>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" name="compareWith" value="{$nextCompareWith}"/>
|
|
||||||
<input type="hidden" name="refreshPeriod" value="{$refreshPeriod}"/>
|
|
||||||
<input type="hidden" name="sudo" value="{$sudo}"/>
|
|
||||||
<button id="hiddenButton" style="display: none;" type="submit" formmethod="get" formaction="{$basedir}/scan.php"></button>
|
|
||||||
<button id="refreshButton" class="ui teal icon submit button" type="submit" formmethod="get" formaction="{$basedir}/scan.php">
|
|
||||||
<i class="sync icon"></i>
|
|
||||||
</button>
|
|
||||||
<button class="ui teal icon submit button" type="submit" formmethod="get" formaction="{$basedir}/">
|
|
||||||
<i class="sliders horizontal icon"></i>
|
|
||||||
</button>
|
|
||||||
<a class="ui teal icon button" href="https://nmap.org/man/fr/index.html" target="_blank">
|
|
||||||
<i class="question circle icon"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<main class="ui container">
|
<main class="ui wide container">
|
||||||
<h1 class="ui header"><xsl:value-of select="$targets"/></h1>
|
<h1 class="ui header"><xsl:value-of select="$targets"/></h1>
|
||||||
|
|
||||||
|
<div class="form">
|
||||||
<div class="ui doubling stackable four column compact grid">
|
<div class="ui doubling stackable four column compact grid">
|
||||||
<xsl:apply-templates select="host | $init/host[not(address/@addr=$current/host/address/@addr)][not(status/@state='down')]"/>
|
<xsl:apply-templates select="host | $init/host[not(address/@addr=$current/host/address/@addr)][not(status/@state='down')]"/>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer class="ui footer segment">
|
<footer class="ui footer segment">
|
||||||
@ -137,104 +66,12 @@ Exemples: 192.168.1.0/24 scanme.nmap.org 10.0-255.0-255.1-254"/>
|
|||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
DataTable.ext.type.detect.unshift(function (d) {
|
|
||||||
return /[\d]+\.[\d]+\.[\d]+\.[\d]+/.test(d)
|
|
||||||
? 'ipv4-address'
|
|
||||||
: null;
|
|
||||||
});
|
|
||||||
|
|
||||||
DataTable.ext.type.order['ipv4-address-pre'] = function (ipAddress) {
|
|
||||||
[a, b, c, d] = ipAddress.split(".").map(Number)
|
|
||||||
return 16777216*a + 65536*b + 256*c + d;
|
|
||||||
};
|
|
||||||
|
|
||||||
var table = $('#scanResultsTable').DataTable({
|
|
||||||
buttons : ['copy', 'excel', 'pdf'],
|
|
||||||
fixedHeader: true,
|
|
||||||
lengthMenu : [
|
|
||||||
[256, 512, 1024, 2048, -1],
|
|
||||||
[256, 512, 1024, 2048, "All"]
|
|
||||||
],
|
|
||||||
responsive: true,
|
|
||||||
colReorder: true,
|
|
||||||
buttons : ['copy', 'excel', 'pdf']
|
|
||||||
})
|
|
||||||
table.order([1, 'asc']).draw()
|
|
||||||
|
|
||||||
$('.ui.dropdown').dropdown()
|
$('.ui.dropdown').dropdown()
|
||||||
|
|
||||||
<xsl:if test="runstats/finished/@summary">
|
|
||||||
$.toast({
|
|
||||||
title : '<xsl:value-of select="runstats/finished/@exit"/>',
|
|
||||||
message : '<xsl:value-of select="runstats/finished/@summary"/>',
|
|
||||||
showIcon : 'satellite dish',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="runstats/finished/@errormsg">
|
|
||||||
$.toast({
|
|
||||||
title : '<xsl:value-of select="runstats/finished/@exit"/>',
|
|
||||||
message : '<xsl:value-of select="runstats/finished/@errormsg"/>',
|
|
||||||
showIcon : 'exclamation triangle',
|
|
||||||
class : 'error',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="$init">
|
|
||||||
$.toast({
|
|
||||||
message : 'Comparaison avec les résultats du <xsl:value-of select="$init/runstats/finished/@timestr"/>',
|
|
||||||
class : 'info',
|
|
||||||
showIcon : 'calendar',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
</xsl:if>
|
|
||||||
|
|
||||||
hiddenButton.onclick = function(event) {
|
|
||||||
if (lanScanForm.checkValidity()) {
|
|
||||||
targetsInputDiv.classList.add('loading')
|
|
||||||
$.toast({
|
|
||||||
title : 'Scan en cours...',
|
|
||||||
message : 'Merci de patienter',
|
|
||||||
class : 'info',
|
|
||||||
showIcon : 'satellite dish',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
refreshButton.onclick = function(event) {
|
|
||||||
refreshButton.getElementsByTagName('i')[0].className = 'loading spinner icon'
|
|
||||||
$.toast({
|
|
||||||
title : 'Scan en cours...',
|
|
||||||
message : 'Merci de patienter',
|
|
||||||
class : 'info',
|
|
||||||
showIcon : 'satellite dish',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function hostScanning(link) {
|
|
||||||
link.getElementsByTagName('i')[0].className = 'loading spinner icon'
|
|
||||||
$.toast({
|
|
||||||
title : 'Scan en cours...',
|
|
||||||
message : 'Merci de patienter',
|
|
||||||
class : 'info',
|
|
||||||
showIcon : 'satellite dish',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<xsl:apply-templates select="runstats">
|
||||||
|
<xsl:with-param name="init" select="$init"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
@ -256,7 +93,7 @@ function hostScanning(link) {
|
|||||||
<div class="column">
|
<div class="column">
|
||||||
<div>
|
<div>
|
||||||
<xsl:attribute name="class">
|
<xsl:attribute name="class">
|
||||||
<xsl:text>ui fluid mini left icon input </xsl:text>
|
<xsl:text>ui fluid mini compact input </xsl:text>
|
||||||
<xsl:if test="$currentHost/ports/port | $initHost/ports/port[not(@portid=$currentHost/ports/port/@portid)][not(state/@state='closed')]">
|
<xsl:if test="$currentHost/ports/port | $initHost/ports/port[not(@portid=$currentHost/ports/port/@portid)][not(state/@state='closed')]">
|
||||||
<xsl:text>action buttons </xsl:text>
|
<xsl:text>action buttons </xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
@ -265,15 +102,15 @@ function hostScanning(link) {
|
|||||||
<xsl:otherwise>error</xsl:otherwise>
|
<xsl:otherwise>error</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<i class="server icon"></i>
|
|
||||||
<input type="text" readonly="" value="{substring-before(hostnames/hostname/@name, '.')}" placeholder="{address/@addr}"
|
<input type="text" readonly="" value="{substring-before(hostnames/hostname/@name, '.')}" placeholder="{address/@addr}"
|
||||||
title="{$currentHost/hostnames/hostname/@name} ({address/@addr})"
|
title="{$currentHost/hostnames/hostname/@name} ({address/@addr})"
|
||||||
onfocus="this.value='{hostnames/hostname/@name}'; this.select()" onblur="this.value='{substring-before(hostnames/hostname/@name, '.')}'"
|
onfocus="this.value='{hostnames/hostname/@name}'; this.select()" onblur="this.value='{substring-before(hostnames/hostname/@name, '.')}'"
|
||||||
/>
|
/>
|
||||||
<xsl:apply-templates select="$currentHost/ports/port | $initHost/ports/port[not(@portid=$currentHost/ports/port/@portid)][not(state/@state='closed')]">
|
<xsl:apply-templates select="$initHost/ports/port[not(@portid=$currentHost/ports/port/@portid)][not(state/@state='closed')] | $currentHost/ports/port" mode="service">
|
||||||
<xsl:with-param name="initHost" select="$initHost"/>
|
<xsl:with-param name="initHost" select="$initHost"/>
|
||||||
<xsl:with-param name="currentHost" select="$currentHost"/>
|
<xsl:with-param name="currentHost" select="$currentHost"/>
|
||||||
<xsl:with-param name="hostAddress" select="$hostAddress"/>
|
<xsl:with-param name="hostAddress" select="$hostAddress"/>
|
||||||
|
<xsl:with-param name="class" select="'ui mini button'"/>
|
||||||
<xsl:sort select="number(@portid)" order="ascending"/>
|
<xsl:sort select="number(@portid)" order="ascending"/>
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</div>
|
</div>
|
||||||
|
203
templates/hostScan.xsl
Executable file
203
templates/hostScan.xsl
Executable file
@ -0,0 +1,203 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xsl:stylesheet
|
||||||
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
|
version="1.1">
|
||||||
|
|
||||||
|
<xsl:import href="lib/head.xsl"/>
|
||||||
|
<xsl:import href="lib/nav.xsl"/>
|
||||||
|
<xsl:import href="lib/service.xsl"/>
|
||||||
|
<xsl:import href="lib/toast.xsl"/>
|
||||||
|
|
||||||
|
<xsl:output method="html" encoding="UTF-8"/>
|
||||||
|
<xsl:output indent="yes"/>
|
||||||
|
<xsl:strip-space elements='*'/>
|
||||||
|
|
||||||
|
<xsl:param name="thisURL" select=""/>
|
||||||
|
<xsl:param name="originalURL" select=""/>
|
||||||
|
<xsl:param name="refreshPeriod" select="0"/>
|
||||||
|
<xsl:param name="sudo" select="false"/>
|
||||||
|
|
||||||
|
<xsl:variable name="current" select="./nmaprun"/>
|
||||||
|
<xsl:variable name="stylesheetURL" select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'href="'), '?')"/>
|
||||||
|
<xsl:variable name="basedir" select="concat($stylesheetURL, '/../..')"/>
|
||||||
|
<xsl:variable name="init" select="document($originalURL)/nmaprun"/>
|
||||||
|
<xsl:variable name="nextComparison">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$thisURL"><xsl:value-of select="$thisURL"/></xsl:when>
|
||||||
|
<xsl:when test="$originalURL"><xsl:value-of select="$originalURL"/></xsl:when>
|
||||||
|
<xsl:otherwise></xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<xsl:template match="nmaprun">
|
||||||
|
<xsl:variable name="targets" select="substring-after(@args, '.xml ')"/>
|
||||||
|
|
||||||
|
<html lang="fr">
|
||||||
|
<xsl:apply-templates select="." mode="head">
|
||||||
|
<xsl:with-param name="basedir" select="$basedir"/>
|
||||||
|
<xsl:with-param name="targets" select="$targets"/>
|
||||||
|
<xsl:with-param name="nextComparison" select="$nextComparison"/>
|
||||||
|
<xsl:with-param name="refreshPeriod" select="$refreshPeriod"/>
|
||||||
|
<xsl:with-param name="sudo" select="$sudo"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<xsl:apply-templates select="." mode="nav">
|
||||||
|
<xsl:with-param name="basedir" select="$basedir"/>
|
||||||
|
<xsl:with-param name="targets" select="$targets"/>
|
||||||
|
<xsl:with-param name="nextComparison" select="$nextComparison"/>
|
||||||
|
<xsl:with-param name="refreshPeriod" select="$refreshPeriod"/>
|
||||||
|
<xsl:with-param name="sudo" select="$sudo"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
|
||||||
|
<main class="ui main container">
|
||||||
|
<xsl:apply-templates select="host | $init/host[not(address/@addr=$current/host/address/@addr)][not(status/@state='down')]"/>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="ui footer segment">
|
||||||
|
lanScan est basé sur <a href="https://nmap.org/" target="_blank">Nmap</a>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var table = $('#scanResultsTable').DataTable({
|
||||||
|
buttons : ['copy', 'excel', 'pdf'],
|
||||||
|
fixedHeader: true,
|
||||||
|
lengthMenu : [
|
||||||
|
[256, 512, 1024, 2048, -1],
|
||||||
|
[256, 512, 1024, 2048, "All"]
|
||||||
|
],
|
||||||
|
responsive: true,
|
||||||
|
colReorder: true,
|
||||||
|
buttons : ['copy', 'excel', 'pdf']
|
||||||
|
})
|
||||||
|
table.order([1, 'asc']).draw()
|
||||||
|
|
||||||
|
$('.ui.dropdown').dropdown()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<xsl:apply-templates select="runstats">
|
||||||
|
<xsl:with-param name="init" select="$init"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="host">
|
||||||
|
<xsl:variable name="addr" select="address/@addr"/>
|
||||||
|
<xsl:variable name="initHost" select="$init/host[address/@addr=$addr]"/>
|
||||||
|
<xsl:variable name="currentHost" select="$current/host[address/@addr=$addr]"/>
|
||||||
|
<xsl:variable name="hostAddress">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="hostnames/hostname/@name">
|
||||||
|
<xsl:value-of select="hostnames/hostname/@name"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="address/@addr"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<h1 class="ui header">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="hostnames/hostname/@name">
|
||||||
|
<xsl:value-of select="hostnames/hostname/@name"/>
|
||||||
|
<div class="sub header"><xsl:value-of select="address/@addr"/></div>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="address/@addr"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<table id="scanResultsTable" style="width:100%" role="grid" class="ui sortable small table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Etat</th>
|
||||||
|
<th>Protocole</th>
|
||||||
|
<th>Port</th>
|
||||||
|
<th>Service</th>
|
||||||
|
<th>Produit</th>
|
||||||
|
<th>Version</th>
|
||||||
|
<th>Infos</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<xsl:apply-templates select="$currentHost/ports/port | $initHost/ports/port[not(@portid=$currentHost/ports/port/@portid)][not(state/@state='closed')]">
|
||||||
|
<xsl:with-param name="initHost" select="$initHost"/>
|
||||||
|
<xsl:with-param name="currentHost" select="$currentHost"/>
|
||||||
|
<xsl:with-param name="hostAddress" select="$hostAddress"/>
|
||||||
|
<xsl:sort select="number(@portid)" order="ascending"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
|
<xsl:template match="port">
|
||||||
|
<xsl:param name="hostAddress"/>
|
||||||
|
<xsl:param name="initHost"/>
|
||||||
|
<xsl:param name="currentHost"/>
|
||||||
|
<xsl:variable name="portid" select="@portid"/>
|
||||||
|
<xsl:variable name="initPort" select="$initHost/ports/port[@portid=$portid]"/>
|
||||||
|
<xsl:variable name="currentPort" select="$currentHost/ports/port[@portid=$portid]"/>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<xsl:attribute name="class">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$currentPort/script[@id='http-info']/elem[@key='status']>=500">negative</xsl:when>
|
||||||
|
<xsl:when test="$currentPort/script[@id='http-info']/elem[@key='status']>=400">warning</xsl:when>
|
||||||
|
<xsl:when test="$currentPort/script[@id='http-info']/elem[@key='status']>=200">positive</xsl:when>
|
||||||
|
<xsl:when test="$currentPort/state/@state='open'">positive</xsl:when>
|
||||||
|
<xsl:when test="$currentPort/state/@state='filtered'">warning</xsl:when>
|
||||||
|
<xsl:otherwise>negative</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:attribute>
|
||||||
|
<td>
|
||||||
|
<div>
|
||||||
|
<xsl:attribute name="class">
|
||||||
|
<xsl:text>ui mini circular label </xsl:text>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$currentPort/state/@state='open'">green</xsl:when>
|
||||||
|
<xsl:when test="$currentPort/state/@state='filtered'">orange</xsl:when>
|
||||||
|
<xsl:otherwise>red</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:value-of select="$currentPort/state/@state"/>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td style="text-transform: uppercase">
|
||||||
|
<xsl:value-of select="@protocol"/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<xsl:value-of select="@portid"/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<xsl:apply-templates select="." mode="service">
|
||||||
|
<xsl:with-param name="initHost" select="$initHost"/>
|
||||||
|
<xsl:with-param name="currentHost" select="$currentHost"/>
|
||||||
|
<xsl:with-param name="hostAddress" select="$hostAddress"/>
|
||||||
|
<xsl:with-param name="class" select="'ui mini fluid button'"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<xsl:value-of select="service/@product"/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<xsl:value-of select="service/@version"/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<xsl:value-of select="service/@extrainfo"/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="table">
|
||||||
|
<xsl:param name="hostAddress"/>
|
||||||
|
<a class="item share-size" href="file://///{$hostAddress}/{@key}" target="_blank" rel="noopener noreferrer" style="--free: {elem[@key='FreeSize']}; --total: {elem[@key='TotalSize']}">
|
||||||
|
<xsl:value-of select="@key"/>
|
||||||
|
</a>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
@ -1,323 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<xsl:stylesheet
|
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
||||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
||||||
version="1.1">
|
|
||||||
|
|
||||||
<xsl:import href="lib/parseCommand.xsl"/>
|
|
||||||
<xsl:import href="lib/serviceLabel.xsl"/>
|
|
||||||
|
|
||||||
<xsl:output method="html" encoding="UTF-8"/>
|
|
||||||
<xsl:output indent="yes"/>
|
|
||||||
<xsl:strip-space elements='*'/>
|
|
||||||
|
|
||||||
<xsl:param name="savedAs" select=""/>
|
|
||||||
<xsl:param name="compareWith" select=""/>
|
|
||||||
<xsl:param name="refreshPeriod" select="0"/>
|
|
||||||
<xsl:param name="sudo" select="false"/>
|
|
||||||
|
|
||||||
<xsl:variable name="current" select="./nmaprun"/>
|
|
||||||
<xsl:variable name="stylesheetURL" select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'href="'),'"')"/>
|
|
||||||
<xsl:variable name="basedir" select="concat($stylesheetURL, '/../..')"/>
|
|
||||||
<xsl:variable name="init" select="document($compareWith)/nmaprun"/>
|
|
||||||
<xsl:variable name="nextCompareWith">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$savedAs"><xsl:value-of select="$savedAs"/></xsl:when>
|
|
||||||
<xsl:when test="$compareWith"><xsl:value-of select="$compareWith"/></xsl:when>
|
|
||||||
<xsl:otherwise></xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:variable>
|
|
||||||
|
|
||||||
<xsl:template match="nmaprun">
|
|
||||||
<xsl:variable name="targets" select="substring-after(@args, '.xml ')"/>
|
|
||||||
|
|
||||||
<html lang="fr">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8"/>
|
|
||||||
<xsl:if test="$refreshPeriod > 0">
|
|
||||||
<meta http-equiv="refresh">
|
|
||||||
<xsl:attribute name="content">
|
|
||||||
<xsl:value-of select="$refreshPeriod"/>
|
|
||||||
<xsl:text>;URL=</xsl:text>
|
|
||||||
<xsl:value-of select="$basedir"/>
|
|
||||||
<xsl:text>/scan.php?targets=</xsl:text>
|
|
||||||
<xsl:value-of select="$targets"/>
|
|
||||||
<xsl:text>&</xsl:text>
|
|
||||||
<xsl:call-template name="parseCommand">
|
|
||||||
<xsl:with-param name="argList" select="substring-before(substring-after(@args, ' -'), ' -oX')"/>
|
|
||||||
<xsl:with-param name="asURL" select="true()"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
<xsl:text>compareWith=</xsl:text>
|
|
||||||
<xsl:value-of select="$nextCompareWith"/>
|
|
||||||
<xsl:text>&refreshPeriod=</xsl:text>
|
|
||||||
<xsl:value-of select="$refreshPeriod"/>
|
|
||||||
<xsl:text>&sudo=</xsl:text>
|
|
||||||
<xsl:value-of select="$sudo"/>
|
|
||||||
</xsl:attribute>
|
|
||||||
</meta>
|
|
||||||
</xsl:if>
|
|
||||||
<title>
|
|
||||||
<xsl:text>lanScan - </xsl:text>
|
|
||||||
<xsl:value-of select="$targets"/>
|
|
||||||
</title>
|
|
||||||
<link rel="icon" href="{$basedir}/favicon.ico"/>
|
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.9.3/dist/semantic.min.css"/>
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.css" rel="stylesheet" type="text/css"/>
|
|
||||||
<link href="https://cdn.datatables.net/v/se/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/cr-2.0.4/fc-5.0.3/fh-4.0.1/r-3.0.3/datatables.min.css" rel="stylesheet"/>
|
|
||||||
<link href="{$basedir}/style.css" rel="stylesheet" type="text/css"/>
|
|
||||||
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.2/semantic.min.js"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.polyfills.min.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
|
|
||||||
<script src="https://cdn.datatables.net/v/se/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/cr-2.0.4/fc-5.0.3/fh-4.0.1/r-3.0.3/datatables.min.js"></script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<nav class="ui inverted teal fixed menu">
|
|
||||||
<a class="ui teal button item" href="{$basedir}">
|
|
||||||
<xsl:text>lan</xsl:text>
|
|
||||||
<svg class="logo" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 24 24" xml:space="preserve" width="40" height="40" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs206"/><g id="g998" transform="matrix(0,0.04687491,-0.04687491,0,24,2.2682373e-5)"><g id="g147"><g id="g145"><path d="m 322.065,92.046 c -46.24,0 -83.851,37.619 -83.851,83.857 v 168.712 c 0,25.224 -21.148,45.745 -46.372,45.745 -25.224,0 -46.372,-20.521 -46.372,-45.745 V 199.464 h -38.114 v 145.151 c 0,46.24 38.246,83.859 84.486,83.859 46.24,0 84.486,-37.619 84.486,-83.859 V 175.903 c 0,-25.223 20.514,-45.743 45.737,-45.743 25.223,0 45.737,20.521 45.737,45.743 v 134.092 h 38.114 V 175.903 c 0,-46.239 -37.611,-83.857 -83.851,-83.857 z" id="path143"/></g></g><g id="g153"><g id="g151"><path d="M 144.198,0 H 108.625 C 98.101,0 89.568,8.746 89.568,19.271 c 0,1.157 0.121,2.328 0.318,3.598 h 73.052 c 0.197,-1.27 0.318,-2.441 0.318,-3.598 C 163.256,8.746 154.723,0 144.198,0 Z" id="path149"/></g></g><g id="g159"><g id="g157"><path d="m 420.183,486.591 h -71.731 c -0.626,2.541 -0.978,4.077 -0.978,6.176 0,10.525 8.532,19.234 19.057,19.234 h 35.573 c 10.525,0 19.057,-8.709 19.057,-19.234 0,-2.098 -0.352,-3.635 -0.978,-6.176 z" id="path155"/></g></g><g id="g165"><g id="g163"><rect x="87.027" y="41.925999" width="80.040001" height="138.481" id="rect161"/></g></g><g id="g171"><g id="g169"><rect x="344.93301" y="329.052" width="80.040001" height="138.481" id="rect167"/></g></g><g id="g173"></g><g id="g175"></g><g id="g177"></g><g id="g179"></g><g id="g181"></g><g id="g183"></g><g id="g185"></g><g id="g187"></g><g id="g189"></g><g id="g191"></g><g id="g193"></g><g id="g195"></g><g id="g197"></g><g id="g199"></g><g id="g201"></g></g></svg>
|
|
||||||
<xsl:text>can</xsl:text>
|
|
||||||
</a>
|
|
||||||
<form id="lanScanForm" class="right menu">
|
|
||||||
<xsl:call-template name="parseCommand">
|
|
||||||
<xsl:with-param name="argList" select="substring-before(substring-after(@args, ' -'), ' -oX')"/>
|
|
||||||
<xsl:with-param name="asURL" select="false()"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
<div class="ui category search item">
|
|
||||||
<div id="targetsInputDiv" class="ui icon input">
|
|
||||||
<input class="prompt" type="text" id="targetsInput" name="targets" oninput="hiddenInput.value=this.value"
|
|
||||||
pattern="[a-zA-Z0-9._\/ \-]+" value="{$targets}" placeholder="Scanner un réseau..."
|
|
||||||
title="Les cibles peuvent être spécifiées par des noms d'hôtes, des adresses IP, des adresses de réseaux, etc.
|
|
||||||
Exemples: 192.168.1.0/24 scanme.nmap.org 10.0-255.0-255.1-254"/>
|
|
||||||
<i class="satellite dish icon"></i>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" name="compareWith" value="{$nextCompareWith}"/>
|
|
||||||
<input type="hidden" name="refreshPeriod" value="{$refreshPeriod}"/>
|
|
||||||
<input type="hidden" name="sudo" value="{$sudo}"/>
|
|
||||||
<button id="hiddenButton" style="display: none;" type="submit" formmethod="get" formaction="{$basedir}/scan.php"></button>
|
|
||||||
<button id="refreshButton" class="ui teal icon submit button" type="submit" formmethod="get" formaction="{$basedir}/scan.php">
|
|
||||||
<i class="sync icon"></i>
|
|
||||||
</button>
|
|
||||||
<button class="ui teal icon submit button" type="submit" formmethod="get" formaction="{$basedir}/">
|
|
||||||
<i class="sliders horizontal icon"></i>
|
|
||||||
</button>
|
|
||||||
<a class="ui teal icon button" href="https://nmap.org/man/fr/index.html" target="_blank">
|
|
||||||
<i class="question circle icon"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<main class="ui main container">
|
|
||||||
<h1 class="ui header"><xsl:value-of select="$targets"/></h1>
|
|
||||||
|
|
||||||
<table id="scanResultsTable" style="width:100%" role="grid" class="ui sortable small table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Etat</th>
|
|
||||||
<th>Adresse IP</th>
|
|
||||||
<th>Nom</th>
|
|
||||||
<th>Fabricant</th>
|
|
||||||
<th class="eight wide">Services</th>
|
|
||||||
<th>Scanner les services</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<xsl:apply-templates select="host | $init/host[not(address/@addr=$current/host/address/@addr)][not(status/@state='down')]"/>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<footer class="ui footer segment">
|
|
||||||
lanScan est basé sur <a href="https://nmap.org/" target="_blank">Nmap</a>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
DataTable.ext.type.detect.unshift(function (d) {
|
|
||||||
return /[\d]+\.[\d]+\.[\d]+\.[\d]+/.test(d)
|
|
||||||
? 'ipv4-address'
|
|
||||||
: null;
|
|
||||||
});
|
|
||||||
|
|
||||||
DataTable.ext.type.order['ipv4-address-pre'] = function (ipAddress) {
|
|
||||||
[a, b, c, d] = ipAddress.split(".").map(Number)
|
|
||||||
return 16777216*a + 65536*b + 256*c + d;
|
|
||||||
};
|
|
||||||
|
|
||||||
var table = $('#scanResultsTable').DataTable({
|
|
||||||
buttons : ['copy', 'excel', 'pdf'],
|
|
||||||
fixedHeader: true,
|
|
||||||
lengthMenu : [
|
|
||||||
[256, 512, 1024, 2048, -1],
|
|
||||||
[256, 512, 1024, 2048, "All"]
|
|
||||||
],
|
|
||||||
responsive: true,
|
|
||||||
colReorder: true,
|
|
||||||
buttons : ['copy', 'excel', 'pdf']
|
|
||||||
})
|
|
||||||
table.order([1, 'asc']).draw()
|
|
||||||
|
|
||||||
$('.ui.dropdown').dropdown()
|
|
||||||
|
|
||||||
<xsl:if test="runstats/finished/@summary">
|
|
||||||
$.toast({
|
|
||||||
title : '<xsl:value-of select="runstats/finished/@exit"/>',
|
|
||||||
message : '<xsl:value-of select="runstats/finished/@summary"/>',
|
|
||||||
showIcon : 'satellite dish',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="runstats/finished/@errormsg">
|
|
||||||
$.toast({
|
|
||||||
title : '<xsl:value-of select="runstats/finished/@exit"/>',
|
|
||||||
message : '<xsl:value-of select="runstats/finished/@errormsg"/>',
|
|
||||||
showIcon : 'exclamation triangle',
|
|
||||||
class : 'error',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="$init">
|
|
||||||
$.toast({
|
|
||||||
message : 'Comparaison avec les résultats du <xsl:value-of select="$init/runstats/finished/@timestr"/>',
|
|
||||||
class : 'info',
|
|
||||||
showIcon : 'calendar',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
</xsl:if>
|
|
||||||
|
|
||||||
hiddenButton.onclick = function(event) {
|
|
||||||
if (lanScanForm.checkValidity()) {
|
|
||||||
targetsInputDiv.classList.add('loading')
|
|
||||||
$.toast({
|
|
||||||
title : 'Scan en cours...',
|
|
||||||
message : 'Merci de patienter',
|
|
||||||
class : 'info',
|
|
||||||
showIcon : 'satellite dish',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
refreshButton.onclick = function(event) {
|
|
||||||
refreshButton.getElementsByTagName('i')[0].className = 'loading spinner icon'
|
|
||||||
$.toast({
|
|
||||||
title : 'Scan en cours...',
|
|
||||||
message : 'Merci de patienter',
|
|
||||||
class : 'info',
|
|
||||||
showIcon : 'satellite dish',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function hostScanning(link) {
|
|
||||||
link.getElementsByTagName('i')[0].className = 'loading spinner icon'
|
|
||||||
$.toast({
|
|
||||||
title : 'Scan en cours...',
|
|
||||||
message : 'Merci de patienter',
|
|
||||||
class : 'info',
|
|
||||||
showIcon : 'satellite dish',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="host">
|
|
||||||
<xsl:variable name="addr" select="address/@addr"/>
|
|
||||||
<xsl:variable name="initHost" select="$init/host[address/@addr=$addr]"/>
|
|
||||||
<xsl:variable name="currentHost" select="$current/host[address/@addr=$addr]"/>
|
|
||||||
<xsl:variable name="hostAddress">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="hostnames/hostname/@name">
|
|
||||||
<xsl:value-of select="hostnames/hostname/@name"/>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:value-of select="address/@addr"/>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:variable>
|
|
||||||
<tr>
|
|
||||||
<xsl:attribute name="class">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$currentHost/status/@state='up'">positive</xsl:when>
|
|
||||||
<xsl:otherwise>negative</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:attribute>
|
|
||||||
<td>
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$currentHost">
|
|
||||||
<div>
|
|
||||||
<xsl:attribute name="class">
|
|
||||||
<xsl:text>ui mini circular label </xsl:text>
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$currentHost/status/@state='up'">green</xsl:when>
|
|
||||||
<xsl:otherwise>red</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:attribute>
|
|
||||||
<xsl:value-of select="$currentHost/status/@state"/>
|
|
||||||
</div>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise><div class="ui red circular label">down</div></xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<xsl:value-of select="address/@addr"/>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div><b><xsl:value-of select="substring-before(hostnames/hostname/@name, '.')"/></b></div>
|
|
||||||
<xsl:if test="substring-after(hostnames/hostname/@name, '.')">
|
|
||||||
<div>.<xsl:value-of select="substring-after(hostnames/hostname/@name, '.')"/></div>
|
|
||||||
</xsl:if>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<xsl:value-of select="address[@addrtype='mac']/@vendor"/>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<xsl:apply-templates select="$initHost/ports/port[not(@portid=$currentHost/ports/port/@portid)][not(state/@state='closed')] | $currentHost/ports/port">
|
|
||||||
<xsl:with-param name="initHost" select="$initHost"/>
|
|
||||||
<xsl:with-param name="currentHost" select="$currentHost"/>
|
|
||||||
<xsl:with-param name="hostAddress" select="$hostAddress"/>
|
|
||||||
<xsl:sort select="number(@portid)" order="ascending"/>
|
|
||||||
</xsl:apply-templates>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="ui mini right labeled button">
|
|
||||||
<a class="ui mini icon teal button" onclick="hostScanning(this)">
|
|
||||||
<xsl:attribute name="href">
|
|
||||||
<xsl:value-of select="$basedir"/>
|
|
||||||
<xsl:text>/scan.php?preset=host&targets=</xsl:text>
|
|
||||||
<xsl:value-of select="$hostAddress"/>
|
|
||||||
</xsl:attribute>
|
|
||||||
<i class="satellite dish icon"></i>
|
|
||||||
<xsl:text> Services</xsl:text>
|
|
||||||
</a>
|
|
||||||
<a class="ui mini icon teal label">
|
|
||||||
<xsl:attribute name="href">
|
|
||||||
<xsl:value-of select="$basedir"/>
|
|
||||||
<xsl:text>/?preset=host&targets=</xsl:text>
|
|
||||||
<xsl:value-of select="$hostAddress"/>
|
|
||||||
</xsl:attribute>
|
|
||||||
<i class="sliders horizontal icon"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
198
templates/lanScan.xsl
Executable file
198
templates/lanScan.xsl
Executable file
@ -0,0 +1,198 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xsl:stylesheet
|
||||||
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
|
version="1.1">
|
||||||
|
|
||||||
|
<xsl:import href="lib/head.xsl"/>
|
||||||
|
<xsl:import href="lib/nav.xsl"/>
|
||||||
|
<xsl:import href="lib/service.xsl"/>
|
||||||
|
<xsl:import href="lib/toast.xsl"/>
|
||||||
|
|
||||||
|
<xsl:output method="html" encoding="UTF-8"/>
|
||||||
|
<xsl:output indent="yes"/>
|
||||||
|
<xsl:strip-space elements='*'/>
|
||||||
|
|
||||||
|
<xsl:param name="thisURL" select=""/>
|
||||||
|
<xsl:param name="originalURL" select=""/>
|
||||||
|
<xsl:param name="refreshPeriod" select="0"/>
|
||||||
|
<xsl:param name="sudo" select="false()"/>
|
||||||
|
|
||||||
|
<xsl:variable name="current" select="./nmaprun"/>
|
||||||
|
<xsl:variable name="stylesheetURL" select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'href="'), '?')"/>
|
||||||
|
<xsl:variable name="basedir" select="concat($stylesheetURL, '/../..')"/>
|
||||||
|
<xsl:variable name="init" select="document($originalURL)/nmaprun"/>
|
||||||
|
<xsl:variable name="nextComparison">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$thisURL"><xsl:value-of select="$thisURL"/></xsl:when>
|
||||||
|
<xsl:when test="$originalURL"><xsl:value-of select="$originalURL"/></xsl:when>
|
||||||
|
<xsl:otherwise></xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<xsl:template match="nmaprun">
|
||||||
|
<xsl:variable name="targets" select="substring-after(@args, '-oX - ')"/>
|
||||||
|
|
||||||
|
<html lang="fr">
|
||||||
|
<xsl:apply-templates select="." mode="head">
|
||||||
|
<xsl:with-param name="basedir" select="$basedir"/>
|
||||||
|
<xsl:with-param name="targets" select="$targets"/>
|
||||||
|
<xsl:with-param name="nextComparison" select="$nextComparison"/>
|
||||||
|
<xsl:with-param name="refreshPeriod" select="$refreshPeriod"/>
|
||||||
|
<xsl:with-param name="sudo" select="$sudo"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<xsl:apply-templates select="." mode="nav">
|
||||||
|
<xsl:with-param name="basedir" select="$basedir"/>
|
||||||
|
<xsl:with-param name="targets" select="$targets"/>
|
||||||
|
<xsl:with-param name="nextComparison" select="$nextComparison"/>
|
||||||
|
<xsl:with-param name="refreshPeriod" select="$refreshPeriod"/>
|
||||||
|
<xsl:with-param name="sudo" select="$sudo"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
|
||||||
|
<main class="ui main container">
|
||||||
|
<h1 class="ui header"><xsl:value-of select="$targets"/></h1>
|
||||||
|
|
||||||
|
<table id="scanResultsTable" style="width:100%" role="grid" class="ui sortable small table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Etat</th>
|
||||||
|
<th>Adresse IP</th>
|
||||||
|
<th>Nom</th>
|
||||||
|
<th>Fabricant</th>
|
||||||
|
<th class="six wide">Services</th>
|
||||||
|
<th>Scanner les services</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<xsl:apply-templates select="host | $init/host[not(address/@addr=$current/host/address/@addr)][not(status/@state='down')]"/>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="ui footer segment">
|
||||||
|
lanScan est basé sur <a href="https://nmap.org/" target="_blank">Nmap</a>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var table = $('#scanResultsTable').DataTable({
|
||||||
|
buttons : ['copy', 'excel', 'pdf'],
|
||||||
|
fixedHeader: true,
|
||||||
|
lengthMenu : [
|
||||||
|
[256, 512, 1024, 2048, -1],
|
||||||
|
[256, 512, 1024, 2048, "All"]
|
||||||
|
],
|
||||||
|
responsive: true,
|
||||||
|
colReorder: true,
|
||||||
|
buttons : ['copy', 'excel', 'pdf']
|
||||||
|
})
|
||||||
|
table.order([1, 'asc']).draw()
|
||||||
|
|
||||||
|
$('.ui.dropdown').dropdown()
|
||||||
|
|
||||||
|
function hostScanning(link) {
|
||||||
|
link.getElementsByTagName('i')[0].className = 'loading spinner icon'
|
||||||
|
$.toast({
|
||||||
|
title : 'Scan en cours...',
|
||||||
|
message : 'Merci de patienter',
|
||||||
|
class : 'info',
|
||||||
|
showIcon : 'satellite dish',
|
||||||
|
displayTime: 0,
|
||||||
|
closeIcon : true,
|
||||||
|
position : 'bottom right',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<xsl:apply-templates select="runstats">
|
||||||
|
<xsl:with-param name="init" select="$init"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="host">
|
||||||
|
<xsl:variable name="addr" select="address/@addr"/>
|
||||||
|
<xsl:variable name="initHost" select="$init/host[address/@addr=$addr]"/>
|
||||||
|
<xsl:variable name="currentHost" select="$current/host[address/@addr=$addr]"/>
|
||||||
|
<xsl:variable name="hostAddress">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="hostnames/hostname/@name">
|
||||||
|
<xsl:value-of select="hostnames/hostname/@name"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="address/@addr"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:variable>
|
||||||
|
<tr>
|
||||||
|
<xsl:attribute name="class">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$currentHost/status/@state='up'">positive</xsl:when>
|
||||||
|
<xsl:otherwise>negative</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:attribute>
|
||||||
|
<td>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$currentHost">
|
||||||
|
<div>
|
||||||
|
<xsl:attribute name="class">
|
||||||
|
<xsl:text>ui mini circular label </xsl:text>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$currentHost/status/@state='up'">green</xsl:when>
|
||||||
|
<xsl:otherwise>red</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:value-of select="$currentHost/status/@state"/>
|
||||||
|
</div>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise><div class="ui red circular label">down</div></xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<xsl:value-of select="address/@addr"/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div><b><xsl:value-of select="substring-before(hostnames/hostname/@name, '.')"/></b></div>
|
||||||
|
<xsl:if test="substring-after(hostnames/hostname/@name, '.')">
|
||||||
|
<div>.<xsl:value-of select="substring-after(hostnames/hostname/@name, '.')"/></div>
|
||||||
|
</xsl:if>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<xsl:value-of select="address[@addrtype='mac']/@vendor"/>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<xsl:apply-templates select="$initHost/ports/port[not(@portid=$currentHost/ports/port/@portid)][not(state/@state='closed')] | $currentHost/ports/port" mode="service">
|
||||||
|
<xsl:with-param name="initHost" select="$initHost"/>
|
||||||
|
<xsl:with-param name="currentHost" select="$currentHost"/>
|
||||||
|
<xsl:with-param name="hostAddress" select="$hostAddress"/>
|
||||||
|
<xsl:with-param name="class" select="'ui label'"/>
|
||||||
|
<xsl:sort select="number(@portid)" order="ascending"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="ui mini right labeled button">
|
||||||
|
<a class="ui mini icon teal button" onclick="hostScanning(this)">
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:value-of select="$basedir"/>
|
||||||
|
<xsl:text>/scan.php?preset=host&targets=</xsl:text>
|
||||||
|
<xsl:value-of select="address/@addr"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<i class="satellite dish icon"></i>
|
||||||
|
<xsl:text> Services</xsl:text>
|
||||||
|
</a>
|
||||||
|
<a class="ui mini icon teal label">
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:value-of select="$basedir"/>
|
||||||
|
<xsl:text>/?preset=host&targets=</xsl:text>
|
||||||
|
<xsl:value-of select="address/@addr"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<i class="settings icon"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
70
templates/lib/head.xsl
Normal file
70
templates/lib/head.xsl
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xsl:stylesheet
|
||||||
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
|
version="1.1">
|
||||||
|
|
||||||
|
<xsl:import href="parseCommand.xsl"/>
|
||||||
|
|
||||||
|
<xsl:template match="nmaprun" mode="head">
|
||||||
|
<xsl:param name="basedir"/>
|
||||||
|
<xsl:param name="targets"/>
|
||||||
|
<xsl:param name="nextComparison"/>
|
||||||
|
<xsl:param name="refreshPeriod"/>
|
||||||
|
<xsl:param name="sudo"/>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<xsl:if test="$refreshPeriod > 0">
|
||||||
|
<meta http-equiv="refresh">
|
||||||
|
<xsl:attribute name="content">
|
||||||
|
<xsl:value-of select="$refreshPeriod"/>
|
||||||
|
<xsl:text>;URL=</xsl:text>
|
||||||
|
<xsl:value-of select="$basedir"/>
|
||||||
|
<xsl:text>/scan.php?targets=</xsl:text>
|
||||||
|
<xsl:value-of select="$targets"/>
|
||||||
|
<xsl:text>&</xsl:text>
|
||||||
|
<xsl:call-template name="parseCommand">
|
||||||
|
<xsl:with-param name="argList" select="substring-before(substring-after(@args, ' -'), ' -oX')"/>
|
||||||
|
<xsl:with-param name="asURL" select="true()"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:text>originalURL=</xsl:text>
|
||||||
|
<xsl:value-of select="$nextComparison"/>
|
||||||
|
<xsl:text>&refreshPeriod=</xsl:text>
|
||||||
|
<xsl:value-of select="$refreshPeriod"/>
|
||||||
|
<xsl:text>&sudo=</xsl:text>
|
||||||
|
<xsl:value-of select="$sudo"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
</meta>
|
||||||
|
</xsl:if>
|
||||||
|
<title>
|
||||||
|
<xsl:text>lanScan - </xsl:text>
|
||||||
|
<xsl:value-of select="$targets"/>
|
||||||
|
</title>
|
||||||
|
<link rel="icon" href="{$basedir}/favicon.ico"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.9.3/dist/semantic.min.css"/>
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<link href="https://cdn.datatables.net/v/se/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/cr-2.0.4/fc-5.0.3/fh-4.0.1/r-3.0.3/datatables.min.css" rel="stylesheet"/>
|
||||||
|
<link href="{$basedir}/style.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.2/semantic.min.js"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.polyfills.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/v/se/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/cr-2.0.4/fc-5.0.3/fh-4.0.1/r-3.0.3/datatables.min.js"></script>
|
||||||
|
<script>
|
||||||
|
DataTable.ext.type.detect.unshift(function (d) {
|
||||||
|
return /[\d]+\.[\d]+\.[\d]+\.[\d]+/.test(d)
|
||||||
|
? 'ipv4-address'
|
||||||
|
: null;
|
||||||
|
});
|
||||||
|
|
||||||
|
DataTable.ext.type.order['ipv4-address-pre'] = function (ipAddress) {
|
||||||
|
[a, b, c, d] = ipAddress.split(".").map(Number)
|
||||||
|
return 16777216*a + 65536*b + 256*c + d;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
</xsl:template>
|
||||||
|
</xsl:stylesheet>
|
80
templates/lib/nav.xsl
Normal file
80
templates/lib/nav.xsl
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xsl:stylesheet
|
||||||
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
|
version="1.1">
|
||||||
|
|
||||||
|
<xsl:import href="parseCommand.xsl"/>
|
||||||
|
|
||||||
|
<xsl:template match="nmaprun" mode="nav">
|
||||||
|
<xsl:param name="basedir"/>
|
||||||
|
<xsl:param name="targets"/>
|
||||||
|
<xsl:param name="nextComparison"/>
|
||||||
|
<xsl:param name="refreshPeriod"/>
|
||||||
|
<xsl:param name="sudo"/>
|
||||||
|
<nav class="ui inverted teal fixed menu">
|
||||||
|
<a class="ui teal button item" href="{$basedir}">
|
||||||
|
<xsl:text>lan</xsl:text>
|
||||||
|
<svg class="logo" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 24 24" xml:space="preserve" width="40" height="40" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs206"/><g id="g998" transform="matrix(0,0.04687491,-0.04687491,0,24,2.2682373e-5)"><g id="g147"><g id="g145"><path d="m 322.065,92.046 c -46.24,0 -83.851,37.619 -83.851,83.857 v 168.712 c 0,25.224 -21.148,45.745 -46.372,45.745 -25.224,0 -46.372,-20.521 -46.372,-45.745 V 199.464 h -38.114 v 145.151 c 0,46.24 38.246,83.859 84.486,83.859 46.24,0 84.486,-37.619 84.486,-83.859 V 175.903 c 0,-25.223 20.514,-45.743 45.737,-45.743 25.223,0 45.737,20.521 45.737,45.743 v 134.092 h 38.114 V 175.903 c 0,-46.239 -37.611,-83.857 -83.851,-83.857 z" id="path143"/></g></g><g id="g153"><g id="g151"><path d="M 144.198,0 H 108.625 C 98.101,0 89.568,8.746 89.568,19.271 c 0,1.157 0.121,2.328 0.318,3.598 h 73.052 c 0.197,-1.27 0.318,-2.441 0.318,-3.598 C 163.256,8.746 154.723,0 144.198,0 Z" id="path149"/></g></g><g id="g159"><g id="g157"><path d="m 420.183,486.591 h -71.731 c -0.626,2.541 -0.978,4.077 -0.978,6.176 0,10.525 8.532,19.234 19.057,19.234 h 35.573 c 10.525,0 19.057,-8.709 19.057,-19.234 0,-2.098 -0.352,-3.635 -0.978,-6.176 z" id="path155"/></g></g><g id="g165"><g id="g163"><rect x="87.027" y="41.925999" width="80.040001" height="138.481" id="rect161"/></g></g><g id="g171"><g id="g169"><rect x="344.93301" y="329.052" width="80.040001" height="138.481" id="rect167"/></g></g><g id="g173"></g><g id="g175"></g><g id="g177"></g><g id="g179"></g><g id="g181"></g><g id="g183"></g><g id="g185"></g><g id="g187"></g><g id="g189"></g><g id="g191"></g><g id="g193"></g><g id="g195"></g><g id="g197"></g><g id="g199"></g><g id="g201"></g></g></svg>
|
||||||
|
<xsl:text>can</xsl:text>
|
||||||
|
</a>
|
||||||
|
<form id="lanScanForm" class="right menu">
|
||||||
|
<xsl:call-template name="parseCommand">
|
||||||
|
<xsl:with-param name="argList" select="substring-before(substring-after(@args, ' -'), ' -oX')"/>
|
||||||
|
<xsl:with-param name="asURL" select="false()"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<div class="ui category search item">
|
||||||
|
<div id="targetsInputDiv" class="ui icon input">
|
||||||
|
<input class="prompt" type="text" id="targetsInput" name="targets" oninput="hiddenInput.value=this.value"
|
||||||
|
pattern="[a-zA-Z0-9._\/ \-]+" value="{$targets}" placeholder="Scanner un réseau..."
|
||||||
|
title="Les cibles peuvent être spécifiées par des noms d'hôtes, des adresses IP, des adresses de réseaux, etc.
|
||||||
|
Exemples: 192.168.1.0/24 scanme.nmap.org 10.0-255.0-255.1-254"/>
|
||||||
|
<i class="satellite dish icon"></i>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" name="originalURL" value="{$nextComparison}"/>
|
||||||
|
<input type="hidden" name="refreshPeriod" value="{$refreshPeriod}"/>
|
||||||
|
<input type="hidden" name="sudo" value="{$sudo}"/>
|
||||||
|
<button id="hiddenButton" style="display: none;" type="submit" formmethod="get" formaction="{$basedir}/scan.php"></button>
|
||||||
|
<button id="refreshButton" class="ui teal icon submit button" type="submit" formmethod="get" formaction="{$basedir}/scan.php">
|
||||||
|
<i class="sync icon"></i>
|
||||||
|
</button>
|
||||||
|
<button class="ui teal icon submit button" type="submit" formmethod="get" formaction="{$basedir}/">
|
||||||
|
<i class="settings icon"></i>
|
||||||
|
</button>
|
||||||
|
<a class="ui teal icon button" href="https://nmap.org/man/fr/index.html" target="_blank">
|
||||||
|
<i class="question circle icon"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
hiddenButton.onclick = function(event) {
|
||||||
|
if (lanScanForm.checkValidity()) {
|
||||||
|
targetsInputDiv.classList.add('loading')
|
||||||
|
$.toast({
|
||||||
|
title : 'Scan en cours...',
|
||||||
|
message : 'Merci de patienter',
|
||||||
|
class : 'info',
|
||||||
|
showIcon : 'satellite dish',
|
||||||
|
displayTime: 0,
|
||||||
|
closeIcon : true,
|
||||||
|
position : 'bottom right',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
refreshButton.onclick = function(event) {
|
||||||
|
refreshButton.getElementsByTagName('i')[0].className = 'loading spinner icon'
|
||||||
|
$.toast({
|
||||||
|
title : 'Scan en cours...',
|
||||||
|
message : 'Merci de patienter',
|
||||||
|
class : 'info',
|
||||||
|
showIcon : 'satellite dish',
|
||||||
|
displayTime: 0,
|
||||||
|
closeIcon : true,
|
||||||
|
position : 'bottom right',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</xsl:template>
|
||||||
|
</xsl:stylesheet>
|
@ -4,17 +4,19 @@
|
|||||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
version="1.1">
|
version="1.1">
|
||||||
|
|
||||||
<xsl:template match="port">
|
<xsl:template match="port" mode="service">
|
||||||
<xsl:param name="hostAddress"/>
|
<xsl:param name="hostAddress"/>
|
||||||
<xsl:param name="initHost"/>
|
<xsl:param name="initHost"/>
|
||||||
<xsl:param name="currentHost"/>
|
<xsl:param name="currentHost"/>
|
||||||
|
<xsl:param name="class"/>
|
||||||
<xsl:variable name="portid" select="@portid"/>
|
<xsl:variable name="portid" select="@portid"/>
|
||||||
<xsl:variable name="initPort" select="$initHost/ports/port[@portid=$portid]"/>
|
<xsl:variable name="initPort" select="$initHost/ports/port[@portid=$portid]"/>
|
||||||
<xsl:variable name="currentPort" select="$currentHost/ports/port[@portid=$portid]"/>
|
<xsl:variable name="currentPort" select="$currentHost/ports/port[@portid=$portid]"/>
|
||||||
|
|
||||||
<a target="_blank">
|
<a target="_blank">
|
||||||
<xsl:attribute name="class">
|
<xsl:attribute name="class">
|
||||||
<xsl:text>ui label </xsl:text>
|
<xsl:value-of select="$class"/>
|
||||||
|
<xsl:text> </xsl:text>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$currentPort/script[@id='http-info']/elem[@key='status']>=500">red</xsl:when>
|
<xsl:when test="$currentPort/script[@id='http-info']/elem[@key='status']>=500">red</xsl:when>
|
||||||
<xsl:when test="$currentPort/script[@id='http-info']/elem[@key='status']>=400">orange</xsl:when>
|
<xsl:when test="$currentPort/script[@id='http-info']/elem[@key='status']>=400">orange</xsl:when>
|
||||||
@ -24,13 +26,33 @@
|
|||||||
<xsl:otherwise>red</xsl:otherwise>
|
<xsl:otherwise>red</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="(service/@name='microsoft-ds' or service/@name='netbios-ssn') and ../../hostscript/script[@id='smb-shares-size']/table"> mini dropdown button share-size</xsl:when>
|
<xsl:when test="$currentPort/script[@id='smb-shares-size']/table"> mini dropdown button share-size</xsl:when>
|
||||||
<xsl:otherwise> small</xsl:otherwise>
|
<xsl:otherwise> small</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
|
<xsl:if test="$currentPort/script[@id='smb-shares-size']/table">
|
||||||
|
<xsl:attribute name="style">
|
||||||
|
<xsl:for-each select="$currentPort/script[@id='smb-shares-size']/table">
|
||||||
|
<xsl:sort select="elem[@key='FreeSize'] div elem[@key='TotalSize']" order="ascending"/>
|
||||||
|
<xsl:if test="position()=1">
|
||||||
|
<xsl:text>--free: </xsl:text>
|
||||||
|
<xsl:value-of select="elem[@key='FreeSize']"/>
|
||||||
|
<xsl:text>; --total: </xsl:text>
|
||||||
|
<xsl:value-of select="elem[@key='TotalSize']"/>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:for-each>
|
||||||
|
</xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
<xsl:if test="service/@name='ftp' or service/@name='ssh' or service/@name='http' or service/@name='https'">
|
<xsl:if test="service/@name='ftp' or service/@name='ssh' or service/@name='http' or service/@name='https'">
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="service/@name='http' and service/@tunnel='ssl'">
|
||||||
|
<xsl:text>https</xsl:text>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="service/@name"/>
|
<xsl:value-of select="service/@name"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
<xsl:text>://</xsl:text>
|
<xsl:text>://</xsl:text>
|
||||||
<xsl:value-of select="$hostAddress"/>
|
<xsl:value-of select="$hostAddress"/>
|
||||||
<xsl:text>:</xsl:text>
|
<xsl:text>:</xsl:text>
|
||||||
@ -60,21 +82,10 @@
|
|||||||
<xsl:value-of select="service/@name"/>
|
<xsl:value-of select="service/@name"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:if test="(service/@name='microsoft-ds' or service/@name='netbios-ssn') and ../../hostscript/script[@id='smb-shares-size']/table">
|
<xsl:if test="$currentPort/script[@id='smb-shares-size']/table">
|
||||||
<xsl:attribute name="style">
|
|
||||||
<xsl:for-each select="$currentHost/hostscript/script[@id='smb-shares-size']/table">
|
|
||||||
<xsl:sort select="elem[@key='FreeSize'] div elem[@key='TotalSize']" order="ascending"/>
|
|
||||||
<xsl:if test="position()=1">
|
|
||||||
<xsl:text>--free: </xsl:text>
|
|
||||||
<xsl:value-of select="elem[@key='FreeSize']"/>
|
|
||||||
<xsl:text>; --total: </xsl:text>
|
|
||||||
<xsl:value-of select="elem[@key='TotalSize']"/>
|
|
||||||
</xsl:if>
|
|
||||||
</xsl:for-each>
|
|
||||||
</xsl:attribute>
|
|
||||||
<i class="dropdown icon"></i>
|
<i class="dropdown icon"></i>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<xsl:apply-templates select="$currentHost/hostscript/script[@id='smb-shares-size']/table">
|
<xsl:apply-templates select="$currentPort/script[@id='smb-shares-size']/table">
|
||||||
<xsl:with-param name="hostAddress" select="$hostAddress"/>
|
<xsl:with-param name="hostAddress" select="$hostAddress"/>
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</div>
|
</div>
|
44
templates/lib/toast.xsl
Normal file
44
templates/lib/toast.xsl
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xsl:stylesheet
|
||||||
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
|
version="1.1">
|
||||||
|
|
||||||
|
<xsl:template match="runstats">
|
||||||
|
<xsl:param name="init"/>
|
||||||
|
<script>
|
||||||
|
<xsl:if test="finished/@summary">
|
||||||
|
$.toast({
|
||||||
|
title : '<xsl:value-of select="finished/@exit"/>',
|
||||||
|
message : `<xsl:value-of select="finished/@summary"/>`,
|
||||||
|
showIcon : 'satellite dish',
|
||||||
|
displayTime: 0,
|
||||||
|
closeIcon : true,
|
||||||
|
position : 'bottom right',
|
||||||
|
})
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="finished/@errormsg">
|
||||||
|
$.toast({
|
||||||
|
title : '<xsl:value-of select="finished/@exit"/>',
|
||||||
|
message : `<xsl:value-of select="finished/@errormsg"/>`,
|
||||||
|
showIcon : 'exclamation triangle',
|
||||||
|
class : 'error',
|
||||||
|
displayTime: 0,
|
||||||
|
closeIcon : true,
|
||||||
|
position : 'bottom right',
|
||||||
|
})
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:if test="$init/runstats/finished">
|
||||||
|
$.toast({
|
||||||
|
message : 'Comparaison avec les résultats du <xsl:value-of select="$init/runstats/finished/@timestr"/>',
|
||||||
|
class : 'info',
|
||||||
|
showIcon : 'calendar',
|
||||||
|
displayTime: 0,
|
||||||
|
closeIcon : true,
|
||||||
|
position : 'bottom right',
|
||||||
|
})
|
||||||
|
</xsl:if>
|
||||||
|
</script>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
@ -1,367 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<xsl:stylesheet
|
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
||||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
||||||
version="1.1">
|
|
||||||
|
|
||||||
<xsl:import href="lib/parseCommand.xsl"/>
|
|
||||||
|
|
||||||
<xsl:output method="html" encoding="UTF-8"/>
|
|
||||||
<xsl:output indent="yes"/>
|
|
||||||
<xsl:strip-space elements='*'/>
|
|
||||||
|
|
||||||
<xsl:param name="saveAs" select=""/>
|
|
||||||
<xsl:param name="compareWith" select=""/>
|
|
||||||
<xsl:param name="refreshPeriod" select="0"/>
|
|
||||||
<xsl:param name="sudo" select="false"/>
|
|
||||||
|
|
||||||
<xsl:variable name="current" select="./nmaprun"/>
|
|
||||||
<xsl:variable name="stylesheetURL" select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'href="'),'"')"/>
|
|
||||||
<xsl:variable name="basedir" select="concat($stylesheetURL, '/../..')"/>
|
|
||||||
<xsl:variable name="init" select="document($compareWith)/nmaprun"/>
|
|
||||||
<xsl:variable name="nextCompareWith">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$saveAs"><xsl:value-of select="$saveAs"/></xsl:when>
|
|
||||||
<xsl:when test="$compareWith"><xsl:value-of select="$compareWith"/></xsl:when>
|
|
||||||
<xsl:otherwise></xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:variable>
|
|
||||||
|
|
||||||
<xsl:template match="nmaprun">
|
|
||||||
<xsl:variable name="targets" select="substring-after(@args, '.xml ')"/>
|
|
||||||
|
|
||||||
<html lang="fr">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8"/>
|
|
||||||
<xsl:if test="$refreshPeriod > 0">
|
|
||||||
<meta http-equiv="refresh">
|
|
||||||
<xsl:attribute name="content">
|
|
||||||
<xsl:value-of select="$refreshPeriod"/>
|
|
||||||
<xsl:text>;URL=</xsl:text>
|
|
||||||
<xsl:value-of select="$basedir"/>
|
|
||||||
<xsl:text>/scan.php?targets=</xsl:text>
|
|
||||||
<xsl:value-of select="$targets"/>
|
|
||||||
<xsl:text>&</xsl:text>
|
|
||||||
<xsl:call-template name="parseCommand">
|
|
||||||
<xsl:with-param name="argList" select="substring-before(substring-after(@args, ' -'), ' -oX')"/>
|
|
||||||
<xsl:with-param name="asURL" select="true()"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
<xsl:text>compareWith=</xsl:text>
|
|
||||||
<xsl:value-of select="$nextCompareWith"/>
|
|
||||||
<xsl:text>&refreshPeriod=</xsl:text>
|
|
||||||
<xsl:value-of select="$refreshPeriod"/>
|
|
||||||
<xsl:text>&sudo=</xsl:text>
|
|
||||||
<xsl:value-of select="$sudo"/>
|
|
||||||
</xsl:attribute>
|
|
||||||
</meta>
|
|
||||||
</xsl:if>
|
|
||||||
<title>
|
|
||||||
<xsl:text>lanScan - </xsl:text>
|
|
||||||
<xsl:value-of select="$targets"/>
|
|
||||||
</title>
|
|
||||||
<link rel="icon" href="{$basedir}/favicon.ico"/>
|
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.9.3/dist/semantic.min.css"/>
|
|
||||||
<link href="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.css" rel="stylesheet" type="text/css"/>
|
|
||||||
<link href="https://cdn.datatables.net/v/dt/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/fh-4.0.1/r-3.0.3/cr-2.0.4/datatables.css" rel="stylesheet"/>
|
|
||||||
<link href="{$basedir}/style.css" rel="stylesheet" type="text/css"/>
|
|
||||||
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.2/semantic.min.js"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.polyfills.min.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
|
|
||||||
<script src="https://cdn.datatables.net/v/dt/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/fh-4.0.1/r-3.0.3/cr-2.0.4/datatables.js"></script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<nav class="ui inverted teal fixed menu">
|
|
||||||
<a class="ui teal button item" href="{$basedir}">
|
|
||||||
<xsl:text>lan</xsl:text>
|
|
||||||
<svg class="logo" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 24 24" xml:space="preserve" width="40" height="40" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"><defs id="defs206"/><g id="g998" transform="matrix(0,0.04687491,-0.04687491,0,24,2.2682373e-5)"><g id="g147"><g id="g145"><path d="m 322.065,92.046 c -46.24,0 -83.851,37.619 -83.851,83.857 v 168.712 c 0,25.224 -21.148,45.745 -46.372,45.745 -25.224,0 -46.372,-20.521 -46.372,-45.745 V 199.464 h -38.114 v 145.151 c 0,46.24 38.246,83.859 84.486,83.859 46.24,0 84.486,-37.619 84.486,-83.859 V 175.903 c 0,-25.223 20.514,-45.743 45.737,-45.743 25.223,0 45.737,20.521 45.737,45.743 v 134.092 h 38.114 V 175.903 c 0,-46.239 -37.611,-83.857 -83.851,-83.857 z" id="path143"/></g></g><g id="g153"><g id="g151"><path d="M 144.198,0 H 108.625 C 98.101,0 89.568,8.746 89.568,19.271 c 0,1.157 0.121,2.328 0.318,3.598 h 73.052 c 0.197,-1.27 0.318,-2.441 0.318,-3.598 C 163.256,8.746 154.723,0 144.198,0 Z" id="path149"/></g></g><g id="g159"><g id="g157"><path d="m 420.183,486.591 h -71.731 c -0.626,2.541 -0.978,4.077 -0.978,6.176 0,10.525 8.532,19.234 19.057,19.234 h 35.573 c 10.525,0 19.057,-8.709 19.057,-19.234 0,-2.098 -0.352,-3.635 -0.978,-6.176 z" id="path155"/></g></g><g id="g165"><g id="g163"><rect x="87.027" y="41.925999" width="80.040001" height="138.481" id="rect161"/></g></g><g id="g171"><g id="g169"><rect x="344.93301" y="329.052" width="80.040001" height="138.481" id="rect167"/></g></g><g id="g173"></g><g id="g175"></g><g id="g177"></g><g id="g179"></g><g id="g181"></g><g id="g183"></g><g id="g185"></g><g id="g187"></g><g id="g189"></g><g id="g191"></g><g id="g193"></g><g id="g195"></g><g id="g197"></g><g id="g199"></g><g id="g201"></g></g></svg>
|
|
||||||
<xsl:text>can</xsl:text>
|
|
||||||
</a>
|
|
||||||
<form id="lanScanForm" class="right menu" onsubmit="targetsInputDiv.classList.add('loading')">
|
|
||||||
<xsl:call-template name="parseCommand">
|
|
||||||
<xsl:with-param name="argList" select="substring-before(substring-after(@args, ' -'), ' -oX')"/>
|
|
||||||
<xsl:with-param name="asURL" select="false()"/>
|
|
||||||
</xsl:call-template>
|
|
||||||
<div class="ui category search item">
|
|
||||||
<div id="targetsInputDiv" class="ui icon input">
|
|
||||||
<input class="prompt" type="text" id="targetsInput" name="targets" oninput="hiddenInput.value=this.value"
|
|
||||||
pattern="[a-zA-Z0-9._\/ \-]+" value="{$targets}" placeholder="Scanner un réseau..."
|
|
||||||
title="Les cibles peuvent être spécifiées par des noms d'hôtes, des adresses IP, des adresses de réseaux, etc.
|
|
||||||
Exemples: 192.168.1.0/24 scanme.nmap.org 10.0-255.0-255.1-254"/>
|
|
||||||
<i class="satellite dish icon"></i>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" name="compareWith" value="{$nextCompareWith}"/>
|
|
||||||
<input type="hidden" name="refreshPeriod" value="{$refreshPeriod}"/>
|
|
||||||
<input type="hidden" name="sudo" value="{$sudo}"/>
|
|
||||||
<button id="hiddenButton" style="display: none;" type="submit" formmethod="get" formaction="{$basedir}/scan.php"></button>
|
|
||||||
<button id="refreshButton" class="ui teal icon submit button" type="submit" formmethod="get" formaction="{$basedir}/scan.php">
|
|
||||||
<i class="sync icon"></i>
|
|
||||||
</button>
|
|
||||||
<button class="ui teal icon submit button" type="submit" formmethod="get" formaction="{$basedir}/">
|
|
||||||
<i class="sliders horizontal icon"></i>
|
|
||||||
</button>
|
|
||||||
<a class="ui teal icon button" href="https://nmap.org/man/fr/index.html" target="_blank">
|
|
||||||
<i class="question circle icon"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<main class="ui main container">
|
|
||||||
<xsl:apply-templates select="host | $init/host[not(address/@addr=$current/host/address/@addr)][not(status/@state='down')]"/>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<footer class="ui footer segment">
|
|
||||||
lanScan est basé sur <a href="https://nmap.org/" target="_blank">Nmap</a>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
DataTable.ext.type.detect.unshift(function (d) {
|
|
||||||
return /[\d]+\.[\d]+\.[\d]+\.[\d]+/.test(d)
|
|
||||||
? 'ipv4-address'
|
|
||||||
: null;
|
|
||||||
});
|
|
||||||
|
|
||||||
DataTable.ext.type.order['ipv4-address-pre'] = function (ipAddress) {
|
|
||||||
[a, b, c, d] = ipAddress.split(".").map(Number)
|
|
||||||
return 16777216*a + 65536*b + 256*c + d;
|
|
||||||
};
|
|
||||||
|
|
||||||
var table = $('#scanResultsTable').DataTable({
|
|
||||||
buttons : ['copy', 'excel', 'pdf'],
|
|
||||||
fixedHeader: true,
|
|
||||||
lengthMenu : [
|
|
||||||
[256, 512, 1024, 2048, -1],
|
|
||||||
[256, 512, 1024, 2048, "All"]
|
|
||||||
],
|
|
||||||
responsive: true,
|
|
||||||
colReorder: true,
|
|
||||||
buttons : ['copy', 'excel', 'pdf']
|
|
||||||
})
|
|
||||||
table.order([1, 'asc']).draw()
|
|
||||||
|
|
||||||
$('.ui.dropdown').dropdown()
|
|
||||||
|
|
||||||
<xsl:if test="runstats/finished/@summary">
|
|
||||||
$.toast({
|
|
||||||
title : '<xsl:value-of select="runstats/finished/@exit"/>',
|
|
||||||
message : '<xsl:value-of select="runstats/finished/@summary"/>',
|
|
||||||
showIcon : 'satellite dish',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="runstats/finished/@errormsg">
|
|
||||||
$.toast({
|
|
||||||
title : '<xsl:value-of select="runstats/finished/@exit"/>',
|
|
||||||
message : '<xsl:value-of select="runstats/finished/@errormsg"/>',
|
|
||||||
showIcon : 'exclamation triangle',
|
|
||||||
class : 'error',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="$init">
|
|
||||||
$.toast({
|
|
||||||
message : 'Comparaison avec les résultats du <xsl:value-of select="$init/runstats/finished/@timestr"/>',
|
|
||||||
class : 'info',
|
|
||||||
showIcon : 'calendar',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
</xsl:if>
|
|
||||||
|
|
||||||
hiddenButton.onclick = function(event) {
|
|
||||||
if (lanScanForm.checkValidity()) {
|
|
||||||
targetsInputDiv.classList.add('loading')
|
|
||||||
$.toast({
|
|
||||||
title : 'Scan en cours...',
|
|
||||||
message : 'Merci de patienter',
|
|
||||||
class : 'info',
|
|
||||||
showIcon : 'satellite dish',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
refreshButton.onclick = function(event) {
|
|
||||||
refreshButton.getElementsByTagName('i')[0].className = 'loading spinner icon'
|
|
||||||
$.toast({
|
|
||||||
title : 'Scan en cours...',
|
|
||||||
message : 'Merci de patienter',
|
|
||||||
class : 'info',
|
|
||||||
showIcon : 'satellite dish',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function hostScanning(link) {
|
|
||||||
link.getElementsByTagName('i')[0].className = 'loading spinner icon'
|
|
||||||
$.toast({
|
|
||||||
title : 'Scan en cours...',
|
|
||||||
message : 'Merci de patienter',
|
|
||||||
class : 'info',
|
|
||||||
showIcon : 'satellite dish',
|
|
||||||
displayTime: 0,
|
|
||||||
closeIcon : true,
|
|
||||||
position : 'bottom right',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
<xsl:template match="host">
|
|
||||||
<xsl:variable name="addr" select="address/@addr"/>
|
|
||||||
<xsl:variable name="initHost" select="$init/host[address/@addr=$addr]"/>
|
|
||||||
<xsl:variable name="currentHost" select="$current/host[address/@addr=$addr]"/>
|
|
||||||
<xsl:variable name="hostAddress">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="hostnames/hostname/@name">
|
|
||||||
<xsl:value-of select="hostnames/hostname/@name"/>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:value-of select="address/@addr"/>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:variable>
|
|
||||||
|
|
||||||
<h1 class="ui header">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="hostnames/hostname/@name">
|
|
||||||
<xsl:value-of select="hostnames/hostname/@name"/>
|
|
||||||
<div class="sub header"><xsl:value-of select="address/@addr"/></div>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:value-of select="address/@addr"/>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<table id="scanResultsTable" style="width:100%" role="grid" class="ui sortable small table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Etat</th>
|
|
||||||
<th>Protocole</th>
|
|
||||||
<th>Port</th>
|
|
||||||
<th>Service</th>
|
|
||||||
<th>Produit</th>
|
|
||||||
<th>Version</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<xsl:apply-templates select="$currentHost/ports/port | $initHost/ports/port[not(@portid=$currentHost/ports/port/@portid)][not(state/@state='closed')]">
|
|
||||||
<xsl:with-param name="initHost" select="$initHost"/>
|
|
||||||
<xsl:with-param name="currentHost" select="$currentHost"/>
|
|
||||||
<xsl:with-param name="hostAddress" select="$hostAddress"/>
|
|
||||||
<xsl:sort select="number(@portid)" order="ascending"/>
|
|
||||||
</xsl:apply-templates>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
|
|
||||||
<xsl:template match="port">
|
|
||||||
<xsl:param name="hostAddress"/>
|
|
||||||
<xsl:param name="initHost"/>
|
|
||||||
<xsl:param name="currentHost"/>
|
|
||||||
<xsl:variable name="portid" select="@portid"/>
|
|
||||||
<xsl:variable name="initPort" select="$initHost/ports/port[@portid=$portid]"/>
|
|
||||||
<xsl:variable name="currentPort" select="$currentHost/ports/port[@portid=$portid]"/>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<xsl:attribute name="class">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$currentPort/script[@id='http-info']/elem[@key='status']>=500">negative</xsl:when>
|
|
||||||
<xsl:when test="$currentPort/script[@id='http-info']/elem[@key='status']>=400">warning</xsl:when>
|
|
||||||
<xsl:when test="$currentPort/script[@id='http-info']/elem[@key='status']>=200">positive</xsl:when>
|
|
||||||
<xsl:when test="$currentPort/state/@state='open'">positive</xsl:when>
|
|
||||||
<xsl:when test="$currentPort/state/@state='filtered'">warning</xsl:when>
|
|
||||||
<xsl:otherwise>negative</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:attribute>
|
|
||||||
<td>
|
|
||||||
<div>
|
|
||||||
<xsl:attribute name="class">
|
|
||||||
<xsl:text>ui mini circular label </xsl:text>
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$currentPort/state/@state='open'">green</xsl:when>
|
|
||||||
<xsl:when test="$currentPort/state/@state='filtered'">orange</xsl:when>
|
|
||||||
<xsl:otherwise>red</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:attribute>
|
|
||||||
<xsl:value-of select="$currentPort/state/@state"/>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td style="text-transform: uppercase">
|
|
||||||
<xsl:value-of select="@protocol"/>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<xsl:value-of select="@portid"/>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a>
|
|
||||||
<xsl:attribute name="class">
|
|
||||||
<xsl:text>ui mini fluid button </xsl:text>
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="$currentPort/script[@id='http-info']/elem[@key='status']>=500">red</xsl:when>
|
|
||||||
<xsl:when test="$currentPort/script[@id='http-info']/elem[@key='status']>=400">orange</xsl:when>
|
|
||||||
<xsl:when test="$currentPort/script[@id='http-info']/elem[@key='status']>=200">green</xsl:when>
|
|
||||||
<xsl:when test="$currentPort/state/@state='open'">green</xsl:when>
|
|
||||||
<xsl:when test="$currentPort/state/@state='filtered'">orange</xsl:when>
|
|
||||||
<xsl:otherwise>red</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:attribute>
|
|
||||||
<xsl:if test="service/@name='ftp' or service/@name='ssh' or service/@name='http' or service/@name='https'">
|
|
||||||
<xsl:attribute name="href">
|
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="service/@name='http' and service/@tunnel='ssl'">
|
|
||||||
<xsl:text>https</xsl:text>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:value-of select="service/@name"/>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
<xsl:text>://</xsl:text>
|
|
||||||
<xsl:value-of select="$hostAddress"/>
|
|
||||||
<xsl:text>:</xsl:text>
|
|
||||||
<xsl:value-of select="@portid"/>
|
|
||||||
</xsl:attribute>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="service/@name='ms-wbt-server'">
|
|
||||||
<xsl:attribute name="href">
|
|
||||||
<xsl:text>rdp.php?v=</xsl:text>
|
|
||||||
<xsl:value-of select="$hostAddress"/>
|
|
||||||
<xsl:text>&p=</xsl:text>
|
|
||||||
<xsl:value-of select="@portid"/>
|
|
||||||
</xsl:attribute>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:if test="script[@id='http-info']/elem[@key='title']">
|
|
||||||
<xsl:attribute name="title">
|
|
||||||
<xsl:value-of select="script[@id='http-info']/elem[@key='title']"/>
|
|
||||||
</xsl:attribute>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:value-of select="service/@name"/>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<xsl:value-of select="service/@product"/>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<xsl:value-of select="service/@version"/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
|
Reference in New Issue
Block a user