This commit is contained in:
Adrien MALINGREY 2025-02-08 23:35:29 +01:00
parent ee532e1329
commit 6d94778307
9 changed files with 139 additions and 107 deletions

View File

@ -9,4 +9,22 @@ $DATADIR = ".";
$SCRIPTARGSFILE = "script-args.ini";
$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'";
$COMMONOPTIONS = "--datadir '$DATADIR' --script-args-file '$SCRIPTARGSFILE'";
$COMMONOPTIONS = [
"--datadir" => $DATADIR,
"--script-args-file" => $SCRIPTARGSFILE,
];
$PRESETS = [
"lanScan" => [
"-PS" => "microsoft-ds",
"-F" => true,
"-T" => 5,
"--script" => "http-info,smb-shares-size",
"--stylesheet" => "lanTable.xsl",
],
"host" => [
"-A" => true,
"-T" => 5,
"--script" => "http-info,smb-shares-size",
"--stylesheet" => "hostDetails.xsl",
],
];

View File

@ -27,10 +27,6 @@
background: #1b1c1dc0;
backdrop-filter: blur(7px);
}
.logo {
margin-right: 0 !important;
}
</style>
</head>
@ -55,11 +51,12 @@
<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.
<input id="nameInput" type="text" name="target" placeholder="<?= $_SERVER['REMOTE_ADDR']; ?>"
list="targetList" 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>
<input type="hidden" name="preset" value="lanScan" />
<div class="field">
<label for="nameInput">Enregistrer sous le nom (optionnel)</label>
<div class="ui small input">
@ -100,7 +97,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
</div>
</div>
<datalist id='targetsList'>
<datalist id='targetList'>
<option value="<?= $_SERVER['REMOTE_ADDR']; ?>/24"></option>
<option value="<?= $_SERVER['SERVER_NAME']; ?>"></option>
</datalist>

View File

@ -25,7 +25,8 @@
<a class="ui icon button item" href="https://nmap.org/man/fr/index.html" target="_blank">
<i class="question circle icon"></i>
</a>
<button id="toggleThemeButton" type="button" class="ui icon link item" title="Thème clair/sombre" onclick="toggleTheme()">
<button id="toggleThemeButton" type="button" class="ui icon link item" title="Thème clair/sombre"
onclick="toggleTheme()">
<i class="sun icon"></i>
</button>
</div>
@ -38,10 +39,10 @@
<form id="newScanForm" class="ui inverted form" method="get" action="scan.php">
<div class="inverted field">
<label for="targetsInput" title="Les cibles peuvent être spécifiées par des noms d'hôtes, des adresses IP, des adresses de réseaux, etc.
<label for="targetInput" 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">Cibles</label>
<input id="targetsInput" type="text" name="targets" placeholder="Cibles" spellcheck="false"
pattern="[a-zA-Z0-9._\/ \-]+" list="targetsList" title="Les cibles peuvent être spécifiées par des noms d'hôtes, des adresses IP, des adresses de réseaux, etc.
<input id="targetInput" type="text" name="target" placeholder="Cibles" spellcheck="false"
pattern="[a-zA-Z0-9._\/ \-]+" list="targetList" 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>
@ -50,7 +51,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="content">
<div class="inverted field">
<label for="excludeInput" title="--exclude">Exclure les hôtes ou réseaux</label>
<input id="excludeInput" type="text" name="--exclude" placeholder="Hôte/réseau" list="targetsList"
<input id="excludeInput" type="text" name="--exclude" placeholder="Hôte/réseau" list="targetList"
pattern="[a-zA-Z0-9._\/,\-]*">
</div>
@ -384,12 +385,12 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="title"><i class="icon dropdown"></i>Temporisation et performances</div>
<div class="content">
<div class="inverted field">
<label for="TSelect" title="--T">Intensité des tests de version</label>
<label for="TSelect" title="-T">Intensité des tests de version</label>
<select id="TSelect" class="ui clearable dropdown" name="-T">
<option>Paranoïaque</option>
<option>Sournois</option>
<option>Poli</option>
<option>Normal</option>
<option selected>Normal</option>
<option>Aggressif</option>
<option>Dément</option>
</select>
@ -492,9 +493,9 @@ 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">secondes</option>
<option value="m">minutes</option>
<option value="h">heures</option>
<option value="s">secondes</option>
<option value="m">minutes</option>
<option value="h">heures</option>
</select>
</div>
<input id="hostTimoutHidden" type="hidden" name="--host-timeout">
@ -545,67 +546,83 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="content">
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input type="checkbox" id="f" name="-f">
<label for="f" title="-f">Fragmentation des paquets</label>
<input id="fInput" type="checkbox" name="-f">
<label for="fInput" title="-f">Fragmentation des paquets</label>
</div>
</div>
<div class="two inverted fields">
<div class="inverted field">
<label for="mtu" title="--mtu">Taille des paquets</label>
<input type="number" id="mtu" name="--mtu" min="0">
<label for="mtuInput" title="--mtu">Taille des paquets</label>
<input id="mtuInput" type="number" name="--mtu" min="0">
</div>
<div class="inverted field">
<label for="d" title="-d">Délai entre les paquets</label>
<input type="number" id="d" name="-d" min="0">
<label for="dInput" title="-d">Délai entre les paquets</label>
<input id="dInput" type="number" name="-d" min="0">
</div>
</div>
<div class="inverted field">
<label for="g" title="-g">Port source</label>
<input type="number" id="g" name="-g" min="0" max="65535">
<label for="gInput" title="-g">Port source</label>
<input id="gInput" type="number" name="-g" min="0" max="65535">
</div>
<div class="inverted field">
<label for="data-length" title="--data-length">Longueur des données</label>
<input type="number" id="data-length" name="--data-length" min="0">
<label for="dataLengthInput" title="--data-length">Longueur des données</label>
<input id="dataLengthInput" type="number" name="--data-length" min="0">
</div>
<div class="inverted field">
<label for="D" title="-D">Leurre</label>
<input type="text" id="D" name="-D">
<label for="DInput" title="-D">Leurre</label>
<input id="DInput" type="text" name="-D">
</div>
<div class="inverted field">
<label for="S" title="-S">Usurpation d'adresse IP</label>
<input type="text" id="S" name="-S">
<label for="SInput" title="-S">Usurpation d'adresse IP</label>
<input id="SInput" type="text" name="-S">
</div>
<div class="inverted field">
<label for="ttl" title="--ttl">Valeur TTL</label>
<input type="number" id="ttl" name="--ttl" min="0" max="255">
<label for="ttlInput" title="--ttl">Valeur TTL</label>
<input id="ttlInput" type="number" name="--ttl" min="0" max="255">
</div>
<div class="inverted field">
<label for="scan-delay" title="--scan-delay">Délai entre les scans</label>
<input type="number" id="scan-delay" name="--scan-delay" min="0">
<label for="scanDelayInput" title="--scan-delay">Délai entre les scans</label>
<input id="scanDelayInput" type="number" name="--scan-delay" min="0">
</div>
<div class="inverted field">
<div class="ui checkbox">
<input type="checkbox" id="badsum" name="--badsum">
<label for="badsum" title="--badsum">Checksum incorrect</label>
<input id="badsumCheckbox" type="checkbox" name="--badsum">
<label for="badsumCheckbox" title="--badsum">Checksum incorrect</label>
</div>
</div>
</div>
</div>
<div class="field">
<label for="stylesheetSelect" title="--stylesheet">Affichage des résultats</label>
<select id="stylesheetSelect" class="ui dropdown" name="--stylesheet" required>
<option value='lanTable.xsl' selected>Tableau du réseau</option>
<option value='hostDetails.xsl'>Détails de l'hôte</option>
</select>
</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="Reseau local" pattern='[0-9a-zA-Z\-_\. ]+'
title="Caractères autorisés: a-z A-Z 0-9 - _ ." />
</div>
</div>
<button type="submit" class="ui teal submit button">Démarrer</button>
</form>
</main>
<datalist id='targetsList'>
<datalist id='targetList'>
<option value="<?= $_SERVER['REMOTE_ADDR']; ?>/24"></option>
<option value="<?= $_SERVER['SERVER_NAME']; ?>"></option>
<?php
@ -682,6 +699,15 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<script src="script.js"></script>
<script>
class TagsInput extends Tagify {
constructor(input, options = {}, delim = ",") {
if (!options.delimiters) options.delimiters = " |,"
if (!options.originalInputValueFormat) options.originalInputValueFormat = tags => tags.map(tag => tag.value).join(delim)
if (input.list) options.whitelist = Array.from(input.list.options).map(option => option.value)
super(input, options)
}
}
$(".ui.accordion").accordion()
$(".ui.clearable.dropdown").dropdown({
@ -691,7 +717,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
clearable: false
})
new TagsInput(targetsInput, {}, " ")
new TagsInput(targetInput, {}, " ")
new TagsInput(excludeInput)
new TagsInput(PSInput)
new TagsInput(PAInput)

View File

@ -3,24 +3,15 @@
include_once 'config.php';
$fileNameRegex = '/^[\da-zA-Z-_. ]+$/';
$targetsListRegex = '/^[\da-zA-Z-_. \/]+$/';
$targetListRegex = '/^[\da-zA-Z-_. \/]+$/';
$target = filter_input(INPUT_GET, 'target', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => $targetListRegex], "flags" => FILTER_NULL_ON_FAILURE]);
$name = filter_input(INPUT_GET, 'name', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => $fileNameRegex], "flags" => FILTER_NULL_ON_FAILURE]);
$lan = filter_input(INPUT_GET, 'lan', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => $targetsListRegex], "flags" => FILTER_NULL_ON_FAILURE]);
if ($lan) {
$cmd = "$NMAP $LANSCANOPTIONS $COMMONOPTIONS --stylesheet '$BASEDIR/$STYLESHEETSDIR/lanScan.xsl?name=" . rawurlencode($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 $COMMONOPTIONS --stylesheet '$BASEDIR/$STYLESHEETSDIR/hostScan.xsl?name=" . rawurlencode($name) . "' -oX - $host";
$filename = str_replace("/", "!", $host);
}
$targets = filter_input(INPUT_GET, 'targets', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => $targetsListRegex], "flags" => FILTER_NULL_ON_FAILURE]);
if ($targets) {
$preset = filter_input(INPUT_GET, "preset", FILTER_SANITIZE_FULL_SPECIAL_CHARS);
if ($preset && isset($PRESETS[$preset])) {
$inputs = $PRESETS[$preset];
} else {
$hostsListRegex = '/^[\da-zA-Z-.,:\/]+$/';
$protocolePortsListRegex = '/^(([TU]:)?[0-9\-]+|[a-z\-]+)(,([TU]:)?[0-9\-]+|,[a-z\-]+)*$/';
$portsListRegex = '/^([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*$/';
@ -115,42 +106,39 @@ if ($targets) {
'-A' => FILTER_VALIDATE_BOOLEAN,
'--send-eth' => FILTER_VALIDATE_BOOLEAN,
'--privileged' => FILTER_VALIDATE_BOOLEAN,
'-V' => FILTER_VALIDATE_BOOLEAN,
'--unprivileged' => FILTER_VALIDATE_BOOLEAN,
'-h' => FILTER_VALIDATE_BOOLEAN,
'--stylesheet' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => $fileNameRegex]],
// lanScan
'name' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => $fileNameRegex]],
'originalURL' => FILTER_VALIDATE_URL,
'refreshPeriod' => ['filter' => FILTER_VALIDATE_INT, 'options' => ['min_range' => 0]],
'sudo' => FILTER_VALIDATE_BOOLEAN,
], false);
}
$options = "";
foreach ($inputs as $option => $value) {
if (substr($option, 0, 1) == '-') {
if (is_null($value)) {
http_response_code(400);
$errorMessage = "Valeur incorrecte pour le paramètre <var>$option</var> : " . filter_input(INPUT_GET, $option, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
include_once "index.php";
die();
} else if ($value) {
if ($value === true) {
$options .= " $option";
} else {
if (substr($option, 0, 2) == '--')
$options .= " $option " . escapeshellarg($value);
else
$options .= " $option" . escapeshellarg($value);
}
$inputs = array_merge($COMMONOPTIONS, $inputs);
$inputs['--stylesheet'] = "$BASEDIR/$STYLESHEETSDIR/{$inputs['--stylesheet']}?";
if($name) $inputs['--stylesheet'] .= "name=$name";
$options = "";
foreach ($inputs as $option => $value) {
if (substr($option, 0, 1) == '-') {
if (is_null($value)) {
http_response_code(400);
$errorMessage = "Valeur incorrecte pour le paramètre <var>$option</var> : " . filter_input(INPUT_GET, $option, FILTER_SANITIZE_FULL_SPECIAL_CHARS);
include_once "index.php";
die();
} else if ($value) {
if ($value === true) {
$options .= " $option";
} else {
if (substr($option, 0, 2) == '--')
$options .= " $option " . escapeshellarg($value);
else
$options .= " $option" . escapeshellarg($value);
}
}
}
$cmd = "$NMAP$options $COMMONOPTIONS --stylesheet '$BASEDIR/$STYLESHEETSDIR/lanScan.xsl?name" . rawurlencode($name) . "' -oX - $targets";
$filename = str_replace("/", "!", $targets);
}
$cmd = "$NMAP$options -oX - $target";
if ($cmd) {
if ($name) {
if (!file_exists($SCANSDIR))

View File

@ -2,6 +2,10 @@ body.inverted {
background-color: #1b1c1d;
}
.ui.menu .header.item {
margin: 0;
}
.logo {
display: flex !important;
justify-content: center;

View File

@ -16,7 +16,7 @@
<xsl:variable name="name" select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'name='), '&quot;')" />
<xsl:template match="nmaprun">
<xsl:variable name="targets" select="substring-after(@args, '-oX - ')" />
<xsl:variable name="target" select="substring-after(@args, '-oX - ')" />
<xsl:variable name="current" select="." />
<xsl:variable name="init" select="document(concat($base, 'scans/', $name, '.xml'))/nmaprun" />
@ -24,7 +24,7 @@
<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:with-param name="target" select="$target" />
</xsl:apply-templates>
<body class="inverted">
@ -133,7 +133,9 @@ $('.ui.dropdown').dropdown()
</xsl:if>
<xsl:if test="os/osmatch/@name">
<td>
<abbr title="Confiance : {os/osmatch/@accuracy}%"><xsl:value-of select="os/osmatch/@name" /></abbr>
<abbr title="Confiance : {os/osmatch/@accuracy}%">
<xsl:value-of select="os/osmatch/@name" />
</abbr>
</td>
</xsl:if>
<xsl:if test="distance/@value">

View File

@ -15,7 +15,7 @@
<xsl:variable name="name" select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'name='), '&quot;')" />
<xsl:template match="nmaprun">
<xsl:variable name="targets" select="substring-after(@args, '-oX - ')" />
<xsl:variable name="target" select="substring-after(@args, '-oX - ')" />
<xsl:variable name="current" select="." />
<xsl:variable name="init" select="document(concat($base, 'scans/', $name, '.xml'))/nmaprun" />
@ -23,7 +23,7 @@
<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:with-param name="target" select="$target" />
</xsl:apply-templates>
<body class="inverted">
@ -32,16 +32,17 @@
</xsl:apply-templates>
<main class="ui main container inverted vertical segment">
<h1 class="ui header">
<xsl:choose>
<xsl:when test="$name">
<xsl:value-of select="$name" disable-output-escaping="yes" />
<div class="sub header">
<xsl:value-of select="$targets" />
<xsl:value-of select="$target" />
</div>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$targets" />
<xsl:value-of select="$target" />
</xsl:otherwise>
</xsl:choose>
</h1>
@ -52,7 +53,9 @@
<th style="width: min-width">État</th>
<th>Adresse IP</th>
<th>Nom</th>
<th>Constructeur</th>
<xsl:if test="host/address[@addrtype='mac']/@vendor">
<th>Constructeur</th>
</xsl:if>
<th class="six wide">Services</th>
<th style="width: min-width" title="Scan intensif">
<i class="search plus icon"></i>
@ -178,8 +181,7 @@ $('.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?target=<xsl:value-of select="$hostAddress" />&amp;preset=host</xsl:attribute>
<i class="search plus icon"></i>
</a>
</td>

View File

@ -5,7 +5,7 @@
<xsl:template match="nmaprun" mode="head">
<xsl:param name="base" />
<xsl:param name="name" />
<xsl:param name="targets" />
<xsl:param name="target" />
<head>
<meta charset="utf-8" />
@ -13,9 +13,9 @@
<meta http-equiv="refresh" content="300">
<xsl:attribute name="content">
<xsl:text>300</xsl:text>
<xsl:if test="$name">
<xsl:if test="$name">
<xsl:text>;URL=rescan.php?name=</xsl:text>
<xsl:value-of select="$name" />
<xsl:value-of select="$name" />
</xsl:if>
</xsl:attribute>
</meta>
@ -25,18 +25,14 @@
<xsl:value-of select="$name" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$targets" />
<xsl:value-of select="$target" />
</xsl:otherwise>
</xsl:choose>
</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 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 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 rel="stylesheet" type="text/css" href="style.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>
@ -44,8 +40,7 @@
<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 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)

View File

@ -57,7 +57,7 @@
<div class="right menu">
<div class="ui right aligned category search item">
<form id="scanForm" action="scan.php" method="get">
<div class="ui inverted icon input" id="targetsInputDiv">
<div class="ui inverted icon input" id="targetInputDiv">
<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>
@ -81,7 +81,7 @@ Exemples: 192.168.1.0/24 scanme.nmap.org 10.0-255.0-255.1-254" />
<script>
scanForm.onsubmit = function(event) {
if (scanForm.checkValidity()) {
targetsInputDiv.classList.add('loading')
targetInputDiv.classList.add('loading')
$.toast({
title : 'Scan en cours...',
message : 'Merci de patienter',