rescan named scan

This commit is contained in:
Adrien MALINGREY 2025-02-05 21:09:14 +01:00
parent 72396e5071
commit 4e0a723ef0
12 changed files with 465 additions and 306 deletions

View File

@ -7,6 +7,6 @@ $STYLESHEETSDIR = "stylesheets";
$NMAP = "sudo nmap"; # nmap command, E.g. 'nmap', 'sudo nmap' for root privileges or '/usr/bin/nmap' if not in PATH
$DATADIR = ".";
$SCRIPTARGSFILE = "script-args.ini";
$LANSCANOPTIONS = "-PSmicrosoft-ds -F -T5 --datadir '$DATADIR' --script http-info,smb-shares-size --script-args-file '$SCRIPTARGSFILE' -oX - --stylesheet $BASEDIR/$STYLESHEETSDIR/lanScan.xsl";
$HOSTSCANOPTIONS = "-A -T5 --datadir '$DATADIR' --script http-info,smb-shares-size --script-args-file '$SCRIPTARGSFILE' -oX - --stylesheet $BASEDIR/$STYLESHEETSDIR/hostScan.xsl";
$CUSTOMSCANOPTIONS = "--datadir '$DATADIR' --script-args-file '$SCRIPTARGSFILE' -oX - --stylesheet $BASEDIR/$STYLESHEETSDIR/lanScan.xsl";
$LANSCANOPTIONS = "-PSmicrosoft-ds -F -T5 --datadir '$DATADIR' --script http-info,smb-shares-size --script-args-file '$SCRIPTARGSFILE'";
$HOSTSCANOPTIONS = "-A -T5 --datadir '$DATADIR' --script http-info,smb-shares-size --script-args-file '$SCRIPTARGSFILE'";
$CUSTOMSCANOPTIONS = "--datadir '$DATADIR' --script-args-file '$SCRIPTARGSFILE'";

220
index.php
View File

@ -2,114 +2,138 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8" />
<title>lanScan</title>
<link rel="icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.9.3/dist/semantic.min.css" />
<link rel="stylesheet" type="text/css" href="style.css" />
<style>
body {
background-image: url(bg.jpg);
background-size: cover;
}
<head>
<meta charset="utf-8" />
<title>lanScan</title>
<link rel="icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css"
href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.9.3/dist/semantic.min.css" />
<link rel="stylesheet" type="text/css" href="style.css" />
<style>
body {
background-image: url(bg.jpg);
background-size: cover;
}
body>.grid {
height: 100%;
}
body>.grid {
height: 100%;
}
.logo {
margin-right: 0 !important;
}
</style>
</head>
.logo {
margin-right: 0 !important;
}
</style>
</head>
<body>
<body>
<div class="ui middle aligned center aligned inverted grid">
<div class="column" style="max-width: 450px;">
<h2 class="ui inverted teal fluid image header logo">
lan<?php include 'logo.svg'; ?>can
</h2>
<div class="ui center aligned inverted grid">
<div class="column" style="max-width: 450px;">
<h2 class="ui inverted teal fluid image header logo" style="margin-top: 15vh">
lan<?php include 'logo.svg'; ?>can
</h2>
<?php if (isset($errorMessage)) { ?>
<div class="ui negative message">
<i class="close icon"></i>
<div class="header">Erreur</div>
<p><?= $errorMessage ?></p>
</div>
<?php } ?>
<form id="scanForm" class="ui large form initial inverted" action="scan.php" method="get">
<div class="ui left aligned stacked segment inverted">
<h4 class="ui header">Découvrir ou superviser un réseau</h4>
<div class="inverted field">
<select id="lanSelect" name="lan" class="search clearable selection dropdown">
<option value=""><?= $_SERVER['REMOTE_ADDR']; ?>/24</option>
<?php
if (file_exists($SCANSDIR)) {
foreach (scandir($SCANSDIR) as $filename) {
if (substr($filename, -4) === '.xml') {
$name = substr($filename, 0, -4);
$name = str_replace("!", "/", $name);
echo " <option value='$name'>$name</option>\n";
}
}
}
?>
</select>
<?php if (isset($errorMessage)) { ?>
<div class="ui negative message">
<i class="close icon"></i>
<div class="header">Erreur</div>
<p><?= $errorMessage ?></p>
</div>
<div class="ui error message"></div>
<button type="submit" class="ui fluid large teal labeled icon submit button">
<i class="satellite dish icon"></i>Scanner
</button>
</div>
<a href="options.php">Options avancées</a>
</form>
<?php } ?>
<form id="scanForm" class="ui large form initial inverted" action="scan.php" method="get">
<div class="ui left aligned stacked segment inverted">
<h4 class="ui header">Découvrir ou superviser un réseau</h4>
<div class="inverted field">
<div class="ui large input">
<input id="nameInput" type="text" name="lan" placeholder="<?= $_SERVER['REMOTE_ADDR']; ?>"
list="targetsList" pattern="[a-zA-Z0-9._\/ \-]+" required title="Les cibles peuvent être spécifiées par des noms d'hôtes, des adresses IP, des adresses de réseaux, etc.
Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.0-255.0-255.1-254" />
</div>
</div>
<div class="field">
<label for="nameInput">Enregistrer sous le nom (optionnel)</label>
<div class="ui small input">
<input id="nameInput" type="text" name="name" placeholder="Réseau local"
pattern='[^&lt;&gt;:&quot;\\\/\|@?]+' title="Caractères interdits : &lt;&gt;:&quot;\/|@?">
</div>
</div>
<div class="ui error message"></div>
<button type="submit" class="ui fluid large teal labeled icon submit button">
<i class="satellite dish icon"></i>Scanner
</button>
<div class="ui divider"></div>
<a href="options.php">Options avancées</a>
</div>
</form>
<?php if (file_exists($SCANSDIR)) { ?>
<div class="ui inverted segment">
<div class="ui inverted accordion">
<div class="title"><i class="dropdown icon"></i>Scans enregistrés</div>
<div class="content">
<table class="ui very basic inverted compact table">
<tbody>
<?php
foreach (scandir($SCANSDIR) as $filename) {
if (substr($filename, -4) == '.xml') {
$name = str_replace('!', '/', substr_replace($filename, '', -4));
echo "<tr><td class='selectable'><a href='$SCANSDIR/" . rawurlencode($filename) . "'>$name</a></td><td class='collapsing'><a href='rescan.php?name=$name' class='ui mini labelled button' onclick='rescan(this)'><i class='sync icon'></i>Rescanner</a></td></tr>\n";
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.2/semantic.min.js"></script>
<script>
$('#lanSelect').dropdown({
allowAdditions: true,
clearable: true
<datalist id='targetsList'>
<option value="<?= $_SERVER['REMOTE_ADDR']; ?>/24"></option>
<option value="<?= $_SERVER['SERVER_NAME']; ?>"></option>
</datalist>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.2/semantic.min.js"></script>
<script>
$('.ui.accordion').accordion()
scanForm.onsubmit = function (event) {
if (this.checkValidity()) {
scanForm.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
} else {
event.preventDefault()
this.reportValidity()
}
}
$('#scanForm').form({
fields: {
lan: {
identifier: 'lanSelect',
rules: [{
type: 'regExp',
value: /[a-zA-Z0-9._\/ \-]+/,
prompt: "Les cibles peuvent être spécifiées par des noms d'hôtes, des adresses IP, des adresses de réseaux, etc.<br/>Exemples : <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.0-255.0-255.1-254"
}]
}
}
});
function rescan(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>
scanForm.onsubmit = function(event) {
if (this.checkValidity()) {
scanForm.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
} else {
event.preventDefault()
this.reportValidity()
}
}
</script>
</body>
</body>
</html

View File

@ -26,9 +26,9 @@
<body>
<div class="ui center aligned inverted grid">
<div class="ui middle aligned center aligned inverted grid">
<div class="column" style="max-width: 450px;">
<h2 class="ui inverted teal fluid image header logo" style="margin-top: 15vh">
<h2 class="ui inverted teal fluid image header logo">
lan<?php include 'logo.svg'; ?>can
</h2>
@ -44,58 +44,52 @@
<div class="ui left aligned stacked segment inverted">
<h4 class="ui header">Découvrir ou superviser un réseau</h4>
<div class="inverted field">
<div class="ui large input">
<input id="nameInput" type="text" name="lan" placeholder="<?= $_SERVER['REMOTE_ADDR']; ?>" list="targetsList" pattern="[a-zA-Z0-9._\/ \-]+" required
title="Les cibles peuvent être spécifiées par des noms d'hôtes, des adresses IP, des adresses de réseaux, etc.
Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.0-255.0-255.1-254" />
</div>
</div>
<div class="field">
<label for="nameInput">Enregistrer sous le nom (optionnel)</label>
<div class="ui small input">
<input id="nameInput" type="text" name="name" placeholder="Réseau local" pattern='[^&lt;&gt;:&quot;\\\/\|@?]+'
title="Caractères interdits : &lt;&gt;:&quot;\/|@?">
</div>
<select id="lanSelect" name="lan" class="search clearable selection dropdown">
<option value=""><?= $_SERVER['REMOTE_ADDR']; ?>/24</option>
<?php
if (file_exists($SCANSDIR)) {
foreach (scandir($SCANSDIR) as $filename) {
if (substr($filename, -4) === '.xml') {
$name = substr($filename, 0, -4);
$name = str_replace("!", "/", $name);
echo " <option value='$name'>$name</option>\n";
}
}
}
?>
</select>
</div>
<div class="ui error message"></div>
<button type="submit" class="ui fluid large teal labeled icon submit button">
<i class="satellite dish icon"></i>Scanner
</button>
<div class="ui divider"></div>
<a href="options.php">Options avancées</a>
</div>
<a href="options.php">Options avancées</a>
</form>
<?php if (file_exists($SCANSDIR)) { ?>
<div class="ui inverted fluid card" style="margin-top: 10vh">
<div class="content">
<div class="header">Scans enregistrés</div>
</div>
<table class="ui very basic inverted table">
<tbody>
<?php
foreach (scandir($SCANSDIR) as $filename) {
if (substr($filename, -4) == '.xml') {
$name = str_replace('!', '/', substr_replace($filename, '', -4));
echo "<tr><td class='selectable'><a href='$SCANSDIR/" . rawurlencode($filename) . "'>$name</a></td><td><a href='rescan.php?name=$name' class='ui mini labelled button'><i class='sync icon'></i>Rescanner</a></td></tr>\n";
}
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
<datalist id='targetsList'>
<option value="<?= $_SERVER['REMOTE_ADDR']; ?>/24"></option>
<option value="<?= $_SERVER['SERVER_NAME']; ?>"></option>
</datalist>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.2/semantic.min.js"></script>
<script>
$('#lanSelect').dropdown({
allowAdditions: true,
clearable: true
})
$('#scanForm').form({
fields: {
lan: {
identifier: 'lanSelect',
rules: [{
type: 'regExp',
value: /[a-zA-Z0-9._\/ \-]+/,
prompt: "Les cibles peuvent être spécifiées par des noms d'hôtes, des adresses IP, des adresses de réseaux, etc.<br/>Exemples : <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.0-255.0-255.1-254"
}]
}
}
});
scanForm.onsubmit = function(event) {
if (this.checkValidity()) {
scanForm.classList.add("loading")

147
moi.xml Normal file
View File

@ -0,0 +1,147 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE nmaprun>
<?xml-stylesheet href="https://adrien.malingrey.fr/dev/lanScan4/stylesheets/lanScan.xsl?name=Chez moi&amp;" type="text/xsl"?>
<!-- Nmap 7.93 scan initiated Wed Feb 5 20:27:12 2025 as: nmap -PSmicrosoft-ds -F -T5 -&#45;datadir . -&#45;script http-info,smb-shares-size -&#45;script-args-file script-args.ini -&#45;stylesheet &quot;https://adrien.malingrey.fr/dev/lanScan4/stylesheets/lanScan.xsl?name=Chez moi&amp;&quot; -oX - 192.168.1.0/24 -->
<nmaprun scanner="nmap" args="nmap -PSmicrosoft-ds -F -T5 -&#45;datadir . -&#45;script http-info,smb-shares-size -&#45;script-args-file script-args.ini -&#45;stylesheet &quot;https://adrien.malingrey.fr/dev/lanScan4/stylesheets/lanScan.xsl?name=Chez moi&amp;&quot; -oX - 192.168.1.0/24" start="1738783632" startstr="Wed Feb 5 20:27:12 2025" version="7.93" xmloutputversion="1.05">
<scaninfo type="syn" protocol="tcp" numservices="100" services="7,9,13,21-23,25-26,37,53,79-81,88,106,110-111,113,119,135,139,143-144,179,199,389,427,443-445,465,513-515,543-544,548,554,587,631,646,873,990,993,995,1025-1029,1110,1433,1720,1723,1755,1900,2000-2001,2049,2121,2717,3000,3128,3306,3389,3986,4899,5000,5009,5051,5060,5101,5190,5357,5432,5631,5666,5800,5900,6000-6001,6646,7070,8000,8008-8009,8080-8081,8443,8888,9100,9999-10000,32768,49152-49157"/>
<verbose level="0"/>
<debugging level="0"/>
<hosthint><status state="up" reason="arp-response" reason_ttl="0"/>
<address addr="192.168.1.20" addrtype="ipv4"/>
<address addr="DA:08:9B:45:7C:FC" addrtype="mac"/>
<hostnames>
</hostnames>
</hosthint>
<hosthint><status state="up" reason="arp-response" reason_ttl="0"/>
<address addr="192.168.1.46" addrtype="ipv4"/>
<address addr="BE:80:98:8E:1D:16" addrtype="mac"/>
<hostnames>
</hostnames>
</hosthint>
<hosthint><status state="up" reason="arp-response" reason_ttl="0"/>
<address addr="192.168.1.69" addrtype="ipv4"/>
<address addr="28:DF:EB:55:22:A6" addrtype="mac" vendor="Intel Corporate"/>
<hostnames>
</hostnames>
</hosthint>
<hosthint><status state="up" reason="arp-response" reason_ttl="0"/>
<address addr="192.168.1.254" addrtype="ipv4"/>
<address addr="20:66:CF:18:E5:A2" addrtype="mac" vendor="Freebox SAS"/>
<hostnames>
</hostnames>
</hosthint>
<hosthint><status state="up" reason="arp-response" reason_ttl="0"/>
<address addr="192.168.1.98" addrtype="ipv4"/>
<address addr="E4:F0:42:AE:34:1E" addrtype="mac" vendor="Google"/>
<hostnames>
</hostnames>
</hosthint>
<host starttime="1738783635" endtime="1738783636"><status state="up" reason="arp-response" reason_ttl="0"/>
<address addr="192.168.1.20" addrtype="ipv4"/>
<address addr="DA:08:9B:45:7C:FC" addrtype="mac"/>
<hostnames>
</hostnames>
<ports><extraports state="closed" count="97">
<extrareasons reason="reset" count="97" proto="tcp" ports="7,9,13,21,23,25-26,37,79,81,88,106,110-111,113,119,135,139,143-144,179,199,389,427,443-445,465,513-515,543-544,548,554,587,631,646,873,990,993,995,1025-1029,1110,1433,1720,1723,1755,1900,2000-2001,2049,2121,2717,3000,3128,3306,3389,3986,4899,5000,5009,5051,5060,5101,5190,5357,5432,5631,5666,5800,5900,6000-6001,6646,7070,8000,8008-8009,8080-8081,8443,8888,9100,9999-10000,32768,49152-49157"/>
</extraports>
<port protocol="tcp" portid="22"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="ssh" method="table" conf="3"/></port>
<port protocol="tcp" portid="53"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="domain" method="table" conf="3"/></port>
<port protocol="tcp" portid="80"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="http" method="table" conf="3"/><script id="http-info" output="&#xa; status-line: HTTP/1.1 200 OK&#xd;&#xa;&#xa; status: 200&#xa; title: Welcome page"><elem key="status-line">HTTP/1.1 200 OK&#xd;&#xa;</elem>
<elem key="status">200</elem>
<elem key="title">Welcome page</elem>
</script></port>
</ports>
<times srtt="186" rttvar="26" to="50000"/>
</host>
<host starttime="1738783635" endtime="1738783636"><status state="up" reason="arp-response" reason_ttl="0"/>
<address addr="192.168.1.46" addrtype="ipv4"/>
<address addr="BE:80:98:8E:1D:16" addrtype="mac"/>
<hostnames>
</hostnames>
<ports><extraports state="closed" count="100">
<extrareasons reason="reset" count="100" proto="tcp" ports="7,9,13,21-23,25-26,37,53,79-81,88,106,110-111,113,119,135,139,143-144,179,199,389,427,443-445,465,513-515,543-544,548,554,587,631,646,873,990,993,995,1025-1029,1110,1433,1720,1723,1755,1900,2000-2001,2049,2121,2717,3000,3128,3306,3389,3986,4899,5000,5009,5051,5060,5101,5190,5357,5432,5631,5666,5800,5900,6000-6001,6646,7070,8000,8008-8009,8080-8081,8443,8888,9100,9999-10000,32768,49152-49157"/>
</extraports>
</ports>
<times srtt="10978" rttvar="8968" to="50000"/>
</host>
<host starttime="1738783635" endtime="1738783635"><status state="up" reason="arp-response" reason_ttl="0"/>
<address addr="192.168.1.69" addrtype="ipv4"/>
<address addr="28:DF:EB:55:22:A6" addrtype="mac" vendor="Intel Corporate"/>
<hostnames>
</hostnames>
<ports><extraports state="closed" count="100">
<extrareasons reason="reset" count="100" proto="tcp" ports="7,9,13,21-23,25-26,37,53,79-81,88,106,110-111,113,119,135,139,143-144,179,199,389,427,443-445,465,513-515,543-544,548,554,587,631,646,873,990,993,995,1025-1029,1110,1433,1720,1723,1755,1900,2000-2001,2049,2121,2717,3000,3128,3306,3389,3986,4899,5000,5009,5051,5060,5101,5190,5357,5432,5631,5666,5800,5900,6000-6001,6646,7070,8000,8008-8009,8080-8081,8443,8888,9100,9999-10000,32768,49152-49157"/>
</extraports>
</ports>
<times srtt="4760" rttvar="809" to="50000"/>
</host>
<host starttime="1738783635" endtime="1738783636"><status state="up" reason="arp-response" reason_ttl="0"/>
<address addr="192.168.1.98" addrtype="ipv4"/>
<address addr="E4:F0:42:AE:34:1E" addrtype="mac" vendor="Google"/>
<hostnames>
</hostnames>
<ports><extraports state="closed" count="97">
<extrareasons reason="reset" count="97" proto="tcp" ports="7,9,13,21-23,25-26,37,53,79-81,88,106,110-111,113,119,135,139,143-144,179,199,389,427,443-445,465,513-515,543-544,548,554,587,631,646,873,990,993,995,1025-1029,1110,1433,1720,1723,1755,1900,2000-2001,2049,2121,2717,3000,3128,3306,3389,3986,4899,5000,5009,5051,5060,5101,5190,5357,5432,5631,5666,5800,5900,6000-6001,6646,7070,8000,8080-8081,8888,9100,9999-10000,32768,49152-49157"/>
</extraports>
<port protocol="tcp" portid="8008"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="http" method="table" conf="3"/><script id="http-info" output="&#xa; status-line: HTTP/1.1 404 Not Found&#xd;&#xa;&#xa; status: 404"><elem key="status-line">HTTP/1.1 404 Not Found&#xd;&#xa;</elem>
<elem key="status">404</elem>
</script></port>
<port protocol="tcp" portid="8009"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="ajp13" method="table" conf="3"/></port>
<port protocol="tcp" portid="8443"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="https-alt" method="table" conf="3"/><script id="http-info" output="&#xa; status-line: HTTP/1.1 404 Not Found&#xd;&#xa;&#xa; status: 404"><elem key="status-line">HTTP/1.1 404 Not Found&#xd;&#xa;</elem>
<elem key="status">404</elem>
</script></port>
</ports>
<times srtt="5186" rttvar="720" to="50000"/>
</host>
<host starttime="1738783635" endtime="1738783636"><status state="up" reason="arp-response" reason_ttl="0"/>
<address addr="192.168.1.254" addrtype="ipv4"/>
<address addr="20:66:CF:18:E5:A2" addrtype="mac" vendor="Freebox SAS"/>
<hostnames>
<hostname name="mafreebox.freebox.fr" type="PTR"/>
</hostnames>
<ports><extraports state="closed" count="93">
<extrareasons reason="reset" count="93" proto="tcp" ports="7,9,13,22-23,25-26,37,79,81,88,106,110-111,113,119,135,139,143-144,179,199,389,427,444,465,513-515,543-544,548,587,631,646,873,990,993,995,1025-1029,1110,1433,1720,1723,1755,1900,2000-2001,2049,2121,2717,3000,3128,3306,3389,3986,4899,5000,5009,5051,5060,5101,5190,5432,5631,5666,5800,5900,6000-6001,6646,7070,8000,8008-8009,8080-8081,8443,8888,9100,9999-10000,32768,49152-49157"/>
</extraports>
<port protocol="tcp" portid="21"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="ftp" method="table" conf="3"/></port>
<port protocol="tcp" portid="53"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="domain" method="table" conf="3"/></port>
<port protocol="tcp" portid="80"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="http" method="table" conf="3"/><script id="http-info" output="&#xa; status-line: HTTP/1.1 200 OK&#xd;&#xa;&#xa; status: 200&#xa; title: Freebox OS&#xa; favicon: /favicon.ico"><elem key="status-line">HTTP/1.1 200 OK&#xd;&#xa;</elem>
<elem key="status">200</elem>
<elem key="title">Freebox OS</elem>
<elem key="favicon">/favicon.ico</elem>
</script></port>
<port protocol="tcp" portid="443"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="https" method="table" conf="3"/><script id="http-info" output="&#xa; status-line: HTTP/1.1 200 OK&#xd;&#xa;&#xa; status: 200&#xa; title: Freebox OS&#xa; favicon: /favicon.ico"><elem key="status-line">HTTP/1.1 200 OK&#xd;&#xa;</elem>
<elem key="status">200</elem>
<elem key="title">Freebox OS</elem>
<elem key="favicon">/favicon.ico</elem>
</script></port>
<port protocol="tcp" portid="445"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="microsoft-ds" method="table" conf="3"/></port>
<port protocol="tcp" portid="554"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="rtsp" method="table" conf="3"/></port>
<port protocol="tcp" portid="5357"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="wsdapi" method="table" conf="3"/></port>
</ports>
<times srtt="98" rttvar="15" to="50000"/>
</host>
<host starttime="1738783636" endtime="1738783637"><status state="up" reason="localhost-response" reason_ttl="0"/>
<address addr="192.168.1.100" addrtype="ipv4"/>
<hostnames>
<hostname name="adrien.malingrey.fr" type="PTR"/>
</hostnames>
<ports><extraports state="closed" count="93">
<extrareasons reason="reset" count="93" proto="tcp" ports="7,9,13,21-23,26,37,79,81,88,106,110-111,113,119,135,139,144,179,199,389,427,444-445,465,513-515,543-544,548,554,631,646,873,990,995,1025-1029,1110,1433,1720,1723,1755,1900,2000-2001,2049,2121,2717,3000,3128,3306,3389,3986,4899,5000,5009,5051,5060,5101,5190,5357,5432,5631,5666,5800,5900,6000-6001,6646,7070,8000,8008-8009,8080-8081,8443,8888,9100,9999-10000,32768,49152-49157"/>
</extraports>
<port protocol="tcp" portid="25"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="smtp" method="table" conf="3"/></port>
<port protocol="tcp" portid="53"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="domain" method="table" conf="3"/></port>
<port protocol="tcp" portid="80"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="http" method="table" conf="3"/><script id="http-info" output="&#xa; status-line: HTTP/1.1 301 Moved Permanently&#xd;&#xa;&#xa; status: 301"><elem key="status-line">HTTP/1.1 301 Moved Permanently&#xd;&#xa;</elem>
<elem key="status">301</elem>
</script></port>
<port protocol="tcp" portid="143"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="imap" method="table" conf="3"/></port>
<port protocol="tcp" portid="443"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="https" method="table" conf="3"/><script id="http-info" output="&#xa; status-line: HTTP/1.1 302 Moved Temporarily&#xd;&#xa;&#xa; status: 302"><elem key="status-line">HTTP/1.1 302 Moved Temporarily&#xd;&#xa;</elem>
<elem key="status">302</elem>
</script></port>
<port protocol="tcp" portid="587"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="submission" method="table" conf="3"/></port>
<port protocol="tcp" portid="993"><state state="open" reason="syn-ack" reason_ttl="64"/><service name="imaps" method="table" conf="3"/></port>
</ports>
<times srtt="16" rttvar="3" to="50000"/>
</host>
<runstats><finished time="1738783637" timestr="Wed Feb 5 20:27:17 2025" summary="Nmap done at Wed Feb 5 20:27:17 2025; 256 IP addresses (6 hosts up) scanned in 4.98 seconds" elapsed="4.98" exit="success"/><hosts up="6" down="250" total="256"/>
</runstats>
</nmaprun>

View File

@ -434,11 +434,11 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<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" : "" ?>>
<option value="s"
secondes</option>
<option value="m" <?= substr($options["--initial-rtt-timeout"] ?? "", -1) == "m" ? "selected" : "" ?>>
<option value="m"
minutes</option>
<option value="h" <?= substr($options["--initial-rtt-timeout"] ?? "", -1) == "h" ? "selected" : "" ?>>
<option value="h"
heures</option>
</select>
</div>
@ -453,13 +453,13 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<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" : "" ?>>
<option value="s"
secondes
</option>
<option value="m" <?= substr($options["--min-rtt-timeout"] ?? "", -1) == "m" ? "selected" : "" ?>>
<option value="m"
minutes
</option>
<option value="h" <?= substr($options["--min-rtt-timeout"] ?? "", -1) == "h" ? "selected" : "" ?>>
<option value="h"
heures
</option>
</select>
@ -475,13 +475,13 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<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" : "" ?>>
<option value="s"
secondes
</option>
<option value="m" <?= substr($options["--max-rtt-timeout"] ?? "", -1) == "m" ? "selected" : "" ?>>
<option value="m"
minutes
</option>
<option value="h" <?= substr($options["--max-rtt-timeout"] ?? "", -1) == "h" ? "selected" : "" ?>>
<option value="h"
heures
</option>
</select>
@ -506,11 +506,11 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<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 value="s"secondes
</option>
<option value="m" <?= substr($options["--host-timeout"] ?? "", -1) == "m" ? "selected" : "" ?>>minutes
<option value="m"minutes
</option>
<option value="h" <?= substr($options["--host-timeout"] ?? "", -1) == "h" ? "selected" : "" ?>>heures
<option value="h"heures
</option>
</select>
</div>
@ -527,11 +527,11 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<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 value="s"secondes
</option>
<option value="m" <?= substr($options["--scan-delay"] ?? "", -1) == "m" ? "selected" : "" ?>>minutes
<option value="m"minutes
</option>
<option value="h" <?= substr($options["--scan-delay"] ?? "", -1) == "h" ? "selected" : "" ?>>heures
<option value="h"heures
</option>
</select>
</div>
@ -546,13 +546,13 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<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" : "" ?>>
<option value="s"
secondes
</option>
<option value="m" <?= substr($options["--max-scan-delay"] ?? "", -1) == "m" ? "selected" : "" ?>>
<option value="m"
minutes
</option>
<option value="h" <?= substr($options["--max-scan-delay"] ?? "", -1) == "h" ? "selected" : "" ?>>heures
<option value="h"heures
</option>
</select>
</div>

View File

@ -10,7 +10,7 @@ $fileNameRegex = '/^[^<>:\/|?]+$/';
$name = filter_input(INPUT_GET, 'name', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => $fileNameRegex], "flags" => FILTER_NULL_ON_FAILURE]);
if (!$name) {
die("Paramètre manquant : name");
die("Paramètre manquant ou incorrect : name");
}
$path = "$SCANSDIR/$name.xml";

View File

@ -9,13 +9,13 @@ $name = filter_input(INPUT_GET, 'name', FILTER_VALIDATE_REGEXP, ['options' => ['
$lan = filter_input(INPUT_GET, 'lan', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => $targetsListRegex], "flags" => FILTER_NULL_ON_FAILURE]);
if ($lan) {
$cmd = "$NMAP $LANSCANOPTIONS $lan";
$cmd = "$NMAP $LANSCANOPTIONS --stylesheet '$BASEDIR/$STYLESHEETSDIR/lanScan.xsl?name=$name&' -oX - $lan";
$filename = str_replace("/", "!", $lan);
}
$host = filter_input(INPUT_GET, 'host', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => $targetsListRegex], "flags" => FILTER_NULL_ON_FAILURE]);
if ($host) {
$cmd = "$NMAP $HOSTSCANOPTIONS $host";
$cmd = "$NMAP $HOSTSCANOPTIONS --stylesheet '$BASEDIR/$STYLESHEETSDIR/hostScan.xsl?name=$name&' -oX - $host";
$filename = str_replace("/", "!", $host);
}
@ -145,7 +145,7 @@ if ($targets) {
}
}
$cmd = "$NMAP$options $CUSTOMSCANOPTIONS $targets";
$cmd = "$NMAP$options $CUSTOMSCANOPTIONS --stylesheet $BASEDIR/$STYLESHEETSDIR/lanScan.xsl?name=$name&' -oX - $targets";
$filename = str_replace("/", "!", $targets);
}
@ -153,8 +153,8 @@ if ($cmd) {
if ($name) {
if (!file_exists($SCANSDIR)) mkdir($SCANSDIR);
$path = "$SCANSDIR/" . escapeshellarg($name) . ".xml";
$cmd .= " | tee '$path'";
$path = "$SCANSDIR/$name.xml";
$cmd .= " | tee " .escapeshellarg($path);
}
header('Content-type: text/xml');

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE nmaprun>
<?xml-stylesheet href="https://adrien.malingrey.fr/dev/lanScan4/stylesheets/lanScan.xsl" type="text/xsl"?>
<!-- Nmap 7.93 scan initiated Tue Feb 4 03:30:34 2025 as: nmap -PSmicrosoft-ds -F -T5 -oX - -&#45;stylesheet https://adrien.malingrey.fr/dev/lanScan4/stylesheets/lanScan.xsl scanme.nmap.org -->
<nmaprun scanner="nmap" args="nmap -PSmicrosoft-ds -F -T5 -oX - -&#45;stylesheet https://adrien.malingrey.fr/dev/lanScan4/stylesheets/lanScan.xsl scanme.nmap.org" start="1738636234" startstr="Tue Feb 4 03:30:34 2025" version="7.93" xmloutputversion="1.05">
<scaninfo type="syn" protocol="tcp" numservices="100" services="7,9,13,21-23,25-26,37,53,79-81,88,106,110-111,113,119,135,139,143-144,179,199,389,427,443-445,465,513-515,543-544,548,554,587,631,646,873,990,993,995,1025-1029,1110,1433,1720,1723,1755,1900,2000-2001,2049,2121,2717,3000,3128,3306,3389,3986,4899,5000,5009,5051,5060,5101,5190,5357,5432,5631,5666,5800,5900,6000-6001,6646,7070,8000,8008-8009,8080-8081,8443,8888,9100,9999-10000,32768,49152-49157"/>
<verbose level="0"/>
<debugging level="0"/>
<hosthint><status state="up" reason="unknown-response" reason_ttl="0"/>
<address addr="45.33.32.156" addrtype="ipv4"/>
<hostnames>
<hostname name="scanme.nmap.org" type="user"/>
</hostnames>
</hosthint>
<host starttime="1738636234" endtime="1738636234"><status state="up" reason="reset" reason_ttl="48"/>
<address addr="45.33.32.156" addrtype="ipv4"/>
<hostnames>
<hostname name="scanme.nmap.org" type="user"/>
<hostname name="scanme.nmap.org" type="PTR"/>
</hostnames>
<ports><extraports state="closed" count="98">
<extrareasons reason="reset" count="98" proto="tcp" ports="7,9,13,21,23,25-26,37,53,79,81,88,106,110-111,113,119,135,139,143-144,179,199,389,427,443-445,465,513-515,543-544,548,554,587,631,646,873,990,993,995,1025-1029,1110,1433,1720,1723,1755,1900,2000-2001,2049,2121,2717,3000,3128,3306,3389,3986,4899,5000,5009,5051,5060,5101,5190,5357,5432,5631,5666,5800,5900,6000-6001,6646,7070,8000,8008-8009,8080-8081,8443,8888,9100,9999-10000,32768,49152-49157"/>
</extraports>
<port protocol="tcp" portid="22"><state state="open" reason="syn-ack" reason_ttl="48"/><service name="ssh" method="table" conf="3"/></port>
<port protocol="tcp" portid="80"><state state="open" reason="syn-ack" reason_ttl="48"/><service name="http" method="table" conf="3"/></port>
</ports>
<times srtt="153298" rttvar="2254" to="162314"/>
</host>
<runstats><finished time="1738636234" timestr="Tue Feb 4 03:30:34 2025" summary="Nmap done at Tue Feb 4 03:30:34 2025; 1 IP address (1 host up) scanned in 1.05 seconds" elapsed="1.05" exit="success"/><hosts up="1" down="0" total="1"/>
</runstats>
</nmaprun>

View File

@ -4,12 +4,22 @@
<xsl:template match="nmaprun" mode="head">
<xsl:param name="base" />
<xsl:param name="name" />
<xsl:param name="targets" />
<head>
<meta charset="utf-8" />
<meta http-equiv="refresh" content="300" />
<title>lanScan - <xsl:value-of select="$targets" />
<title>
<xsl:text>lanScan - </xsl:text>
<xsl:choose>
<xsl:when test="$name">
<xsl:value-of select="$name" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$targets" />
</xsl:otherwise>
</xsl:choose>
</title>
<base href="{$base}" />
<link rel="icon" href="favicon.ico" />

View File

@ -11,17 +11,19 @@
<xsl:output indent="yes" />
<xsl:strip-space elements='*' />
<xsl:variable name="stylesheetURL" select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'href=&quot;'), '&quot;')" />
<xsl:variable name="stylesheetURL" select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'href=&quot;'), '?')" />
<xsl:variable name="base" select="concat($stylesheetURL, '/../../')" />
<xsl:variable name="name" select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'name='), '&amp;')" />
<xsl:template match="nmaprun">
<xsl:variable name="targets" select="substring-after(@args, '.xsl ')" />
<xsl:variable name="targets" select="substring-after(@args, '-oX - ')" />
<xsl:variable name="current" select="." />
<xsl:variable name="init" select="document(concat($base, 'scans/', translate($targets,'/', '!'), '.xml'))/nmaprun" />
<xsl:variable name="init" select="document(concat($base, 'scans/', $name, '.xml'))/nmaprun" />
<html lang="fr">
<xsl:apply-templates select="." mode="head">
<xsl:with-param name="base" select="$base" />
<xsl:with-param name="name" select="$name" />
<xsl:with-param name="targets" select="$targets" />
</xsl:apply-templates>

View File

@ -1,8 +1,6 @@
<?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:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.1">
<xsl:import href="head.xsl" />
<xsl:import href="nav.xsl" />
@ -13,21 +11,19 @@
<xsl:output indent="yes" />
<xsl:strip-space elements='*' />
<xsl:variable name="stylesheetURL"
select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'href=&quot;'), '&quot;')" />
<xsl:variable name="stylesheetURL" select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'href=&quot;'), '?')" />
<xsl:variable name="base" select="concat($stylesheetURL, '/../../')" />
<xsl:variable name="name" select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'name='), '&amp;')" />
<xsl:template match="nmaprun">
<xsl:variable name="targets" select="substring-after(@args, '.xsl ')" />
<xsl:variable
name="current" select="." />
<xsl:variable name="init"
select="document(concat($base, 'scans/', translate($targets,'/', '!'), '.xml'))/nmaprun" />
<xsl:variable name="targets" select="substring-after(@args, '-oX - ')" />
<xsl:variable name="current" select="." />
<xsl:variable name="init" select="document(concat($base, 'scans/', $name, '.xml'))/nmaprun" />
<html
lang="fr">
<html lang="fr">
<xsl:apply-templates select="." mode="head">
<xsl:with-param name="base" select="$base" />
<xsl:with-param name="name" select="$name" />
<xsl:with-param name="targets" select="$targets" />
</xsl:apply-templates>
@ -36,12 +32,21 @@
</xsl:apply-templates>
<main class="ui main container inverted segment">
<h1>
<xsl:value-of select="$targets" />
<h1 class="ui header">
<xsl:choose>
<xsl:when test="$name">
<xsl:value-of select="$name" />
<div class="sub header">
<xsl:value-of select="$targets" />
</div>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$targets" />
</xsl:otherwise>
</xsl:choose>
</h1>
<table id="scanResultsTable" style="width:100%" role="grid"
class="ui sortable small compact stuck striped table">
<table id="scanResultsTable" style="width:100%" role="grid" class="ui sortable small compact stuck striped table">
<thead>
<tr>
<th style="width: min-width">Etat</th>
@ -53,8 +58,7 @@
</tr>
</thead>
<tbody>
<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')]">
<xsl:with-param name="init" select="$init" />
<xsl:with-param name="current" select="$current" />
</xsl:apply-templates>
@ -89,14 +93,11 @@ $('.ui.dropdown').dropdown()
<xsl:template match="host">
<xsl:param name="init" />
<xsl:param name="current" />
<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:param name="current" />
<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" />
@ -106,7 +107,7 @@ $('.ui.dropdown').dropdown()
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr>
<tr>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="$currentHost/status/@state='up'">positive</xsl:when>
@ -119,7 +120,7 @@ $('.ui.dropdown').dropdown()
<div>
<xsl:attribute name="class">
<xsl:text>ui mini circular label </xsl:text>
<xsl:choose>
<xsl:choose>
<xsl:when test="$currentHost/status/@state='up'">green</xsl:when>
<xsl:otherwise>red</xsl:otherwise>
</xsl:choose>
@ -127,7 +128,9 @@ $('.ui.dropdown').dropdown()
<xsl:value-of select="$currentHost/status/@state" />
</div>
</xsl:when>
<xsl:otherwise><div class="ui mini circular label red">down</div></xsl:otherwise>
<xsl:otherwise>
<div class="ui mini circular label red">down</div>
</xsl:otherwise>
</xsl:choose>
</td>
<td>
@ -138,16 +141,15 @@ $('.ui.dropdown').dropdown()
<xsl:value-of select="substring-before(hostnames/hostname/@name, '.')" />
</b>
<xsl:if test="substring-after(hostnames/hostname/@name, '.')">
<wbr />.<xsl:value-of select="substring-after(hostnames/hostname/@name, '.')" />
<wbr />
. <xsl:value-of select="substring-after(hostnames/hostname/@name, '.')" />
</xsl:if>
</td>
<td>
<xsl:value-of select="address[@addrtype='mac']/@vendor" />
</td>
<td>
<xsl:apply-templates
select="ports/port | $initHost/ports/port[not(state/@state='closed')][not(@portid=$currentHost/ports/port/@portid)]"
mode="service">
<xsl:apply-templates select="ports/port | $initHost/ports/port[not(state/@state='closed')][not(@portid=$currentHost/ports/port/@portid)]" mode="service">
<xsl:with-param name="initHost" select="$initHost" />
<xsl:with-param name="currentHost" select="$currentHost" />
<xsl:with-param name="hostAddress" select="$hostAddress" />
@ -157,7 +159,8 @@ $('.ui.dropdown').dropdown()
</td>
<td>
<a class="ui mini icon teal icon button" target="_blank" title="Scan intensif">
<xsl:attribute name="href">scan.php?host=<xsl:value-of select="$hostAddress" /></xsl:attribute>
<xsl:attribute name="href">scan.php?host=<xsl:value-of select="$hostAddress" />
</xsl:attribute>
<i class="search plus icon"></i>
</a>
</td>

View File

@ -1,79 +1,77 @@
<?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:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.1">
<xsl:template match="nmaprun" mode="nav">
<nav class="ui inverted secondary menu">
<a href="." class="ui header button item logo">lan<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"></defs>
<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"></path>
</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"></path>
</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"></path>
</g>
</g>
<g id="g165">
<g id="g163">
<rect x="87.027" y="41.925999" width="80.040001" height="138.481" id="rect161"></rect>
</g>
</g>
<g id="g171">
<g id="g169">
<rect x="344.93301" y="329.052" width="80.040001" height="138.481" id="rect167"></rect>
</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>
<a href="." class="ui header button item logo">lan<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"></defs>
<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"></path>
</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"></path>
</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"></path>
</g>
</g>
<g id="g165">
<g id="g163">
<rect x="87.027" y="41.925999" width="80.040001" height="138.481" id="rect161"></rect>
</g>
</g>
<g id="g171">
<g id="g169">
<rect x="344.93301" y="329.052" width="80.040001" height="138.481" id="rect167"></rect>
</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>
can</a>
<div class="right menu">
<form class="ui right aligned category search item" id="scanForm" action="scan.php"
method="get">
<div class="ui inverted icon input" id="targetsInputDiv">
<input name="lan" class="prompt" type="text" placeholder="Scanner un réseau"
pattern="[a-zA-Z0-9._\/ \-]+"
title="Les cibles peuvent être spécifiées par des noms d'hôtes, des adresses IP, des adresses de réseaux, etc.
<div class="right menu">
<form class="ui right aligned category search item" id="scanForm" action="scan.php" method="get">
<div class="ui inverted icon input" id="targetsInputDiv">
<input name="lan" class="prompt" type="text" placeholder="Scanner un réseau" pattern="[a-zA-Z0-9._\/ \-]+" 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>
<a class="button item" href="options.php" title="Actualiser">
<i class="settings icon"></i>
<i class="satellite dish icon"></i>
</div>
<a class="button item" href="options.php" title="Options avancées">
<i class="settings icon"></i>
</a>
<xsl:if test="$name">
<a class="button item" id="refreshLink" href="rescan.php?name={$name}" title="Actualiser">
<i class='sync icon'></i>
</a>
</form>
</div>
</nav>
</xsl:if>
</form>
</div>
</nav>
<script>
<script>
scanForm.onsubmit = function(event) {
if (scanForm.checkValidity()) {
targetsInputDiv.classList.add('loading')
@ -88,6 +86,18 @@ scanForm.onsubmit = function(event) {
})
}
}
</script>
</xsl:template>
refreshLink.onclick = function(event) {
refreshLink.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>