finished firewall options

This commit is contained in:
Adrien MALINGREY 2025-02-11 18:02:40 +01:00
parent 849c922d89
commit 009b2b3c2f
4 changed files with 1015 additions and 1016 deletions

View File

@ -41,7 +41,7 @@
<div class="inverted field">
<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="targetInput" type="text" name="target" placeholder="Cibles" spellcheck="false" required
<input id="targetInput" name="target" type="text" placeholder="Cibles" spellcheck="false" required
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>
@ -51,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="targetList"
<input id="excludeInput" name="--exclude" type="text" placeholder="Hôte/réseau" list="targetList"
pattern="[a-zA-Z0-9._\/,\-]*">
</div>
@ -65,28 +65,28 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="content">
<div class="inline inverted field">
<div class="ui toggle inverted checkbox">
<input id="PnCheckbox" type="checkbox" name="-Pn" />
<input id="PnCheckbox" name="-Pn" type="checkbox" />
<label for="PnCheckbox" title="-Pn">Sauter cette étape (considérer tous les hôtes comme actifs)</label>
</div>
</div>
<div class="inverted field">
<label for="PSInput" title="-PS">TCP SYN</label>
<input id="PSInput" type="text" name="-PS" placeholder="Ports" list="servicesList"
<input id="PSInput" name="-PS" type="text" placeholder="Ports" list="servicesList"
pattern="([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*"
title="Liste de ports ex: 22,23,25,80,200-1024,60000-">
</div>
<div class="inverted field">
<label for="PAInput" title="-PA">TCP ACK</label>
<input id="PAInput" type="text" name="-PA" placeholder="Ports" list="servicesList"
<input id="PAInput" name="-PA" type="text" placeholder="Ports" list="servicesList"
pattern="([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*"
title="Liste de ports ex: 22,23,25,80,200-1024,60000-">
</div>
<div class="inverted field">
<label for="PUInput" title="-PU">UDP</label>
<input id="PUInput" type="text" name="-PU" placeholder="Ports" list="servicesList"
<input id="PUInput" name="-PU" type="text" placeholder="Ports" list="servicesList"
pattern="([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*"
title="Liste de ports ex: 22,23,25,80,200-1024,60000-">
</div>
@ -96,19 +96,19 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inline inverted fields">
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="PECheckbox" type="checkbox" name="-PE" />
<input id="PECheckbox" name="-PE" type="checkbox" />
<label for="PECheckbox" title="-PE">Echo request</label>
</div>
</div>
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="PPCheckbox" type="checkbox" name="-PP" />
<input id="PPCheckbox" name="-PP" type="checkbox" />
<label for="PPCheckbox" title="-PP">Timestamp request</label>
</div>
</div>
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="PMCheckbox" type="checkbox" name="-PM" />
<input id="PMCheckbox" name="-PM" type="checkbox" />
<label for="PMCheckbox" title="-PM">Mask request</label>
</div>
</div>
@ -117,20 +117,20 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inverted field">
<label for="POInput" title="-PO">Protocole IP (par type)</label>
<input id="POInput" type="text" name="-PO" placeholder="Protocole" pattern="[0-9,\-]+"
<input id="POInput" name="-PO" type="text" placeholder="Protocole" pattern="[0-9,\-]+"
title="[num de protocole]">
</div>
<div class="inline inverted fields">
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="PRCheckbox" type="checkbox" name="-PR" />
<input id="PRCheckbox" name="-PR" type="checkbox" />
<label for="PRCheckbox" title="-PR">Ping ARP</label>
</div>
</div>
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="sendIPCheckbox" type="checkbox" name="--send-ip" />
<input id="sendIPCheckbox" name="--send-ip" type="checkbox" />
<label for="sendIPCheckbox" title="--send-ip">Pas de scan ARP</label>
</div>
</div>
@ -139,13 +139,13 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inline inverted fields">
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="nCheckbox" type="checkbox" name="-n" />
<input id="nCheckbox" name="-n" type="checkbox" />
<label for="nCheckbox" title="-n">Ne jamais résoudre les noms DNS</label>
</div>
</div>
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="RCheckbox" type="checkbox" name="-R" />
<input id="RCheckbox" name="-R" type="checkbox" />
<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>
@ -154,51 +154,49 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inverted field">
<label for="dnsServersInput" title="--dns-servers">Utiliser les serveurs DNS</label>
<input id="dnsServersInput" type="text" name="--dns-servers" placeholder="serveur"
<input id="dnsServersInput" name="--dns-servers" type="text" placeholder="serveur"
pattern="[a-zA-Z0-9._,\-]*" title="serv1[,serv2],...">
</div>
</div>
<div class="title"><i class="icon dropdown"></i>Techniques de scan de ports</div>
<div class="content">
<div class="inverted field">
<div class="inverted fields">
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="sSCheckbox" type="checkbox" name="-sS" />
<input id="sSCheckbox" name="-sS" type="checkbox" />
<label for="sSCheckbox" title="-sS">TCP SYN</label>
</div>
</div>
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="sTCheckbox" type="checkbox" name="-sT" />
<input id="sTCheckbox" name="-sT" type="checkbox" />
<label for="sTCheckbox" title="-sT">TCP Connect()</label>
</div>
</div>
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="sACheckbox" type="checkbox" name="-sA" />
<input id="sACheckbox" name="-sA" type="checkbox" />
<label for="sACheckbox" title="-sA">TCP ACK</label>
</div>
</div>
</div>
<div class="inverted fields">
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="sWCheckbox" type="checkbox" name="-sW" />
<input id="sWCheckbox" name="-sW" type="checkbox" />
<label for="sWCheckbox" title="-sW">Fenêtre TCP</label>
</div>
</div>
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="sMCheckbox" type="checkbox" name="-sM" />
<input id="sMCheckbox" name="-sM" type="checkbox" />
<label for="sMCheckbox" title="-sM">Maimon</label>
</div>
</div>
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="sNCheckbox" type="checkbox" name="-sN" />
<input id="sNCheckbox" name="-sN" type="checkbox" />
<label for="sNCheckbox" title="-sN">TCP Null</label>
</div>
</div>
@ -207,19 +205,19 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inverted fields">
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="sFCheckbox" type="checkbox" name="-sF" />
<input id="sFCheckbox" name="-sF" type="checkbox" />
<label for="sFCheckbox" title="-sF">TCP FIN</label>
</div>
</div>
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="sXCheckbox" type="checkbox" name="-sX" />
<input id="sXCheckbox" name="-sX" type="checkbox" />
<label for="sXCheckbox" title="-sX">Sapin de Noël</label>
</div>
</div>
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="sUCheckbox" type="checkbox" name="-sU" />
<input id="sUCheckbox" name="-sU" type="checkbox" />
<label for="sUCheckbox" title="-sU">UDP</label>
</div>
</div>
@ -227,27 +225,27 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inverted field">
<label for="scanflagsInput" title="--scanflags">Scan TCP personnalisé</label>
<input id="scanflagsInput" type="text" name="--scanflags" placeholder="Drapeaux TCP" list="flagsList"
<input id="scanflagsInput" name="--scanflags" type="text" placeholder="Drapeaux TCP" list="flagsList"
pattern="(URG|ACK|PSH|RST|SYN|FIN|,)+|[1-9]?[0-9]|[1-2][0-9][0-9]"
title="Mélanger simplement les drapeaux URG, ACK, PSH, RST, SYN et FIN.">
</div>
<div class="inverted field">
<label for="sIInput" title="-sI">Hôte zombie</label>
<input id="sIInput" type="text" name="-p" placeholder="zombie host[:probeport]"
<input id="sIInput" name="-p" type="text" placeholder="zombie host[:probeport]"
pattern="[a-zA-Z0-9._\-]+(:[0-9]+)?" title="zombie host[:probeport]">
</div>
<div class="inverted field">
<label for="bInput" title="-b">Rebond FTP</label>
<input id="bInput" type="text" name="-p" placeholder="[<username>[:<password>]@]<server>[:<port>]"
<input id="bInput" name="-p" type="text" placeholder="[<username>[:<password>]@]<server>[:<port>]"
pattern="([a-zA-Z0-9._\-]+(:.+)?@)?[a-zA-Z0-9._\-]+(:[0-9]+)?"
title="[<username>[:<password>]@]<server>[:<port>]">
</div>
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="sUCheckbox" type="checkbox" name="-sU" />
<input id="sUCheckbox" name="-sU" type="checkbox" />
<label for="sUCheckbox" title="-sO">Scan des protocoles supportés par la couche IP</label>
</div>
</div>
@ -258,28 +256,28 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="content">
<div class="inline inverted field">
<div class="ui toggle inverted checkbox" title="-sP">
<input id="sPCheckbox" type="checkbox" name="-sP" />
<input id="sPCheckbox" name="-sP" type="checkbox" />
<label for="sPCheckbox">Sauter cette étape</label>
</div>
</div>
<div class="inline inverted field">
<div class="ui toggle inverted checkbox" title="-F">
<input id="FCheckbox" type="checkbox" name="-F" onchange="pInput.disabled = FCheckbox.checked" />
<input id="FCheckbox" name="-F" type="checkbox" onchange="pInput.disabled = FCheckbox.checked" />
<label for="FCheckbox">Scanner les ports connus</label>
</div>
</div>
<div class="inverted field">
<label for="pInput" title="-p">Scanner les ports</label>
<input id="pInput" type="text" name="-p" placeholder="Ports" list="servicesList"
<input id="pInput" name="-p" type="text" placeholder="Ports" list="servicesList"
pattern="(([TU]:)?[0-9\-]+|[a-z\-]+)(,([TU]:)?[0-9\-]+|,[a-z\-]+)*"
title="Liste de ports ex: ssh,ftp,U:53,111,137,T:21-25,80,139,8080">
</div>
<div class="inline inverted field">
<div class="ui toggle inverted checkbox" title="-r">
<input id="rCheckbox" type="checkbox" name="-r" />
<input id="rCheckbox" name="-r" type="checkbox" />
<label for="rCheckbox">Ne pas mélanger les ports</label>
</div>
</div>
@ -289,14 +287,14 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="content">
<div class="inline inverted field">
<div class="ui toggle inverted checkbox" title="-sV">
<input id="sVCheckbox" type="checkbox" name="-sV" />
<input id="sVCheckbox" name="-sV" type="checkbox" />
<label for="sVCheckbox">Détection de version</label>
</div>
</div>
<div class="inline inverted field">
<div class="ui toggle inverted checkbox">
<input id="allportsCheckbox" type="checkbox" name="--allports" />
<input id="allportsCheckbox" name="--allports" type="checkbox" />
<label for="allportsCheckbox" title="--allports">N'exclure aucun port de la détection de version</label>
</div>
</div>
@ -309,7 +307,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inline inverted field">
<div class="ui toggle inverted checkbox">
<input id="sRCheckbox" type="checkbox" name="-sR" />
<input id="sRCheckbox" name="-sR" type="checkbox" />
<label for="sRCheckbox" title="-sR">Scan RPC</label>
</div>
</div>
@ -319,26 +317,26 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="content">
<div class="inline inverted field">
<div class="ui toggle inverted checkbox">
<input id="sCCheckbox" type="checkbox" name="-sC" />
<input id="sCCheckbox" name="-sC" type="checkbox" />
<label for="sCCheckbox" title="-sC">Scripts par défaut</label>
</div>
</div>
<div class="inverted field">
<label for="scriptInput">Scripts</label>
<input id="scriptInput" type="text" name="--script" placeholder="Nom"
<input id="scriptInput" name="--script" type="text" placeholder="Nom"
title="<catégories|répertoire|nom|all>" list="scripts" pattern="[a-z][a-z0-9\-\.\/]*">
</div>
<div class="inverted field">
<label for="scriptArgsInput" title="--script-args">Arguments des scripts</label>
<input id="scriptArgsInput" type="text" name="--script-args" placeholder="arg=valeur"
<input id="scriptArgsInput" name="--script-args" type="text" placeholder="arg=valeur"
pattern='[a-zA-Z][a-zA-Z0-9\-_]*=[^"]+(,[a-zA-Z][a-zA-Z0-9\-_]*=[^"]+)?' title="<n1=v1,[n2=v2,...]>">
</div>
<div class="inline inverted field">
<div class="ui toggle inverted checkbox">
<input id="scriptTraceCheckbox" type="checkbox" name="--script-trace" />
<input id="scriptTraceCheckbox" name="--script-trace" type="checkbox" />
<label for="scriptTraceCheckbox" title="--script-trace">Montrer toutes les données envoyées ou
recues</label>
</div>
@ -346,7 +344,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inline inverted field">
<div class="ui toggle inverted checkbox">
<input id="scriptUpdateDBCheckbox" type="checkbox" name="--script-updatedb" />
<input id="scriptUpdateDBCheckbox" name="--script-updatedb" type="checkbox" />
<label for="scriptUpdateDBCheckbox" title="--script-updatedb">Mettre à jour la base de données des
scripts</label>
</div>
@ -357,21 +355,21 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="content">
<div class="inline inverted field">
<div class="ui toggle inverted checkbox">
<input id="OCheckbox" type="checkbox" name="-O" />
<input id="OCheckbox" name="-O" type="checkbox" />
<label for="OCheckbox" title="-O">Détecter le système d'exploitation</label>
</div>
</div>
<div class="inline inverted field">
<div class="ui toggle inverted checkbox">
<input id="osscanLimitCheckbox" type="checkbox" name="--osscan-limit" />
<input id="osscanLimitCheckbox" name="--osscan-limit" type="checkbox" />
<label for="osscanLimitCheckbox" title="--osscan-limit">Seulement les cibles prometteuses</label>
</div>
</div>
<div class="inline inverted field">
<div class="ui toggle inverted checkbox">
<input id="osscanGuessCheckbox" type="checkbox" name="--osscan-guess" />
<input id="osscanGuessCheckbox" name="--osscan-guess" type="checkbox" />
<label for="osscanGuessCheckbox" title="--osscan-guess">Essayer de deviner</label>
</div>
</div>
@ -444,7 +442,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<option value="h">heures</option>
</select>
</div>
<input id="initialRTTHidden" type="hidden" name="--initial-rtt-timeout">
<input id="initialRTTHidden" name="--initial-rtt-timeout" type="hidden">
</div>
<div class="inverted field">
<label for="minRTTNumber" title="--min-rtt-timeout">Minimum</label>
@ -459,7 +457,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<option value="h">heures</option>
</select>
</div>
<input id="minRTTHidden" type="hidden" name="--min-rtt-timeout">
<input id="minRTTHidden" name="--min-rtt-timeout" type="hidden">
</div>
<div class="inverted field">
<label for="maxRTTNumber" title="--max-rtt-timeout">Maximum</label>
@ -474,7 +472,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<option value="h">heures</option>
</select>
</div>
<input id="maxRTTHidden" type="hidden" name="--max-rtt-timeout">
<input id="maxRTTHidden" name="--max-rtt-timeout" type="hidden">
</div>
</div>
</div>
@ -498,7 +496,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<option value="h">heures</option>
</select>
</div>
<input id="hostTimoutHidden" type="hidden" name="--host-timeout">
<input id="hostTimoutHidden" name="--host-timeout" type="hidden">
</div>
<div class="two inverted fields">
@ -515,7 +513,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<option value="h">heures</option>
</select>
</div>
<input id="scanDelayHidden" type="hidden" name="--scan-delay">
<input id="scanDelayHidden" name="--scan-delay" type="hidden">
</div>
<div class="inverted field">
<label for="maxScanDelay" title="--max-scan-delay">Maximum</label>
@ -530,12 +528,12 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<option value="h">heures</option>
</select>
</div>
<input id="maxRTTHidden" type="hidden" name="--max-scan-delay">
<input id="maxRTTHidden" name="--max-scan-delay" type="hidden">
</div>
</div>
<div class="inline inverted field">
<div class="ui toggle inverted checkbox">
<input id="defeatRSTRateLimitCheckbox" type="checkbox" name="--defeat-rst-ratelimit" />
<input id="defeatRSTRateLimitCheckbox" name="--defeat-rst-ratelimit" type="checkbox" />
<label for="defeatRSTRateLimitCheckbox" title="--defeat-rst-ratelimit">Ignorer les limitations de
paquets RST</label>
</div>
@ -545,18 +543,26 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="title"><i class="icon dropdown"></i>Évitement de pare-feux/IDS et mystification</div>
<div class="content">
<div class="inline inverted fields">
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="fInput" type="checkbox" name="-f">
<input id="fInput" name="-f" type="checkbox">
<label for="fInput" title="-f">Fragmentation des paquets</label>
</div>
</div>
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="badsumInput" name="--badsum" type="checkbox">
<label for="badsumInput" title="--badsum">Sommes de contrôle erronnées</label>
</div>
</div>
</div>
<div class="two inverted fields">
<div class="inverted field">
<label for="mtuInput" title="--mtu">Taille des paquets</label>
<div class="ui right labeled input">
<input id="mtuInput" type="number" name="--mtu" min="0" placeholder="Multiple de 8">
<input id="mtuInput" name="--mtu" type="number" min="0" placeholder="Multiple de 8">
<div class="ui basic label">bits</div>
</div>
</div>
@ -564,7 +570,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inverted field">
<label for="dataLengthInput" title="--data-length">Longueur des données</label>
<div class="ui right labeled input">
<input id="dataLengthInput" type="number" name="--data-length" min="0" placeholder="Nombre">
<input id="dataLengthInput" name="--data-length" type="number" min="0" placeholder="Nombre">
<div class="ui basic label">bits</div>
</div>
</div>
@ -572,24 +578,43 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inverted field">
<label for="DInput" title="-D">Leurre</label>
<input id="DInput" type="text" name="-D" pattern="[a-zA-Z0-9._,\-]*"
<input id="DInput" name="-D" type="text" pattern="[a-zA-Z0-9._,\-]*"
placeholder="decoy1[,decoy2][,ME],..." title="decoy1[,decoy2][,ME],...">
</div>
<div class="two inverted fields">
<div class="inverted field">
<label for="SInput" title="-S">Usurpation d'adresse IP</label>
<input id="SInput" type="text" name="-S" pattern="[0-9.]*" placeholder="Adresse IP">
<input id="SInput" name="-S" type="text" pattern="[0-9.]*" placeholder="Adresse IP">
</div>
<div class="inverted field">
<label for="SInput" title="-S">Usurpation d'adresse MAC</label>
<input id="SInput" name="-S" type="text" pattern="[0-9a-fA-F]{2}[:\-][0-9a-fA-F]{2}[:\-][0-9a-fA-F]{2}[:\-][0-9a-fA-F]{2}[:\-][0-9a-fA-F]{2}[:\-][0-9a-fA-F]{2}" title="Adresse MAC, préfix ou nom de constructeur" placeholder=" Adresse MAC, préfix ou nom de constructeur">
</div>
</div>
<div class="two inverted fields">
<div class="inverted field">
<label for="gInput" title="-g">Port source</label>
<input id="gInput" type="number" name="-g" min="0" max="65535" placeholder="Port">
<input id="gInput" name="-g" type="number" min="0" max="65535" placeholder="Port">
</div>
<div class="inverted field">
<label for="ttlInput" title="--ttl">Durée de vie (TTL)</label>
<input id="ttlInput" name="--ttl" type="number" min="0" max="255" placeholder="0-255">
</div>
</div>
<div class="inverted field">
<label for="ttlInput" title="--ttl">Durée de vie (TTL)</label>
<input id="ttlInput" type="number" name="--ttl" min="0" max="255" placeholder="0-255">
<label for="ipOptionsInput" title="--ip-options">Envoyer des paquets avec les options IP suivantes</label>
<input id="ipOptionsInput" name="--ip-options" type="text" pattern='(R|T|U|L [0-9a-zA-Z\-.: ]+|S [0-9a-zA-Z\-.: ]+|\x[0-9a-fA-F]{1,2}(\*[0-9]+)?|\[0-2]?[0-9]{1,2}(\*[0-9]+)?)'
placeholder="S|R [route]|L [route]|T|U ... >;" title="S|R [route]|L [route]|T|U ... >;">
</div>
<div class="inverted field">
<div class="ui toggle inverted checkbox">
<input id="randomizeHostsInput" name="--randomize-hosts" type="checkbox">
<label for="randomizeHostsInput" title="--randomize-hosts">Scanner les cibles dans un ordre aléatoire</label>
</div>
</div>
</div>
@ -606,7 +631,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<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\-_\. ]+'
<input id="nameInput" name="name" type="text" placeholder="Reseau local" pattern='[0-9a-zA-Z\-_\. ]+'
title="Caractères autorisés: a-z A-Z 0-9 - _ ." />
</div>
</div>

View File

@ -97,7 +97,7 @@ if ($preset && isset($PRESETS[$preset])) {
'-g' => FILTER_VALIDATE_INT,
'--source-port' => FILTER_VALIDATE_INT,
'--data-length' => FILTER_VALIDATE_INT,
'--ip-options' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => '/^\"(R|T|U|L [\da-zA-Z-.: ]+|S [\da-zA-Z-.: ]+|\\\\x[\da-fA-F]{1,2}(\*[\d]+)?|\\\\[0-2]?[\d]{1,2}(\*[\d]+)?)\"$/']],
'--ip-options' => ['filter' => FILTER_VALIDATE_REGEXP, 'options' => ['regexp' => '/^(R|T|U|L [\da-zA-Z-.: ]+|S [\da-zA-Z-.: ]+|\\\\x[\da-fA-F]{1,2}(\*[\d]+)?|\\\\[0-2]?[\d]{1,2}(\*[\d]+)?)$/']],
'--ttl' => ['filter' => FILTER_VALIDATE_INT, 'options' => ['min_range' => 0, 'max_range' => 255]],
'--spoof-mac' => FILTER_VALIDATE_MAC,
'--badsum' => FILTER_VALIDATE_BOOLEAN,

View File

@ -11,18 +11,14 @@
<xsl:output indent="yes" />
<xsl:strip-space elements='*' />
<xsl:variable name="stylesheetURL"
select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'href=&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='), '&quot;')" />
<xsl:variable name="name" select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'name='), '&quot;')" />
<xsl:template match="nmaprun">
<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" />
<xsl:variable name="current" select="." />
<xsl:variable name="init" select="document(concat($base, 'scans/', $name, '.xml'))/nmaprun" />
<html lang="fr">
<xsl:apply-templates select="." mode="head">
@ -38,8 +34,7 @@
</xsl:apply-templates>
<main class="ui main container inverted segment">
<xsl:apply-templates
select="$current/host | $init/host[not(address/@addr=$current/host/address/@addr)][not(status/@state='down')]">
<xsl:apply-templates select="$current/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>
@ -68,12 +63,9 @@ $('.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="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">
@ -85,8 +77,7 @@ $('.ui.dropdown').dropdown()
</xsl:choose>
</xsl:variable>
<h1
class="ui header">
<h1 class="ui header">
<div>
<xsl:attribute name="class">
<xsl:text>ui horizontal label </xsl:text>
@ -107,8 +98,7 @@ $('.ui.dropdown').dropdown()
</xsl:choose>
</h1>
<table
class="ui inverted table" style="width: max-content">
<table class="ui inverted table" style="width: max-content">
<thead>
<tr>
<xsl:if test="address[@addrtype='ipv4']/@addr">
@ -170,8 +160,7 @@ $('.ui.dropdown').dropdown()
</tbody>
</table>
<xsl:if
test="hostscript/script">
<xsl:if test="hostscript/script">
<div class="ui inverted tree accordion">
<div class="title">
<i class="dropdown icon"></i> Informations supplémentaires </div>
@ -181,32 +170,26 @@ $('.ui.dropdown').dropdown()
</div>
</xsl:if>
<h2
class="ui header">Services</h2>
<h2 class="ui header">Services</h2>
<div class="ui cards">
<xsl:apply-templates
select="$currentHost/ports/port[not(state/@state='closed')] | $initHost/ports/port[not(state/@state='closed')][not(@portid=$currentHost/ports/port/@portid)]">
<div class="ui inverted two small cards">
<xsl:apply-templates select="$currentHost/ports/port[not(state/@state='closed')] | $initHost/ports/port[not(state/@state='closed')][not(@portid=$currentHost/ports/port/@portid)]">
<xsl:with-param name="initHost" select="$initHost" />
<xsl:with-param name="currentHost" select="$currentHost" />
<xsl:with-param name="hostAddress" select="$hostAddress" />
</xsl:apply-templates>
</div>
<xsl:apply-templates
select="trace" />
<xsl:apply-templates select="trace" />
</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]" />
<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]" />
<xsl:variable name="color">
<xsl:choose>
<xsl:when test="$currentPort/script[@id='http-info']/elem[@key='status']>=500">red</xsl:when>
@ -218,11 +201,10 @@ $('.ui.dropdown').dropdown()
</xsl:choose>
</xsl:variable>
<div
class="ui inverted card {$color}">
<div class="ui card {$color}">
<div class="content">
<div class="header">
<div class="ui {$color} ribbon label" title="{state/@state}">
<div class="ui {$color} right floated label" title="{state/@state}">
<div class="detail" style="text-transform: uppercase">
<xsl:value-of select="@protocol" />
<xsl:text>:</xsl:text>
@ -267,8 +249,7 @@ $('.ui.dropdown').dropdown()
</div>
</div>
</div>
<xsl:if
test="service/@name='ftp' or service/@name='ssh' or service/@name='http' or service/@name='https' or service/@name='ms-wbt-server'">
<xsl:if test="service/@name='ftp' or service/@name='ssh' or service/@name='http' or service/@name='https' or service/@name='ms-wbt-server'">
<a class="ui {$color} button" target="_blank">
<xsl:attribute name="href">
<xsl:choose>
@ -276,8 +257,7 @@ $('.ui.dropdown').dropdown()
<xsl:text>rdp.php?v=</xsl:text>
<xsl:value-of select="$hostAddress" />
<xsl:text>&amp;p=</xsl:text>
<xsl:value-of
select="@portid" />
<xsl:value-of select="@portid" />
</xsl:when>
<xsl:otherwise>
<xsl:choose>
@ -289,8 +269,7 @@ $('.ui.dropdown').dropdown()
</xsl:otherwise>
</xsl:choose>
<xsl:text>://</xsl:text>
<xsl:value-of
select="$hostAddress" />
<xsl:value-of select="$hostAddress" />
<xsl:text>:</xsl:text>
<xsl:value-of select="@portid" />
</xsl:otherwise>
@ -305,13 +284,11 @@ $('.ui.dropdown').dropdown()
<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: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:value-of select="elem[@key='TotalSize']" />
</xsl:if>
</xsl:for-each>
</xsl:attribute>
@ -345,8 +322,7 @@ $('.ui.dropdown').dropdown()
</tbody>
</table>
</xsl:if>
<xsl:apply-templates
select="table" />
<xsl:apply-templates select="table" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@output" />
@ -399,9 +375,7 @@ $('.ui.dropdown').dropdown()
<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']}">
<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>

View File

@ -55,14 +55,14 @@
class="ui sortable small compact stuck striped table">
<thead>
<tr>
<th style="width: min-width">État</th>
<th style="width: min-content">État</th>
<th>Adresse IP</th>
<th>Nom</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">
<th style="width: min-content" title="Scan intensif">
<i class="search plus icon"></i>
</th>
</tr>
@ -197,7 +197,7 @@ $('.ui.dropdown').dropdown()
<xsl:sort select="number(@portid)" order="ascending" />
</xsl:apply-templates>
</td>
<td>
<td style="width: min-content">
<a class="ui mini icon teal icon button" target="_blank" title="Scan intensif">
<xsl:attribute name="href">
<xsl:text>scan.php?target=</xsl:text>