diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d91083d --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +scans/ +datadir/script-args.ini +test.php \ No newline at end of file diff --git a/config.php b/config.php new file mode 100644 index 0000000..56b251a --- /dev/null +++ b/config.php @@ -0,0 +1,6 @@ + @@ -6,27 +7,11 @@ lanScan + @@ -37,15 +22,23 @@ -
+

Découvrir ou superviser un réseau

@@ -56,7 +49,7 @@
@@ -66,27 +59,37 @@ diff --git a/scan.php b/scan.php new file mode 100644 index 0000000..c70c9c0 --- /dev/null +++ b/scan.php @@ -0,0 +1,28 @@ + ['regexp' => '/^[\da-zA-Z-. \/]+$/'], "flags" => FILTER_NULL_ON_FAILURE]); +if ($lan) { + $cmd = $lanScanCmd; + $targets = $lan; + $stylesheet = $lanScanStylesheet; +} + +if ($cmd) { + if (!file_exists($SCANSDIR)) mkdir($SCANSDIR); + $path = "$SCANSDIR/".str_replace("/", "!", $targets).".xml"; + + if (file_exists($path)) { + $cmd .= "?original=".rawurlencode($targets); + $cmd .= " $targets"; + } else { + $cmd .= " $targets"; + $command .= " | tee '$path'"; + } + + header('Content-type: text/xml'); + system($cmd, $retcode); +} + +exit(); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..6baa855 --- /dev/null +++ b/style.css @@ -0,0 +1,17 @@ +body { + background-color: #1b1c1d; +} + +.logo { + display: flex !important; + justify-content: center; + align-items: center; + width: fit-content; +} + +.logo svg { + width: 2.5em; + height: 2.5em; + fill: currentColor; + margin: -0.4em; +} diff --git a/stylesheets/lanScan.xsl b/stylesheets/lanScan.xsl new file mode 100644 index 0000000..1ad84d4 --- /dev/null +++ b/stylesheets/lanScan.xsl @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + lanScan + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
EtatAdresse IPNomFabricantServicesScanner les services
+
+ + + + + + +
+ + +
\ No newline at end of file diff --git a/stylesheets/nmap.xsl b/stylesheets/nmap.xsl new file mode 100644 index 0000000..1be7ead --- /dev/null +++ b/stylesheets/nmap.xsl @@ -0,0 +1,1071 @@ + + + + + + + +0.9c + + + + + + + + + + + + + + + + + + + + +generated with nmap.xsl - version by Benjamin Erb - http://www.benjamin-erb.de/nmap_xsl.php + + + + Nmap Scan Report - Scanned at <xsl:value-of select="$start" /> + + + + + + + + +
+ +

Nmap Scan Report - Scanned at

+ +
+ + + scansummary + + + + +

Scan Summary

+ +

+ Nmap was initiated at with these arguments:
+
+

+

+ Verbosity: ; Debug level +

+ +

+ +

+ + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + host_ + + + + + +

+ + + + + / + + + + (online) +

+ +
+ + +

+ + + + + / + + + + + javascript:toggle('hostblock_'); + host_down + (click to expand) + + (offline)

+
+ +
+ + + + hostblock_ + + + + unhidden + + + + hidden + + + + + +

Address

+ +
    + +
  • + + - + + + + () +
  • +
    +
+
+ + + + +
+ + + javascript:toggle('metrics_'); + Misc Metrics (click to expand) + + + + + metrics_ + hidden + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MetricValue
Ping Results + + from + + +
System Uptime seconds (last reboot: ) +
Network Distance hops
TCP Sequence PredictionDifficulty= ()
IP ID Sequence Generation
+
+ +
+ +
+ + + + + + + +

Hostnames

+
+ + + + + +
  • ()
  • +
    + + + + + + +

    Ports

    + + +

    The ports scanned but not shown below are in state:

    +
    + +
      + + +
    • ports replied with:

    • +
      +
      +
    +
    + + + + + + + + + + + porttable_ + 1 + + + Port + State + + javascript:togglePorts('porttable_','closed'); + (toggle closed [] + + + javascript:togglePorts('porttable_','filtered'); + | filtered []) + + + Service + Reason + Product + Version + Extra info + + + + + +
    + + + + + + + + + + + + +   + + + from + + + +   +   +   + + + + + +   + +
      
    + + + +
    +
    + + + + + + +   + + + from + + + +   +   +   + + + + + + + + +   + + + from + + + +   +   +   + + + + + + + + +   + + + from + + + +   +   +   + + + +
    +
    + + + + + +

    Remote Operating System Detection

    + +

    Unable to identify operating system.

    + +
      + +
    • Used port: / ()
    • +
      + + +
    • OS match: (%)
    • +
      +
    + + + +
    + + + + + + + + + + + + +
      +
    • Cannot determine exact operating system. Fingerprint provided below.
    • +
    • If you know what OS is running on it, see https://nmap.org/submit/
    • +
    + + + + + + + +
    Operating System fingerprint
    + +
    + + +
      +
    • OS identified but the fingerprint was requested at scan time. + + + javascript:toggle('osblock_'); + (click to expand) + +
    • +
    + + + osblock_ + hidden + + + + + + + + +
    Operating System fingerprint
    + +
    + +
    + +
    + +
    + + + + + + + + + + prescript + + +

    Pre-Scan Script Output

    + + + + + + + + + + + + + + +
    Script NameOutput
    +   + +
    +           
    +        
    +
    +
    + + + + + + + + + + postscript + + +

    Post-Scan Script Putput

    + + + + + + + + + + + + + + +
    Script NameOutput
    +   + +
    +           
    +        
    +
    +
    + + + + + + +

    Host Script Output

    + + + + + + + + + + + + + + +
    Script NameOutput
    +   + +
    +              
    +          
    +
    +
    + + + + + +

    Smurf Responses

    +
      +
    • responses counted
    • +
    +
    +
    + + + + + + + + + + + + + + javascript:toggle('trace_'); + Traceroute Information (click to expand) + + + + trace_ + hidden + + + + +
    • Traceroute data generated using port /
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    HopRttIPHost
    --
    +
    + +
    +
    + +