mac vendor
This commit is contained in:
parent
db216baf46
commit
47c0bbdb4c
16
hostScan.xsl
16
hostScan.xsl
@ -54,7 +54,7 @@
|
||||
<link rel="icon" href="{$basedir}/favicon.ico"/>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.9.3/dist/semantic.min.css"/>
|
||||
<link href="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="https://cdn.datatables.net/v/dt/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/fh-4.0.1/r-3.0.3/datatables.css" rel="stylesheet"/>
|
||||
<link href="https://cdn.datatables.net/v/dt/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/fh-4.0.1/r-3.0.3/cr-2.0.4/datatables.css" rel="stylesheet"/>
|
||||
<link href="{$basedir}/style.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.2/semantic.min.js"></script>
|
||||
@ -62,7 +62,7 @@
|
||||
<script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.polyfills.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
|
||||
<script src="https://cdn.datatables.net/v/dt/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/fh-4.0.1/r-3.0.3/datatables.js"></script>
|
||||
<script src="https://cdn.datatables.net/v/dt/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/fh-4.0.1/r-3.0.3/cr-2.0.4/datatables.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@ -130,6 +130,7 @@ var table = $('#scanResultsTable').DataTable({
|
||||
[256, 512, 1024, 2048, "All"]
|
||||
],
|
||||
responsive: true,
|
||||
colReorder: true
|
||||
})
|
||||
|
||||
$('.ui.dropdown').dropdown()
|
||||
@ -265,6 +266,17 @@ $.toast({
|
||||
</td>
|
||||
<td>
|
||||
<a>
|
||||
<xsl:attribute name="class">
|
||||
<xsl:text>ui mini button </xsl:text>
|
||||
<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']>=400">orange</xsl:when>
|
||||
<xsl:when test="$currentPort/script[@id='http-info']/elem[@key='status']>=200">green</xsl:when>
|
||||
<xsl:when test="$currentPort/state/@state='open'">green</xsl:when>
|
||||
<xsl:when test="$currentPort/state/@state='filtered'">orange</xsl:when>
|
||||
<xsl:otherwise>red</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:if test="service/@name='ftp' or service/@name='ssh' or service/@name='http' or service/@name='https'">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:choose>
|
||||
|
14
lanScan.xsl
14
lanScan.xsl
@ -8,12 +8,11 @@
|
||||
<xsl:output indent="yes"/>
|
||||
<xsl:strip-space elements='*'/>
|
||||
|
||||
<xsl:param name="saveAs" select=""/>
|
||||
<xsl:param name="scansDir" select="scans"/>
|
||||
<xsl:param name="savedAs" select=""/>
|
||||
<xsl:param name="compareWith" select=""/>
|
||||
<xsl:variable name="nextCompareWith">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$saveAs"><xsl:value-of select="$saveAs"/></xsl:when>
|
||||
<xsl:when test="$savedAs"><xsl:value-of select="$savedAs"/></xsl:when>
|
||||
<xsl:when test="$compareWith"><xsl:value-of select="$compareWith"/></xsl:when>
|
||||
<xsl:otherwise></xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@ -54,7 +53,7 @@
|
||||
<link rel="icon" href="{$basedir}/favicon.ico"/>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.9.3/dist/semantic.min.css"/>
|
||||
<link href="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="https://cdn.datatables.net/v/dt/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/fh-4.0.1/r-3.0.3/datatables.css" rel="stylesheet"/>
|
||||
<link href="https://cdn.datatables.net/v/dt/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/fh-4.0.1/r-3.0.3/cr-2.0.4/datatables.css" rel="stylesheet"/>
|
||||
<link href="{$basedir}/style.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.9.2/semantic.min.js"></script>
|
||||
@ -62,7 +61,7 @@
|
||||
<script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.polyfills.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script>
|
||||
<script src="https://cdn.datatables.net/v/dt/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/fh-4.0.1/r-3.0.3/datatables.js"></script>
|
||||
<script src="https://cdn.datatables.net/v/dt/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/fh-4.0.1/r-3.0.3/cr-2.0.4/datatables.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@ -115,6 +114,7 @@ Exemples: 192.168.1.0/24 scanme.nmap.org 10.0-255.0-255.1-254"/>
|
||||
<th>Etat</th>
|
||||
<th>Adresse IP</th>
|
||||
<th>Nom</th>
|
||||
<th>Fabricant</th>
|
||||
<th class="ten wide">Services</th>
|
||||
<th>Scanner les services</th>
|
||||
</tr>
|
||||
@ -149,6 +149,7 @@ var table = $('#scanResultsTable').DataTable({
|
||||
[256, 512, 1024, 2048, "All"]
|
||||
],
|
||||
responsive: true,
|
||||
colReorder: true
|
||||
})
|
||||
table.order([1, 'asc']).draw()
|
||||
|
||||
@ -234,6 +235,9 @@ $.toast({
|
||||
<td>
|
||||
<b><xsl:value-of select="hostnames/hostname/@name"/></b>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:value-of select="address[@addrtype='mac']/@vendor"/>
|
||||
</td>
|
||||
<td>
|
||||
<xsl:apply-templates select="$currentHost/ports/port | $initHost/ports/port[not(@portid=$currentHost/ports/port/@portid)][not(state/@state='closed')]">
|
||||
<xsl:with-param name="initHost" select="$initHost"/>
|
||||
|
5
scan.php
5
scan.php
@ -28,7 +28,7 @@ foreach ($inputs as $arg => $value) {
|
||||
|
||||
$tempPath = tempnam(sys_get_temp_dir(), 'scan_').".xml";
|
||||
|
||||
exec("nmap$args -oX '$tempPath' $targets 2>&1", $stderr, $code);
|
||||
exec("sudo nmap$args -oX '$tempPath' $targets 2>&1", $stderr, $code);
|
||||
if ($code) {
|
||||
http_response_code(500);
|
||||
die(implode("<br/>\n", $stderr));
|
||||
@ -39,8 +39,7 @@ $xml->load($tempPath);
|
||||
`rm "$tempPath"`;
|
||||
|
||||
$saveAsURL = $saveAs? "$BASEDIR/$SCANSDIR/$saveAs.xml" : "";
|
||||
$xml->insertBefore($xml->createProcessingInstruction('xslt-param', "name='saveAs' value='".htmlentities($saveAsURL, ENT_QUOTES)."'"), $xml->documentElement);
|
||||
$xml->insertBefore($xml->createProcessingInstruction('xslt-param', "name='scansDir' value='".htmlentities($SCANSDIR, ENT_QUOTES)."'"), $xml->documentElement);
|
||||
$xml->insertBefore($xml->createProcessingInstruction('xslt-param', "name='savedAs' value='".htmlentities($saveAsURL, ENT_QUOTES)."'"), $xml->documentElement);
|
||||
$xml->insertBefore($xml->createProcessingInstruction('xslt-param', "name='compareWith' value='".htmlentities($compareWith, ENT_QUOTES)."'"), $xml->documentElement);
|
||||
|
||||
if ($saveAs) {
|
||||
|
Reference in New Issue
Block a user