This commit is contained in:
Adrien MALINGREY 2024-10-16 23:32:25 +02:00
parent 7c4d32c83f
commit 7aeb817c4c
8 changed files with 39 additions and 27 deletions

View File

@ -4,20 +4,26 @@ Scanne le réseau avec `nmap` et affiche les résultats dans une page web.
## Configuration
On peut personnaliser les options de `nmap` utilisées par défaut pour les scans de réseau ou d'hôte dans le fichier `config.php` :
On peut personnaliser les options prédéfinies pour les scans de réseau ou d'hôte dans le fichier `config.php` :
```php
$LANSCAN_OPTIONS = [
'PS' => 'microsoft-ds',
'F' => true,
'T5' => true,
'stylesheet' => "$BASEDIR/lanScan.xsl"
];
$HOSTSCAN_OPTIONS = [
'Pn' => true,
'F' => true,
'sV' => true,
'stylesheet' => "$BASEDIR/hostScan.xsl"
$presets = [
"lan" => [
'-PS' => 'microsoft-ds',
'-F' => true,
'-T5' => true,
'--stylesheet' => "$BASEDIR/lanScan.xsl",
'refreshPeriod' => 60,
'sudo' => false,
],
"host" => [
'-Pn' => true,
'-F' => true,
'-sV' => true,
'-T5' => true,
'--stylesheet' => "$BASEDIR/servicesDetails.xsl",
'refreshPeriod' => 60,
'sudo' => false,
],
];
```

View File

@ -113,8 +113,10 @@ Exemples: 192.168.1.0/24 scanme.nmap.org 10.0-255.0-255.1-254"/>
</div>
</main>
<footer class="ui fixed footer segment">
<footer class="ui bottom fixed menu">
<div class="item">
lanScan est basé sur <a href="https://nmap.org/" target="_blank">Nmap</a>
</div>
</footer>
<script>

View File

@ -13,7 +13,7 @@ $presets = [
'refreshPeriod' => 60,
'sudo' => false,
],
"services" => [
"host" => [
'-Pn' => true,
'-F' => true,
'-sV' => true,

View File

@ -77,8 +77,10 @@ hiddenButton.onclick = (event) => {
}
</script>
</main>
<footer class="ui footer segment">
<footer class="ui bottom fixed menu">
<div class="item">
lanScan est basé sur <a href="https://nmap.org/" target="_blank">Nmap</a>
</div>
</footer>
</body>

View File

@ -125,8 +125,10 @@ Exemples: 192.168.1.0/24 scanme.nmap.org 10.0-255.0-255.1-254"/>
</table>
</main>
<footer class="ui footer segment">
<footer class="ui bottom fixed menu">
<div class="item">
lanScan est basé sur <a href="https://nmap.org/" target="_blank">Nmap</a>
</div>
</footer>
<script>
@ -292,7 +294,7 @@ function hostScanning(link) {
<a class="ui mini icon teal button" onclick="hostScanning(this)">
<xsl:attribute name="href">
<xsl:value-of select="$basedir"/>
<xsl:text>/scan.php?preset=services&amp;targets=</xsl:text>
<xsl:text>/scan.php?preset=host&amp;targets=</xsl:text>
<xsl:value-of select="$hostAddress"/>
</xsl:attribute>
<i class="satellite dish icon"></i>
@ -301,7 +303,7 @@ function hostScanning(link) {
<a class="ui mini icon teal label">
<xsl:attribute name="href">
<xsl:value-of select="$basedir"/>
<xsl:text>/options.php?preset=services&amp;targets=</xsl:text>
<xsl:text>/options.php?preset=host&amp;targets=</xsl:text>
<xsl:value-of select="$hostAddress"/>
</xsl:attribute>
<i class="sliders horizontal icon"></i>

View File

@ -383,8 +383,10 @@ foreach (scandir($SCANSDIR) as $filename) {
<button type="submit" class="ui teal submit button">Démarrer</button>
</form>
</main>
<footer class="ui footer segment">
<footer class="ui bottom fixed menu">
<div class="item">
lanScan est basé sur <a href="https://nmap.org/" target="_blank">Nmap</a>
</div>
</footer>
<datalist id='targetsList'>

View File

@ -105,8 +105,10 @@ Exemples: 192.168.1.0/24 scanme.nmap.org 10.0-255.0-255.1-254"/>
<xsl:apply-templates select="host | $init/host[not(address/@addr=$current/host/address/@addr)][not(status/@state='down')]"/>
</main>
<footer class="ui footer segment">
lanScan est basé sur <a href="https://nmap.org/" target="_blank">Nmap</a>
<footer class="ui bottom fixed menu">
<div class="item">
lanScan est basé sur <a href="https://nmap.org/" target="_blank">Nmap</a>
</div>
</footer>
<script>
@ -299,7 +301,7 @@ function hostScanning(link) {
<xsl:value-of select="$currentPort/state/@state"/>
</div>
</td>
<td>
<td style="text-transform: uppercase">
<xsl:value-of select="@protocol"/>
</td>
<td>

View File

@ -8,10 +8,6 @@ svg {
min-height: calc(100vh - 4.4285em - 2px);
}
.ui.footer.segment {
margin-bottom: 0;
}
.tagify {
width: 100%;
border-radius: .28571429rem;