export head
This commit is contained in:
		
							
								
								
									
										13
									
								
								style.css
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								style.css
									
									
									
									
									
								
							| @ -51,3 +51,16 @@ main { | |||||||
|     --color: hsl(calc(120*var(--free-ratio)) 100% 50%); |     --color: hsl(calc(120*var(--free-ratio)) 100% 50%); | ||||||
|     background-image: linear-gradient(to right, var(--color) var(--used-percent), transparent var(--used-percent), transparent) !important; |     background-image: linear-gradient(to right, var(--color) var(--used-percent), transparent var(--used-percent), transparent) !important; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | .compact .ui.icon.buttons .mini.button { | ||||||
|  |     padding: 0.5em; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .compact { | ||||||
|  |     overflow-x: scroll; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | .compact > input{ | ||||||
|  |     min-width: 10em; | ||||||
|  |     padding-right: .1em; | ||||||
|  | } | ||||||
|  | |||||||
| @ -4,6 +4,7 @@ | |||||||
|     xmlns:xs="http://www.w3.org/2001/XMLSchema" |     xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||||||
|     version="1.1"> |     version="1.1"> | ||||||
|  |  | ||||||
|  |     <xsl:import href="lib/head.xsl"/> | ||||||
|     <xsl:import href="lib/parseCommand.xsl"/> |     <xsl:import href="lib/parseCommand.xsl"/> | ||||||
|     <xsl:import href="lib/serviceLabel.xsl"/> |     <xsl:import href="lib/serviceLabel.xsl"/> | ||||||
|     <xsl:import href="lib/toast.xsl"/> |     <xsl:import href="lib/toast.xsl"/> | ||||||
| @ -33,47 +34,13 @@ | |||||||
|         <xsl:variable name="targets" select="substring-after(@args, '.xml ')"/> |         <xsl:variable name="targets" select="substring-after(@args, '.xml ')"/> | ||||||
|          |          | ||||||
|         <html lang="fr"> |         <html lang="fr"> | ||||||
|             <head> |             <xsl:apply-templates select="." mode="head"> | ||||||
|                 <meta charset="utf-8"/> |                 <xsl:with-param name="basedir" select="$basedir"/> | ||||||
|                 <xsl:if test="$refreshPeriod > 0"> |                 <xsl:with-param name="targets" select="$targets"/> | ||||||
|                     <meta http-equiv="refresh"> |                 <xsl:with-param name="nextCompareWith" select="$nextCompareWith"/> | ||||||
|                         <xsl:attribute name="content"> |                 <xsl:with-param name="refreshPeriod" select="$refreshPeriod"/> | ||||||
|                             <xsl:value-of select="$refreshPeriod"/> |                 <xsl:with-param name="sudo" select="$sudo"/> | ||||||
|                             <xsl:text>;URL=</xsl:text> |             </xsl:apply-templates> | ||||||
|                             <xsl:value-of select="$basedir"/> |  | ||||||
|                             <xsl:text>/scan.php?targets=</xsl:text> |  | ||||||
|                             <xsl:value-of select="$targets"/> |  | ||||||
|                             <xsl:text>&</xsl:text> |  | ||||||
|                             <xsl:call-template name="parseCommand"> |  | ||||||
|                                 <xsl:with-param name="argList" select="substring-before(substring-after(@args, ' -'), ' -oX')"/> |  | ||||||
|                                 <xsl:with-param name="asURL" select="true()"/> |  | ||||||
|                             </xsl:call-template> |  | ||||||
|                             <xsl:text>compareWith=</xsl:text> |  | ||||||
|                             <xsl:value-of select="$nextCompareWith"/> |  | ||||||
|                             <xsl:text>&refreshPeriod=</xsl:text> |  | ||||||
|                             <xsl:value-of select="$refreshPeriod"/> |  | ||||||
|                             <xsl:text>&sudo=</xsl:text> |  | ||||||
|                             <xsl:value-of select="$sudo"/> |  | ||||||
|                         </xsl:attribute> |  | ||||||
|                     </meta> |  | ||||||
|                 </xsl:if> |  | ||||||
|                 <title> |  | ||||||
|                     <xsl:text>lanScan - </xsl:text> |  | ||||||
|                     <xsl:value-of select="$targets"/> |  | ||||||
|                 </title> |  | ||||||
|                 <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/se/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/cr-2.0.4/fc-5.0.3/fh-4.0.1/r-3.0.3/datatables.min.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> |  | ||||||
|                 <script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify"></script> |  | ||||||
|                 <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.min.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/se/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/cr-2.0.4/fc-5.0.3/fh-4.0.1/r-3.0.3/datatables.min.js"></script> |  | ||||||
|             </head> |  | ||||||
|  |  | ||||||
|             <body> |             <body> | ||||||
|                 <nav class="ui inverted teal fixed menu"> |                 <nav class="ui inverted teal fixed menu"> | ||||||
| @ -131,10 +98,6 @@ Exemples: 192.168.1.0/24 scanme.nmap.org 10.0-255.0-255.1-254"/> | |||||||
|                 <script> |                 <script> | ||||||
| $('.ui.dropdown').dropdown() | $('.ui.dropdown').dropdown() | ||||||
|  |  | ||||||
| <xsl:apply-templates select="runstats"> |  | ||||||
|     <xsl:with-param name="init" select="$init"/> |  | ||||||
| </xsl:apply-templates> |  | ||||||
|  |  | ||||||
| hiddenButton.onclick = function(event) { | hiddenButton.onclick = function(event) { | ||||||
|     if (lanScanForm.checkValidity()) { |     if (lanScanForm.checkValidity()) { | ||||||
|         targetsInputDiv.classList.add('loading') |         targetsInputDiv.classList.add('loading') | ||||||
| @ -175,6 +138,10 @@ function hostScanning(link) { | |||||||
|     }) |     }) | ||||||
| } | } | ||||||
|                 </script> |                 </script> | ||||||
|  |  | ||||||
|  |                 <xsl:apply-templates select="runstats"> | ||||||
|  |                     <xsl:with-param name="init" select="$init"/> | ||||||
|  |                 </xsl:apply-templates> | ||||||
|             </body> |             </body> | ||||||
|         </html> |         </html> | ||||||
|     </xsl:template> |     </xsl:template> | ||||||
|  | |||||||
| @ -4,6 +4,7 @@ | |||||||
|     xmlns:xs="http://www.w3.org/2001/XMLSchema" |     xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||||||
|     version="1.1"> |     version="1.1"> | ||||||
|  |  | ||||||
|  |     <xsl:import href="lib/head.xsl"/> | ||||||
|     <xsl:import href="lib/parseCommand.xsl"/> |     <xsl:import href="lib/parseCommand.xsl"/> | ||||||
|     <xsl:import href="lib/toast.xsl"/>  |     <xsl:import href="lib/toast.xsl"/>  | ||||||
|  |  | ||||||
| @ -32,61 +33,13 @@ | |||||||
|         <xsl:variable name="targets" select="substring-after(@args, '.xml ')"/> |         <xsl:variable name="targets" select="substring-after(@args, '.xml ')"/> | ||||||
|          |          | ||||||
|         <html lang="fr"> |         <html lang="fr"> | ||||||
|             <head> |             <xsl:apply-templates select="." mode="head"> | ||||||
|                 <meta charset="utf-8"/> |                 <xsl:with-param name="basedir" select="$basedir"/> | ||||||
|                 <xsl:if test="$refreshPeriod > 0"> |                 <xsl:with-param name="targets" select="$targets"/> | ||||||
|                     <meta http-equiv="refresh"> |                 <xsl:with-param name="nextCompareWith" select="$nextCompareWith"/> | ||||||
|                         <xsl:attribute name="content"> |                 <xsl:with-param name="refreshPeriod" select="$refreshPeriod"/> | ||||||
|                             <xsl:value-of select="$refreshPeriod"/> |                 <xsl:with-param name="sudo" select="$sudo"/> | ||||||
|                             <xsl:text>;URL=</xsl:text> |             </xsl:apply-templates> | ||||||
|                             <xsl:value-of select="$basedir"/> |  | ||||||
|                             <xsl:text>/scan.php?targets=</xsl:text> |  | ||||||
|                             <xsl:value-of select="$targets"/> |  | ||||||
|                             <xsl:text>&</xsl:text> |  | ||||||
|                             <xsl:call-template name="parseCommand"> |  | ||||||
|                                 <xsl:with-param name="argList" select="substring-before(substring-after(@args, ' -'), ' -oX')"/> |  | ||||||
|                                 <xsl:with-param name="asURL" select="true()"/> |  | ||||||
|                             </xsl:call-template> |  | ||||||
|                             <xsl:text>compareWith=</xsl:text> |  | ||||||
|                             <xsl:value-of select="$nextCompareWith"/> |  | ||||||
|                             <xsl:text>&refreshPeriod=</xsl:text> |  | ||||||
|                             <xsl:value-of select="$refreshPeriod"/> |  | ||||||
|                             <xsl:text>&sudo=</xsl:text> |  | ||||||
|                             <xsl:value-of select="$sudo"/> |  | ||||||
|                         </xsl:attribute> |  | ||||||
|                     </meta> |  | ||||||
|                 </xsl:if> |  | ||||||
|                 <title> |  | ||||||
|                     <xsl:text>lanScan - </xsl:text> |  | ||||||
|                     <xsl:value-of select="$targets"/> |  | ||||||
|                 </title> |  | ||||||
|                 <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/se/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/cr-2.0.4/fc-5.0.3/fh-4.0.1/r-3.0.3/datatables.min.css" rel="stylesheet"/> |  | ||||||
|                 <link href="{$basedir}/style.css" rel="stylesheet" type="text/css"/> |  | ||||||
|                 <style> |  | ||||||
|                     .ui.icon.buttons .mini.button { |  | ||||||
|                         padding: 0.5em; |  | ||||||
|                     } |  | ||||||
|                      |  | ||||||
|                     .action { |  | ||||||
|                         overflow-x: scroll; |  | ||||||
|                     } |  | ||||||
|                      |  | ||||||
|                     .ui.ui.ui.ui[class*="left icon"]:not(.corner).input > input{ |  | ||||||
|                         min-width: 10em; |  | ||||||
|                         padding-right: .1em; |  | ||||||
|                     }                     |  | ||||||
|                 </style> |  | ||||||
|                 <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> |  | ||||||
|                 <script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify"></script> |  | ||||||
|                 <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.min.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/se/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/cr-2.0.4/fc-5.0.3/fh-4.0.1/r-3.0.3/datatables.min.js"></script> |  | ||||||
|             </head> |  | ||||||
|  |  | ||||||
|             <body> |             <body> | ||||||
|                 <nav class="ui inverted teal fixed menu"> |                 <nav class="ui inverted teal fixed menu"> | ||||||
| @ -164,10 +117,6 @@ table.order([1, 'asc']).draw() | |||||||
|  |  | ||||||
| $('.ui.dropdown').dropdown() | $('.ui.dropdown').dropdown() | ||||||
|  |  | ||||||
| <xsl:apply-templates select="runstats"> |  | ||||||
|     <xsl:with-param name="init" select="$init"/> |  | ||||||
| </xsl:apply-templates> |  | ||||||
|  |  | ||||||
| hiddenButton.onclick = function(event) { | hiddenButton.onclick = function(event) { | ||||||
|     if (lanScanForm.checkValidity()) { |     if (lanScanForm.checkValidity()) { | ||||||
|         targetsInputDiv.classList.add('loading') |         targetsInputDiv.classList.add('loading') | ||||||
| @ -208,6 +157,10 @@ function hostScanning(link) { | |||||||
|     }) |     }) | ||||||
| } | } | ||||||
|                 </script> |                 </script> | ||||||
|  |  | ||||||
|  |                 <xsl:apply-templates select="runstats"> | ||||||
|  |                     <xsl:with-param name="init" select="$init"/> | ||||||
|  |                 </xsl:apply-templates> | ||||||
|             </body> |             </body> | ||||||
|         </html> |         </html> | ||||||
|     </xsl:template> |     </xsl:template> | ||||||
| @ -229,7 +182,7 @@ function hostScanning(link) { | |||||||
|         <div class="column"> |         <div class="column"> | ||||||
|             <div> |             <div> | ||||||
|                 <xsl:attribute name="class"> |                 <xsl:attribute name="class"> | ||||||
|                     <xsl:text>ui fluid mini left icon input </xsl:text> |                     <xsl:text>ui fluid mini left icon compact input </xsl:text> | ||||||
|                     <xsl:if test="$currentHost/ports/port | $initHost/ports/port[not(@portid=$currentHost/ports/port/@portid)][not(state/@state='closed')]"> |                     <xsl:if test="$currentHost/ports/port | $initHost/ports/port[not(@portid=$currentHost/ports/port/@portid)][not(state/@state='closed')]"> | ||||||
|                         <xsl:text>action buttons </xsl:text> |                         <xsl:text>action buttons </xsl:text> | ||||||
|                     </xsl:if> |                     </xsl:if> | ||||||
|  | |||||||
| @ -4,6 +4,7 @@ | |||||||
|     xmlns:xs="http://www.w3.org/2001/XMLSchema" |     xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||||||
|     version="1.1"> |     version="1.1"> | ||||||
|  |  | ||||||
|  |     <xsl:import href="lib/head.xsl"/> | ||||||
|     <xsl:import href="lib/parseCommand.xsl"/> |     <xsl:import href="lib/parseCommand.xsl"/> | ||||||
|     <xsl:import href="lib/serviceLabel.xsl"/> |     <xsl:import href="lib/serviceLabel.xsl"/> | ||||||
|     <xsl:import href="lib/toast.xsl"/> |     <xsl:import href="lib/toast.xsl"/> | ||||||
| @ -33,47 +34,13 @@ | |||||||
|         <xsl:variable name="targets" select="substring-after(@args, '.xml ')"/> |         <xsl:variable name="targets" select="substring-after(@args, '.xml ')"/> | ||||||
|          |          | ||||||
|         <html lang="fr"> |         <html lang="fr"> | ||||||
|             <head> |             <xsl:apply-templates select="." mode="head"> | ||||||
|                 <meta charset="utf-8"/> |                 <xsl:with-param name="basedir" select="$basedir"/> | ||||||
|                 <xsl:if test="$refreshPeriod > 0"> |                 <xsl:with-param name="targets" select="$targets"/> | ||||||
|                     <meta http-equiv="refresh"> |                 <xsl:with-param name="nextCompareWith" select="$nextCompareWith"/> | ||||||
|                         <xsl:attribute name="content"> |                 <xsl:with-param name="refreshPeriod" select="$refreshPeriod"/> | ||||||
|                             <xsl:value-of select="$refreshPeriod"/> |                 <xsl:with-param name="sudo" select="$sudo"/> | ||||||
|                             <xsl:text>;URL=</xsl:text> |             </xsl:apply-templates> | ||||||
|                             <xsl:value-of select="$basedir"/> |  | ||||||
|                             <xsl:text>/scan.php?targets=</xsl:text> |  | ||||||
|                             <xsl:value-of select="$targets"/> |  | ||||||
|                             <xsl:text>&</xsl:text> |  | ||||||
|                             <xsl:call-template name="parseCommand"> |  | ||||||
|                                 <xsl:with-param name="argList" select="substring-before(substring-after(@args, ' -'), ' -oX')"/> |  | ||||||
|                                 <xsl:with-param name="asURL" select="true()"/> |  | ||||||
|                             </xsl:call-template> |  | ||||||
|                             <xsl:text>compareWith=</xsl:text> |  | ||||||
|                             <xsl:value-of select="$nextCompareWith"/> |  | ||||||
|                             <xsl:text>&refreshPeriod=</xsl:text> |  | ||||||
|                             <xsl:value-of select="$refreshPeriod"/> |  | ||||||
|                             <xsl:text>&sudo=</xsl:text> |  | ||||||
|                             <xsl:value-of select="$sudo"/> |  | ||||||
|                         </xsl:attribute> |  | ||||||
|                     </meta> |  | ||||||
|                 </xsl:if> |  | ||||||
|                 <title> |  | ||||||
|                     <xsl:text>lanScan - </xsl:text> |  | ||||||
|                     <xsl:value-of select="$targets"/> |  | ||||||
|                 </title> |  | ||||||
|                 <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/se/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/cr-2.0.4/fc-5.0.3/fh-4.0.1/r-3.0.3/datatables.min.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> |  | ||||||
|                 <script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify"></script> |  | ||||||
|                 <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.min.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/se/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/cr-2.0.4/fc-5.0.3/fh-4.0.1/r-3.0.3/datatables.min.js"></script> |  | ||||||
|             </head> |  | ||||||
|  |  | ||||||
|             <body> |             <body> | ||||||
|                 <nav class="ui inverted teal fixed menu"> |                 <nav class="ui inverted teal fixed menu"> | ||||||
| @ -163,10 +130,6 @@ table.order([1, 'asc']).draw() | |||||||
|  |  | ||||||
| $('.ui.dropdown').dropdown() | $('.ui.dropdown').dropdown() | ||||||
|  |  | ||||||
| <xsl:apply-templates select="runstats"> |  | ||||||
|     <xsl:with-param name="init" select="$init"/> |  | ||||||
| </xsl:apply-templates> |  | ||||||
|  |  | ||||||
| hiddenButton.onclick = function(event) { | hiddenButton.onclick = function(event) { | ||||||
|     if (lanScanForm.checkValidity()) { |     if (lanScanForm.checkValidity()) { | ||||||
|         targetsInputDiv.classList.add('loading') |         targetsInputDiv.classList.add('loading') | ||||||
| @ -207,6 +170,10 @@ function hostScanning(link) { | |||||||
|     }) |     }) | ||||||
| } | } | ||||||
|                 </script> |                 </script> | ||||||
|  |  | ||||||
|  |                 <xsl:apply-templates select="runstats"> | ||||||
|  |                     <xsl:with-param name="init" select="$init"/> | ||||||
|  |                 </xsl:apply-templates> | ||||||
|             </body> |             </body> | ||||||
|         </html> |         </html> | ||||||
|     </xsl:template> |     </xsl:template> | ||||||
|  | |||||||
							
								
								
									
										56
									
								
								templates/lib/head.xsl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								templates/lib/head.xsl
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,56 @@ | |||||||
|  | <?xml version="1.0" encoding="utf-8"?> | ||||||
|  | <xsl:stylesheet | ||||||
|  |     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||||||
|  |     xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||||||
|  |     version="1.1"> | ||||||
|  |  | ||||||
|  |     <xsl:template match="nmaprun" mode="head"> | ||||||
|  |         <xsl:param name="basedir"/> | ||||||
|  |         <xsl:param name="targets"/> | ||||||
|  |         <xsl:param name="nextCompareWith"/> | ||||||
|  |         <xsl:param name="refreshPeriod"/> | ||||||
|  |         <xsl:param name="sudo"/> | ||||||
|  |  | ||||||
|  |         <head> | ||||||
|  |             <meta charset="utf-8"/> | ||||||
|  |             <xsl:if test="$refreshPeriod > 0"> | ||||||
|  |                 <meta http-equiv="refresh"> | ||||||
|  |                     <xsl:attribute name="content"> | ||||||
|  |                         <xsl:value-of select="$refreshPeriod"/> | ||||||
|  |                         <xsl:text>;URL=</xsl:text> | ||||||
|  |                         <xsl:value-of select="$basedir"/> | ||||||
|  |                         <xsl:text>/scan.php?targets=</xsl:text> | ||||||
|  |                         <xsl:value-of select="$targets"/> | ||||||
|  |                         <xsl:text>&</xsl:text> | ||||||
|  |                         <xsl:call-template name="parseCommand"> | ||||||
|  |                             <xsl:with-param name="argList" select="substring-before(substring-after(@args, ' -'), ' -oX')"/> | ||||||
|  |                             <xsl:with-param name="asURL" select="true()"/> | ||||||
|  |                         </xsl:call-template> | ||||||
|  |                         <xsl:text>compareWith=</xsl:text> | ||||||
|  |                         <xsl:value-of select="$nextCompareWith"/> | ||||||
|  |                         <xsl:text>&refreshPeriod=</xsl:text> | ||||||
|  |                         <xsl:value-of select="$refreshPeriod"/> | ||||||
|  |                         <xsl:text>&sudo=</xsl:text> | ||||||
|  |                         <xsl:value-of select="$sudo"/> | ||||||
|  |                     </xsl:attribute> | ||||||
|  |                 </meta> | ||||||
|  |             </xsl:if> | ||||||
|  |             <title> | ||||||
|  |                 <xsl:text>lanScan - </xsl:text> | ||||||
|  |                 <xsl:value-of select="$targets"/> | ||||||
|  |             </title> | ||||||
|  |             <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/se/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/cr-2.0.4/fc-5.0.3/fh-4.0.1/r-3.0.3/datatables.min.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> | ||||||
|  |             <script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify"></script> | ||||||
|  |             <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.min.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/se/jszip-3.10.1/dt-2.1.8/b-3.1.2/b-html5-3.1.2/b-print-3.1.2/cr-2.0.4/fc-5.0.3/fh-4.0.1/r-3.0.3/datatables.min.js"></script> | ||||||
|  |         </head> | ||||||
|  |     </xsl:template> | ||||||
|  | </xsl:stylesheet> | ||||||
| @ -6,6 +6,7 @@ | |||||||
|  |  | ||||||
|     <xsl:template match="runstats"> |     <xsl:template match="runstats"> | ||||||
|         <xsl:param name="init"/> |         <xsl:param name="init"/> | ||||||
|  |         <script> | ||||||
|             <xsl:if test="finished/@summary"> |             <xsl:if test="finished/@summary"> | ||||||
| $.toast({ | $.toast({ | ||||||
|     title      : '<xsl:value-of select="finished/@exit"/>', |     title      : '<xsl:value-of select="finished/@exit"/>', | ||||||
| @ -37,6 +38,7 @@ $.toast({ | |||||||
|     position   : 'bottom right', |     position   : 'bottom right', | ||||||
| }) | }) | ||||||
|             </xsl:if> |             </xsl:if> | ||||||
|  |         </script> | ||||||
|     </xsl:template> |     </xsl:template> | ||||||
|  |  | ||||||
| </xsl:stylesheet> | </xsl:stylesheet> | ||||||
| @ -4,6 +4,7 @@ | |||||||
|     xmlns:xs="http://www.w3.org/2001/XMLSchema" |     xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||||||
|     version="1.1"> |     version="1.1"> | ||||||
|  |  | ||||||
|  |     <xsl:import href="lib/head.xsl"/> | ||||||
|     <xsl:import href="lib/parseCommand.xsl"/>  |     <xsl:import href="lib/parseCommand.xsl"/>  | ||||||
|     <xsl:import href="lib/toast.xsl"/> |     <xsl:import href="lib/toast.xsl"/> | ||||||
|  |  | ||||||
| @ -32,47 +33,13 @@ | |||||||
|         <xsl:variable name="targets" select="substring-after(@args, '.xml ')"/> |         <xsl:variable name="targets" select="substring-after(@args, '.xml ')"/> | ||||||
|          |          | ||||||
|         <html lang="fr"> |         <html lang="fr"> | ||||||
|             <head> |             <xsl:apply-templates select="." mode="head"> | ||||||
|                 <meta charset="utf-8"/> |                 <xsl:with-param name="basedir" select="$basedir"/> | ||||||
|                 <xsl:if test="$refreshPeriod > 0"> |                 <xsl:with-param name="targets" select="$targets"/> | ||||||
|                     <meta http-equiv="refresh"> |                 <xsl:with-param name="nextCompareWith" select="$nextCompareWith"/> | ||||||
|                         <xsl:attribute name="content"> |                 <xsl:with-param name="refreshPeriod" select="$refreshPeriod"/> | ||||||
|                             <xsl:value-of select="$refreshPeriod"/> |                 <xsl:with-param name="sudo" select="$sudo"/> | ||||||
|                             <xsl:text>;URL=</xsl:text> |             </xsl:apply-templates> | ||||||
|                             <xsl:value-of select="$basedir"/> |  | ||||||
|                             <xsl:text>/scan.php?targets=</xsl:text> |  | ||||||
|                             <xsl:value-of select="$targets"/> |  | ||||||
|                             <xsl:text>&</xsl:text> |  | ||||||
|                             <xsl:call-template name="parseCommand"> |  | ||||||
|                                 <xsl:with-param name="argList" select="substring-before(substring-after(@args, ' -'), ' -oX')"/> |  | ||||||
|                                 <xsl:with-param name="asURL" select="true()"/> |  | ||||||
|                             </xsl:call-template> |  | ||||||
|                             <xsl:text>compareWith=</xsl:text> |  | ||||||
|                             <xsl:value-of select="$nextCompareWith"/> |  | ||||||
|                             <xsl:text>&refreshPeriod=</xsl:text> |  | ||||||
|                             <xsl:value-of select="$refreshPeriod"/> |  | ||||||
|                             <xsl:text>&sudo=</xsl:text> |  | ||||||
|                             <xsl:value-of select="$sudo"/> |  | ||||||
|                         </xsl:attribute> |  | ||||||
|                     </meta> |  | ||||||
|                 </xsl:if> |  | ||||||
|                 <title> |  | ||||||
|                     <xsl:text>lanScan - </xsl:text> |  | ||||||
|                     <xsl:value-of select="$targets"/> |  | ||||||
|                 </title> |  | ||||||
|                 <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/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> |  | ||||||
|                 <script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify"></script> |  | ||||||
|                 <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/cr-2.0.4/datatables.js"></script> |  | ||||||
|             </head> |  | ||||||
|  |  | ||||||
|             <body> |             <body> | ||||||
|                 <nav class="ui inverted teal fixed menu"> |                 <nav class="ui inverted teal fixed menu"> | ||||||
| @ -146,10 +113,6 @@ table.order([1, 'asc']).draw() | |||||||
|  |  | ||||||
| $('.ui.dropdown').dropdown() | $('.ui.dropdown').dropdown() | ||||||
|  |  | ||||||
| <xsl:apply-templates select="runstats"> |  | ||||||
|     <xsl:with-param name="init" select="$init"/> |  | ||||||
| </xsl:apply-templates> |  | ||||||
|  |  | ||||||
| hiddenButton.onclick = function(event) { | hiddenButton.onclick = function(event) { | ||||||
|     if (lanScanForm.checkValidity()) { |     if (lanScanForm.checkValidity()) { | ||||||
|         targetsInputDiv.classList.add('loading') |         targetsInputDiv.classList.add('loading') | ||||||
| @ -190,6 +153,10 @@ function hostScanning(link) { | |||||||
|     }) |     }) | ||||||
| } | } | ||||||
|                 </script> |                 </script> | ||||||
|  |  | ||||||
|  |                 <xsl:apply-templates select="runstats"> | ||||||
|  |                     <xsl:with-param name="init" select="$init"/> | ||||||
|  |                 </xsl:apply-templates> | ||||||
|             </body> |             </body> | ||||||
|         </html> |         </html> | ||||||
|     </xsl:template> |     </xsl:template> | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user