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

@ -3,7 +3,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="fr"> <html lang="fr">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>lanScan</title> <title>lanScan</title>
<link rel="icon" href="favicon.ico" /> <link rel="icon" href="favicon.ico" />
@ -15,9 +15,9 @@
<script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.polyfills.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.polyfills.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.css" rel="stylesheet" type="text/css" /> <link href="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.css" rel="stylesheet" type="text/css" />
<link href="style.css" rel="stylesheet" type="text/css" /> <link href="style.css" rel="stylesheet" type="text/css" />
</head> </head>
<body class="inverted"> <body class="inverted">
<nav class="ui inverted secondary menu"> <nav class="ui inverted secondary menu">
<a href="." class="ui header button item logo">lan<?php include 'logo.svg'; ?>can</a> <a href="." class="ui header button item logo">lan<?php include 'logo.svg'; ?>can</a>
<div class="right menu"> <div class="right menu">
@ -41,7 +41,7 @@
<div class="inverted field"> <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. <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> 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. 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" /> Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.0-255.0-255.1-254" />
</div> </div>
@ -51,7 +51,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="content"> <div class="content">
<div class="inverted field"> <div class="inverted field">
<label for="excludeInput" title="--exclude">Exclure les hôtes ou réseaux</label> <label for="excludeInput" title="--exclude">Exclure les hôtes ou réseaux</label>
<input 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._\/,\-]*"> pattern="[a-zA-Z0-9._\/,\-]*">
</div> </div>
@ -65,28 +65,28 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="content"> <div class="content">
<div class="inline inverted field"> <div class="inline inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="PnCheckbox" title="-Pn">Sauter cette étape (considérer tous les hôtes comme actifs)</label>
</div> </div>
</div> </div>
<div class="inverted field"> <div class="inverted field">
<label for="PSInput" title="-PS">TCP SYN</label> <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\-]+)*" pattern="([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*"
title="Liste de ports ex: 22,23,25,80,200-1024,60000-"> title="Liste de ports ex: 22,23,25,80,200-1024,60000-">
</div> </div>
<div class="inverted field"> <div class="inverted field">
<label for="PAInput" title="-PA">TCP ACK</label> <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\-]+)*" pattern="([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*"
title="Liste de ports ex: 22,23,25,80,200-1024,60000-"> title="Liste de ports ex: 22,23,25,80,200-1024,60000-">
</div> </div>
<div class="inverted field"> <div class="inverted field">
<label for="PUInput" title="-PU">UDP</label> <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\-]+)*" pattern="([0-9\-]+|[a-z\-]+)(,[0-9\-]+|,[a-z\-]+)*"
title="Liste de ports ex: 22,23,25,80,200-1024,60000-"> title="Liste de ports ex: 22,23,25,80,200-1024,60000-">
</div> </div>
@ -96,19 +96,19 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inline inverted fields"> <div class="inline inverted fields">
<div class="inverted field"> <div class="inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="PECheckbox" title="-PE">Echo request</label>
</div> </div>
</div> </div>
<div class="inverted field"> <div class="inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="PPCheckbox" title="-PP">Timestamp request</label>
</div> </div>
</div> </div>
<div class="inverted field"> <div class="inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="PMCheckbox" title="-PM">Mask request</label>
</div> </div>
</div> </div>
@ -117,20 +117,20 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inverted field"> <div class="inverted field">
<label for="POInput" title="-PO">Protocole IP (par type)</label> <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]"> title="[num de protocole]">
</div> </div>
<div class="inline inverted fields"> <div class="inline inverted fields">
<div class="inverted field"> <div class="inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="PRCheckbox" title="-PR">Ping ARP</label>
</div> </div>
</div> </div>
<div class="inverted field"> <div class="inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="sendIPCheckbox" title="--send-ip">Pas de scan ARP</label>
</div> </div>
</div> </div>
@ -139,13 +139,13 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inline inverted fields"> <div class="inline inverted fields">
<div class="inverted field"> <div class="inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="nCheckbox" title="-n">Ne jamais résoudre les noms DNS</label>
</div> </div>
</div> </div>
<div class="inverted field"> <div class="inverted field">
<div class="ui toggle inverted checkbox"> <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 <label for="nCheckbox" title="-R">Toujours résoudre les noms DNS<br />(par défault seuls les hôtes
actifs sont résolus)</label> actifs sont résolus)</label>
</div> </div>
@ -154,51 +154,49 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inverted field"> <div class="inverted field">
<label for="dnsServersInput" title="--dns-servers">Utiliser les serveurs DNS</label> <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],..."> pattern="[a-zA-Z0-9._,\-]*" title="serv1[,serv2],...">
</div> </div>
</div> </div>
<div class="title"><i class="icon dropdown"></i>Techniques de scan de ports</div> <div class="title"><i class="icon dropdown"></i>Techniques de scan de ports</div>
<div class="content"> <div class="content">
<div class="inverted field">
<div class="inverted fields"> <div class="inverted fields">
<div class="inverted field"> <div class="inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="sSCheckbox" title="-sS">TCP SYN</label>
</div> </div>
</div> </div>
<div class="inverted field"> <div class="inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="sTCheckbox" title="-sT">TCP Connect()</label>
</div> </div>
</div> </div>
<div class="inverted field"> <div class="inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="sACheckbox" title="-sA">TCP ACK</label>
</div> </div>
</div> </div>
</div>
<div class="inverted fields"> <div class="inverted fields">
<div class="inverted field"> <div class="inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="sWCheckbox" title="-sW">Fenêtre TCP</label>
</div> </div>
</div> </div>
<div class="inverted field"> <div class="inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="sMCheckbox" title="-sM">Maimon</label>
</div> </div>
</div> </div>
<div class="inverted field"> <div class="inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="sNCheckbox" title="-sN">TCP Null</label>
</div> </div>
</div> </div>
@ -207,19 +205,19 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inverted fields"> <div class="inverted fields">
<div class="inverted field"> <div class="inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="sFCheckbox" title="-sF">TCP FIN</label>
</div> </div>
</div> </div>
<div class="inverted field"> <div class="inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="sXCheckbox" title="-sX">Sapin de Noël</label>
</div> </div>
</div> </div>
<div class="inverted field"> <div class="inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="sUCheckbox" title="-sU">UDP</label>
</div> </div>
</div> </div>
@ -227,27 +225,27 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inverted field"> <div class="inverted field">
<label for="scanflagsInput" title="--scanflags">Scan TCP personnalisé</label> <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]" 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."> title="Mélanger simplement les drapeaux URG, ACK, PSH, RST, SYN et FIN.">
</div> </div>
<div class="inverted field"> <div class="inverted field">
<label for="sIInput" title="-sI">Hôte zombie</label> <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]"> pattern="[a-zA-Z0-9._\-]+(:[0-9]+)?" title="zombie host[:probeport]">
</div> </div>
<div class="inverted field"> <div class="inverted field">
<label for="bInput" title="-b">Rebond FTP</label> <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]+)?" pattern="([a-zA-Z0-9._\-]+(:.+)?@)?[a-zA-Z0-9._\-]+(:[0-9]+)?"
title="[<username>[:<password>]@]<server>[:<port>]"> title="[<username>[:<password>]@]<server>[:<port>]">
</div> </div>
<div class="inverted field"> <div class="inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="sUCheckbox" title="-sO">Scan des protocoles supportés par la couche IP</label>
</div> </div>
</div> </div>
@ -258,28 +256,28 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="content"> <div class="content">
<div class="inline inverted field"> <div class="inline inverted field">
<div class="ui toggle inverted checkbox" title="-sP"> <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> <label for="sPCheckbox">Sauter cette étape</label>
</div> </div>
</div> </div>
<div class="inline inverted field"> <div class="inline inverted field">
<div class="ui toggle inverted checkbox" title="-F"> <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> <label for="FCheckbox">Scanner les ports connus</label>
</div> </div>
</div> </div>
<div class="inverted field"> <div class="inverted field">
<label for="pInput" title="-p">Scanner les ports</label> <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\-]+)*" 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"> title="Liste de ports ex: ssh,ftp,U:53,111,137,T:21-25,80,139,8080">
</div> </div>
<div class="inline inverted field"> <div class="inline inverted field">
<div class="ui toggle inverted checkbox" title="-r"> <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> <label for="rCheckbox">Ne pas mélanger les ports</label>
</div> </div>
</div> </div>
@ -289,14 +287,14 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="content"> <div class="content">
<div class="inline inverted field"> <div class="inline inverted field">
<div class="ui toggle inverted checkbox" title="-sV"> <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> <label for="sVCheckbox">Détection de version</label>
</div> </div>
</div> </div>
<div class="inline inverted field"> <div class="inline inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="allportsCheckbox" title="--allports">N'exclure aucun port de la détection de version</label>
</div> </div>
</div> </div>
@ -309,7 +307,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inline inverted field"> <div class="inline inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="sRCheckbox" title="-sR">Scan RPC</label>
</div> </div>
</div> </div>
@ -319,26 +317,26 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="content"> <div class="content">
<div class="inline inverted field"> <div class="inline inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="sCCheckbox" title="-sC">Scripts par défaut</label>
</div> </div>
</div> </div>
<div class="inverted field"> <div class="inverted field">
<label for="scriptInput">Scripts</label> <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\-\.\/]*"> title="<catégories|répertoire|nom|all>" list="scripts" pattern="[a-z][a-z0-9\-\.\/]*">
</div> </div>
<div class="inverted field"> <div class="inverted field">
<label for="scriptArgsInput" title="--script-args">Arguments des scripts</label> <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,...]>"> pattern='[a-zA-Z][a-zA-Z0-9\-_]*=[^"]+(,[a-zA-Z][a-zA-Z0-9\-_]*=[^"]+)?' title="<n1=v1,[n2=v2,...]>">
</div> </div>
<div class="inline inverted field"> <div class="inline inverted field">
<div class="ui toggle inverted checkbox"> <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 <label for="scriptTraceCheckbox" title="--script-trace">Montrer toutes les données envoyées ou
recues</label> recues</label>
</div> </div>
@ -346,7 +344,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inline inverted field"> <div class="inline inverted field">
<div class="ui toggle inverted checkbox"> <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 <label for="scriptUpdateDBCheckbox" title="--script-updatedb">Mettre à jour la base de données des
scripts</label> scripts</label>
</div> </div>
@ -357,21 +355,21 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="content"> <div class="content">
<div class="inline inverted field"> <div class="inline inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="OCheckbox" title="-O">Détecter le système d'exploitation</label>
</div> </div>
</div> </div>
<div class="inline inverted field"> <div class="inline inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="osscanLimitCheckbox" title="--osscan-limit">Seulement les cibles prometteuses</label>
</div> </div>
</div> </div>
<div class="inline inverted field"> <div class="inline inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="osscanGuessCheckbox" title="--osscan-guess">Essayer de deviner</label>
</div> </div>
</div> </div>
@ -444,7 +442,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<option value="h">heures</option> <option value="h">heures</option>
</select> </select>
</div> </div>
<input id="initialRTTHidden" type="hidden" name="--initial-rtt-timeout"> <input id="initialRTTHidden" name="--initial-rtt-timeout" type="hidden">
</div> </div>
<div class="inverted field"> <div class="inverted field">
<label for="minRTTNumber" title="--min-rtt-timeout">Minimum</label> <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> <option value="h">heures</option>
</select> </select>
</div> </div>
<input id="minRTTHidden" type="hidden" name="--min-rtt-timeout"> <input id="minRTTHidden" name="--min-rtt-timeout" type="hidden">
</div> </div>
<div class="inverted field"> <div class="inverted field">
<label for="maxRTTNumber" title="--max-rtt-timeout">Maximum</label> <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> <option value="h">heures</option>
</select> </select>
</div> </div>
<input id="maxRTTHidden" type="hidden" name="--max-rtt-timeout"> <input id="maxRTTHidden" name="--max-rtt-timeout" type="hidden">
</div> </div>
</div> </div>
</div> </div>
@ -498,7 +496,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<option value="h">heures</option> <option value="h">heures</option>
</select> </select>
</div> </div>
<input id="hostTimoutHidden" type="hidden" name="--host-timeout"> <input id="hostTimoutHidden" name="--host-timeout" type="hidden">
</div> </div>
<div class="two inverted fields"> <div class="two inverted fields">
@ -515,7 +513,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<option value="h">heures</option> <option value="h">heures</option>
</select> </select>
</div> </div>
<input id="scanDelayHidden" type="hidden" name="--scan-delay"> <input id="scanDelayHidden" name="--scan-delay" type="hidden">
</div> </div>
<div class="inverted field"> <div class="inverted field">
<label for="maxScanDelay" title="--max-scan-delay">Maximum</label> <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> <option value="h">heures</option>
</select> </select>
</div> </div>
<input id="maxRTTHidden" type="hidden" name="--max-scan-delay"> <input id="maxRTTHidden" name="--max-scan-delay" type="hidden">
</div> </div>
</div> </div>
<div class="inline inverted field"> <div class="inline inverted field">
<div class="ui toggle inverted checkbox"> <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 <label for="defeatRSTRateLimitCheckbox" title="--defeat-rst-ratelimit">Ignorer les limitations de
paquets RST</label> paquets RST</label>
</div> </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="title"><i class="icon dropdown"></i>Évitement de pare-feux/IDS et mystification</div>
<div class="content"> <div class="content">
<div class="inline inverted fields">
<div class="inverted field"> <div class="inverted field">
<div class="ui toggle inverted checkbox"> <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> <label for="fInput" title="-f">Fragmentation des paquets</label>
</div> </div>
</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="two inverted fields">
<div class="inverted field"> <div class="inverted field">
<label for="mtuInput" title="--mtu">Taille des paquets</label> <label for="mtuInput" title="--mtu">Taille des paquets</label>
<div class="ui right labeled input"> <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 class="ui basic label">bits</div>
</div> </div>
</div> </div>
@ -564,7 +570,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inverted field"> <div class="inverted field">
<label for="dataLengthInput" title="--data-length">Longueur des données</label> <label for="dataLengthInput" title="--data-length">Longueur des données</label>
<div class="ui right labeled input"> <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 class="ui basic label">bits</div>
</div> </div>
</div> </div>
@ -572,24 +578,43 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="inverted field"> <div class="inverted field">
<label for="DInput" title="-D">Leurre</label> <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],..."> placeholder="decoy1[,decoy2][,ME],..." title="decoy1[,decoy2][,ME],...">
</div> </div>
<div class="two inverted fields"> <div class="two inverted fields">
<div class="inverted field"> <div class="inverted field">
<label for="SInput" title="-S">Usurpation d'adresse IP</label> <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>
<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"> <div class="inverted field">
<label for="gInput" title="-g">Port source</label> <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> </div>
<div class="inverted field"> <div class="inverted field">
<label for="ttlInput" title="--ttl">Durée de vie (TTL)</label> <label for="ipOptionsInput" title="--ip-options">Envoyer des paquets avec les options IP suivantes</label>
<input id="ttlInput" type="number" name="--ttl" min="0" max="255" placeholder="0-255"> <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>
</div> </div>
@ -606,7 +631,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
<div class="field"> <div class="field">
<label for="nameInput">Enregistrer sous le nom (optionnel)</label> <label for="nameInput">Enregistrer sous le nom (optionnel)</label>
<div class="ui small input"> <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 - _ ." /> title="Caractères autorisés: a-z A-Z 0-9 - _ ." />
</div> </div>
</div> </div>
@ -731,7 +756,7 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
}) })
new TagsInput(DInput) new TagsInput(DInput)
newScanForm.onsubmit = function (event) { newScanForm.onsubmit = function(event) {
if (this.checkValidity()) { if (this.checkValidity()) {
newScanForm.classList.add("loading") newScanForm.classList.add("loading")
$.toast({ $.toast({
@ -750,6 +775,6 @@ Exemples: <?= $_SERVER['REMOTE_ADDR']; ?>/24 <?= $_SERVER['SERVER_NAME']; ?> 10.
} }
} }
</script> </script>
</body> </body>
</html> </html>

View File

@ -97,7 +97,7 @@ if ($preset && isset($PRESETS[$preset])) {
'-g' => FILTER_VALIDATE_INT, '-g' => FILTER_VALIDATE_INT,
'--source-port' => FILTER_VALIDATE_INT, '--source-port' => FILTER_VALIDATE_INT,
'--data-length' => 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]], '--ttl' => ['filter' => FILTER_VALIDATE_INT, 'options' => ['min_range' => 0, 'max_range' => 255]],
'--spoof-mac' => FILTER_VALIDATE_MAC, '--spoof-mac' => FILTER_VALIDATE_MAC,
'--badsum' => FILTER_VALIDATE_BOOLEAN, '--badsum' => FILTER_VALIDATE_BOOLEAN,
@ -114,7 +114,7 @@ if ($preset && isset($PRESETS[$preset])) {
$inputs = array_merge($COMMONOPTIONS, $inputs); $inputs = array_merge($COMMONOPTIONS, $inputs);
$inputs['--stylesheet'] = "$BASEDIR/$STYLESHEETSDIR/{$inputs['--stylesheet']}?"; $inputs['--stylesheet'] = "$BASEDIR/$STYLESHEETSDIR/{$inputs['--stylesheet']}?";
if($name) $inputs['--stylesheet'] .= "name=$name"; if ($name) $inputs['--stylesheet'] .= "name=$name";
$options = ""; $options = "";
foreach ($inputs as $option => $value) { foreach ($inputs as $option => $value) {

View File

@ -11,18 +11,14 @@
<xsl:output indent="yes" /> <xsl:output indent="yes" />
<xsl:strip-space elements='*' /> <xsl:strip-space elements='*' />
<xsl:variable name="stylesheetURL" <xsl:variable name="stylesheetURL" select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'href=&quot;'), '?')" />
select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'href=&quot;'), '?')" />
<xsl:variable name="base" select="concat($stylesheetURL, '/../../')" /> <xsl:variable name="base" select="concat($stylesheetURL, '/../../')" />
<xsl:variable name="name" <xsl:variable name="name" select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'name='), '&quot;')" />
select="substring-before(substring-after(processing-instruction('xml-stylesheet'),'name='), '&quot;')" />
<xsl:template match="nmaprun"> <xsl:template match="nmaprun">
<xsl:variable name="target" select="substring-after(@args, '-oX - ')" /> <xsl:variable name="target" select="substring-after(@args, '-oX - ')" />
<xsl:variable <xsl:variable name="current" select="." />
name="current" select="." /> <xsl:variable name="init" select="document(concat($base, 'scans/', $name, '.xml'))/nmaprun" />
<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:apply-templates select="." mode="head">
@ -38,8 +34,7 @@
</xsl:apply-templates> </xsl:apply-templates>
<main class="ui main container inverted segment"> <main class="ui main container inverted segment">
<xsl:apply-templates <xsl:apply-templates select="$current/host | $init/host[not(address/@addr=$current/host/address/@addr)][not(status/@state='down')]">
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="init" select="$init" />
<xsl:with-param name="current" select="$current" /> <xsl:with-param name="current" select="$current" />
</xsl:apply-templates> </xsl:apply-templates>
@ -63,17 +58,14 @@ $('.ui.dropdown').dropdown()
</body> </body>
</html> </html>
</xsl:template> </xsl:template>
<xsl:template match="host"> <xsl:template match="host">
<xsl:param name="init" /> <xsl:param name="init" />
<xsl:param name="current" /> <xsl:param name="current" />
<xsl:variable name="addr" <xsl:variable name="addr" select="address/@addr" />
select="address/@addr" /> <xsl:variable name="initHost" select="$init/host[address/@addr=$addr]" />
<xsl:variable name="initHost" <xsl:variable name="currentHost" select="$current/host[address/@addr=$addr]" />
select="$init/host[address/@addr=$addr]" />
<xsl:variable name="currentHost"
select="$current/host[address/@addr=$addr]" />
<xsl:variable name="hostAddress"> <xsl:variable name="hostAddress">
<xsl:choose> <xsl:choose>
<xsl:when test="hostnames/hostname/@name"> <xsl:when test="hostnames/hostname/@name">
@ -85,8 +77,7 @@ $('.ui.dropdown').dropdown()
</xsl:choose> </xsl:choose>
</xsl:variable> </xsl:variable>
<h1 <h1 class="ui header">
class="ui header">
<div> <div>
<xsl:attribute name="class"> <xsl:attribute name="class">
<xsl:text>ui horizontal label </xsl:text> <xsl:text>ui horizontal label </xsl:text>
@ -107,8 +98,7 @@ $('.ui.dropdown').dropdown()
</xsl:choose> </xsl:choose>
</h1> </h1>
<table <table class="ui inverted table" style="width: max-content">
class="ui inverted table" style="width: max-content">
<thead> <thead>
<tr> <tr>
<xsl:if test="address[@addrtype='ipv4']/@addr"> <xsl:if test="address[@addrtype='ipv4']/@addr">
@ -170,8 +160,7 @@ $('.ui.dropdown').dropdown()
</tbody> </tbody>
</table> </table>
<xsl:if <xsl:if test="hostscript/script">
test="hostscript/script">
<div class="ui inverted tree accordion"> <div class="ui inverted tree accordion">
<div class="title"> <div class="title">
<i class="dropdown icon"></i> Informations supplémentaires </div> <i class="dropdown icon"></i> Informations supplémentaires </div>
@ -181,32 +170,26 @@ $('.ui.dropdown').dropdown()
</div> </div>
</xsl:if> </xsl:if>
<h2 <h2 class="ui header">Services</h2>
class="ui header">Services</h2>
<div class="ui cards"> <div class="ui inverted two small cards">
<xsl:apply-templates <xsl:apply-templates select="$currentHost/ports/port[not(state/@state='closed')] | $initHost/ports/port[not(state/@state='closed')][not(@portid=$currentHost/ports/port/@portid)]">
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="initHost" select="$initHost" />
<xsl:with-param name="currentHost" select="$currentHost" /> <xsl:with-param name="currentHost" select="$currentHost" />
<xsl:with-param name="hostAddress" select="$hostAddress" /> <xsl:with-param name="hostAddress" select="$hostAddress" />
</xsl:apply-templates> </xsl:apply-templates>
</div> </div>
<xsl:apply-templates <xsl:apply-templates select="trace" />
select="trace" /> </xsl:template>
</xsl:template>
<xsl:template match="port"> <xsl:template match="port">
<xsl:param name="hostAddress" /> <xsl:param name="hostAddress" />
<xsl:param name="initHost" /> <xsl:param name="initHost" />
<xsl:param name="currentHost" /> <xsl:param name="currentHost" />
<xsl:variable <xsl:variable name="portid" select="@portid" />
name="portid" select="@portid" /> <xsl:variable name="initPort" select="$initHost/ports/port[@portid=$portid]" />
<xsl:variable name="initPort" <xsl:variable name="currentPort" select="$currentHost/ports/port[@portid=$portid]" />
select="$initHost/ports/port[@portid=$portid]" />
<xsl:variable name="currentPort"
select="$currentHost/ports/port[@portid=$portid]" />
<xsl:variable name="color"> <xsl:variable name="color">
<xsl:choose> <xsl:choose>
<xsl:when test="$currentPort/script[@id='http-info']/elem[@key='status']>=500">red</xsl:when> <xsl:when test="$currentPort/script[@id='http-info']/elem[@key='status']>=500">red</xsl:when>
@ -218,11 +201,10 @@ $('.ui.dropdown').dropdown()
</xsl:choose> </xsl:choose>
</xsl:variable> </xsl:variable>
<div <div class="ui card {$color}">
class="ui inverted card {$color}">
<div class="content"> <div class="content">
<div class="header"> <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"> <div class="detail" style="text-transform: uppercase">
<xsl:value-of select="@protocol" /> <xsl:value-of select="@protocol" />
<xsl:text>:</xsl:text> <xsl:text>:</xsl:text>
@ -267,8 +249,7 @@ $('.ui.dropdown').dropdown()
</div> </div>
</div> </div>
</div> </div>
<xsl:if <xsl:if test="service/@name='ftp' or service/@name='ssh' or service/@name='http' or service/@name='https' or service/@name='ms-wbt-server'">
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"> <a class="ui {$color} button" target="_blank">
<xsl:attribute name="href"> <xsl:attribute name="href">
<xsl:choose> <xsl:choose>
@ -276,8 +257,7 @@ $('.ui.dropdown').dropdown()
<xsl:text>rdp.php?v=</xsl:text> <xsl:text>rdp.php?v=</xsl:text>
<xsl:value-of select="$hostAddress" /> <xsl:value-of select="$hostAddress" />
<xsl:text>&amp;p=</xsl:text> <xsl:text>&amp;p=</xsl:text>
<xsl:value-of <xsl:value-of select="@portid" />
select="@portid" />
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:choose> <xsl:choose>
@ -289,8 +269,7 @@ $('.ui.dropdown').dropdown()
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
<xsl:text>://</xsl:text> <xsl:text>://</xsl:text>
<xsl:value-of <xsl:value-of select="$hostAddress" />
select="$hostAddress" />
<xsl:text>:</xsl:text> <xsl:text>:</xsl:text>
<xsl:value-of select="@portid" /> <xsl:value-of select="@portid" />
</xsl:otherwise> </xsl:otherwise>
@ -305,13 +284,11 @@ $('.ui.dropdown').dropdown()
<xsl:attribute name="style"> <xsl:attribute name="style">
<xsl:for-each select="$currentPort/script[@id='smb-shares-size']/table"> <xsl:for-each select="$currentPort/script[@id='smb-shares-size']/table">
<xsl:sort select="elem[@key='FreeSize'] div elem[@key='TotalSize']" order="ascending" /> <xsl:sort select="elem[@key='FreeSize'] div elem[@key='TotalSize']" order="ascending" />
<xsl:if <xsl:if test="position()=1">
test="position()=1">
<xsl:text>--free: </xsl:text> <xsl:text>--free: </xsl:text>
<xsl:value-of select="elem[@key='FreeSize']" /> <xsl:value-of select="elem[@key='FreeSize']" />
<xsl:text>; --total: </xsl:text> <xsl:text>; --total: </xsl:text>
<xsl:value-of <xsl:value-of select="elem[@key='TotalSize']" />
select="elem[@key='TotalSize']" />
</xsl:if> </xsl:if>
</xsl:for-each> </xsl:for-each>
</xsl:attribute> </xsl:attribute>
@ -327,9 +304,9 @@ $('.ui.dropdown').dropdown()
</xsl:if> </xsl:if>
</div> </div>
</xsl:template> </xsl:template>
<xsl:template match="script"> <xsl:template match="script">
<div class="ui inverted accordion"> <div class="ui inverted accordion">
<div class="title"> <div class="title">
<i class="dropdown icon"></i> <i class="dropdown icon"></i>
@ -345,8 +322,7 @@ $('.ui.dropdown').dropdown()
</tbody> </tbody>
</table> </table>
</xsl:if> </xsl:if>
<xsl:apply-templates <xsl:apply-templates select="table" />
select="table" />
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="@output" /> <xsl:value-of select="@output" />
@ -354,9 +330,9 @@ $('.ui.dropdown').dropdown()
</xsl:choose> </xsl:choose>
</div> </div>
</div> </div>
</xsl:template> </xsl:template>
<xsl:template match="table"> <xsl:template match="table">
<xsl:choose> <xsl:choose>
<xsl:when test="@key"> <xsl:when test="@key">
<div class="ui inverted accordion"> <div class="ui inverted accordion">
@ -384,9 +360,9 @@ $('.ui.dropdown').dropdown()
</table> </table>
</xsl:when> </xsl:when>
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
<xsl:template match="elem"> <xsl:template match="elem">
<tr> <tr>
<td style="width: min-content"> <td style="width: min-content">
<xsl:value-of select="@key" /> <xsl:value-of select="@key" />
@ -395,19 +371,17 @@ $('.ui.dropdown').dropdown()
<xsl:value-of select="." /> <xsl:value-of select="." />
</td> </td>
</tr> </tr>
</xsl:template> </xsl:template>
<xsl:template match="table"> <xsl:template match="table">
<xsl:param name="hostAddress" /> <xsl:param name="hostAddress" />
<a class="item share-size" <a class="item share-size" href="file://///{$hostAddress}/{@key}" target="_blank" rel="noopener noreferrer" style="--free: {elem[@key='FreeSize']}; --total: {elem[@key='TotalSize']}">
href="file://///{$hostAddress}/{@key}" target="_blank" rel="noopener noreferrer"
style="--free: {elem[@key='FreeSize']}; --total: {elem[@key='TotalSize']}">
<xsl:value-of select="@key" /> <xsl:value-of select="@key" />
</a> </a>
</xsl:template> </xsl:template>
<xsl:template match="trace"> <xsl:template match="trace">
<h2 class="ui header">Traceroute</h2> <h2 class="ui header">Traceroute</h2>
<table class="ui inverted table"> <table class="ui inverted table">
@ -422,9 +396,9 @@ $('.ui.dropdown').dropdown()
<xsl:apply-templates select="hop" /> <xsl:apply-templates select="hop" />
</tbody> </tbody>
</table> </table>
</xsl:template> </xsl:template>
<xsl:template match="hop"> <xsl:template match="hop">
<tr> <tr>
<td> <td>
<xsl:value-of select="@ttl" /> <xsl:value-of select="@ttl" />
@ -447,6 +421,6 @@ $('.ui.dropdown').dropdown()
<xsl:text> ms</xsl:text> <xsl:text> ms</xsl:text>
</td> </td>
</tr> </tr>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

View File

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