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 ## 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 ```php
$LANSCAN_OPTIONS = [ $presets = [
'PS' => 'microsoft-ds', "lan" => [
'F' => true, '-PS' => 'microsoft-ds',
'T5' => true, '-F' => true,
'stylesheet' => "$BASEDIR/lanScan.xsl" '-T5' => true,
]; '--stylesheet' => "$BASEDIR/lanScan.xsl",
'refreshPeriod' => 60,
$HOSTSCAN_OPTIONS = [ 'sudo' => false,
'Pn' => true, ],
'F' => true, "host" => [
'sV' => true, '-Pn' => true,
'stylesheet' => "$BASEDIR/hostScan.xsl" '-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> </div>
</main> </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> lanScan est basé sur <a href="https://nmap.org/" target="_blank">Nmap</a>
</div>
</footer> </footer>
<script> <script>

View File

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

View File

@ -77,8 +77,10 @@ hiddenButton.onclick = (event) => {
} }
</script> </script>
</main> </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> lanScan est basé sur <a href="https://nmap.org/" target="_blank">Nmap</a>
</div>
</footer> </footer>
</body> </body>

View File

@ -125,8 +125,10 @@ Exemples: 192.168.1.0/24 scanme.nmap.org 10.0-255.0-255.1-254"/>
</table> </table>
</main> </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> lanScan est basé sur <a href="https://nmap.org/" target="_blank">Nmap</a>
</div>
</footer> </footer>
<script> <script>
@ -292,7 +294,7 @@ function hostScanning(link) {
<a class="ui mini icon teal button" onclick="hostScanning(this)"> <a class="ui mini icon teal button" onclick="hostScanning(this)">
<xsl:attribute name="href"> <xsl:attribute name="href">
<xsl:value-of select="$basedir"/> <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:value-of select="$hostAddress"/>
</xsl:attribute> </xsl:attribute>
<i class="satellite dish icon"></i> <i class="satellite dish icon"></i>
@ -301,7 +303,7 @@ function hostScanning(link) {
<a class="ui mini icon teal label"> <a class="ui mini icon teal label">
<xsl:attribute name="href"> <xsl:attribute name="href">
<xsl:value-of select="$basedir"/> <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:value-of select="$hostAddress"/>
</xsl:attribute> </xsl:attribute>
<i class="sliders horizontal icon"></i> <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> <button type="submit" class="ui teal submit button">Démarrer</button>
</form> </form>
</main> </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> lanScan est basé sur <a href="https://nmap.org/" target="_blank">Nmap</a>
</div>
</footer> </footer>
<datalist id='targetsList'> <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')]"/> <xsl:apply-templates select="host | $init/host[not(address/@addr=$current/host/address/@addr)][not(status/@state='down')]"/>
</main> </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> lanScan est basé sur <a href="https://nmap.org/" target="_blank">Nmap</a>
</div>
</footer> </footer>
<script> <script>
@ -299,7 +301,7 @@ function hostScanning(link) {
<xsl:value-of select="$currentPort/state/@state"/> <xsl:value-of select="$currentPort/state/@state"/>
</div> </div>
</td> </td>
<td> <td style="text-transform: uppercase">
<xsl:value-of select="@protocol"/> <xsl:value-of select="@protocol"/>
</td> </td>
<td> <td>

View File

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