1
+ <?xml version =" 1.0" encoding =" ISO-8859-1" ?>
2
+ <xsl : stylesheet version =" 1.0"
3
+ xmlns:xsl=" http://www.w3.org/1999/XSL/Transform" >
4
+
5
+ <xsl : template match =" log" >
6
+ <html >
7
+ <head >
8
+ <title >knight scan report</title >
9
+ <style >
10
+ *{padding:0;margin:0;}
11
+ body,html{background:#fff;font:9pt Verdana, Helvetica, sans-serif;}
12
+ #container{text-align:left;margin: 10px auto;width: 90%;}
13
+ h1{padding:5px;font-size:1.5em;color:#fff;background:#2A0D45;}
14
+ h2{padding:5px;font-size:1.2em;color:#000;background:#F0F8FF;}
15
+ p{padding:10px;}table{margin-bottom:20px;width:100%;}td{vertical-align:top;}
16
+ .toplink{color:#ff5a00;text-decoration:none;float:right;}
17
+ .target{background:#eee;border:1px solid #F0F8FF;}
18
+ #top{background:#fff;padding:5px;position:fixed;bottom:0px;right:0px;}
19
+ a{color:#000;}a:hover{color:#000;}a:visited{color:#000;}
20
+ </style >
21
+ </head >
22
+ <body >
23
+
24
+ <!-- Container & Heading -->
25
+ <div id =" container" >
26
+ <h1 >knight scan report</h1 >
27
+ <table >
28
+ <tr height =" 20px" ><td ></td ></tr >
29
+
30
+ <!-- Summary -->
31
+ <tr ><td ></td ></tr >
32
+ <tr ><td colspan =" 2" ><strong ><h2 >Scan Summary</h2 ></strong ></td ></tr >
33
+ <tr height =" 20px" ><td ></td ></tr >
34
+ <tr ><td colspan =" 2" ><xsl : value-of select =" count(target)" /> URLs scanned. Select a URL to view detailed results.</td ></tr >
35
+ <tr height =" 20px" ><td ></td ></tr >
36
+
37
+ <!-- Table of contents / List of URLs -->
38
+ <tr class =" target" ><td >URL (<xsl : value-of select =" count(target)" />)</td ><td >Matches (<xsl : value-of select =" count(target/plugin)" />)</td ></tr >
39
+ <xsl : for-each select =" target" >
40
+ <xsl : sort order =" ascending" />
41
+ <xsl : choose >
42
+ <xsl : when test =" position() mod 2 = 0" >
43
+ <tr bgcolor =" #bbddbb" ><td ><a href =" #{uri}" ><xsl : value-of select =" uri" /></a ></td ><td ><xsl : for-each select =" plugin" ><xsl : value-of select =" name" /><xsl : if test =" position()!=last()" >, </xsl : if ></xsl : for-each ></td ></tr >
44
+ </xsl : when >
45
+ <xsl : otherwise >
46
+ <tr bgcolor =" #ccffcc" ><td ><a href =" #{uri}" ><xsl : value-of select =" uri" /></a ></td ><td ><xsl : for-each select =" plugin" ><xsl : value-of select =" name" /><xsl : if test =" position()!=last()" >, </xsl : if ></xsl : for-each ></td ></tr >
47
+ </xsl : otherwise >
48
+ </xsl : choose >
49
+ </xsl : for-each >
50
+ <tr height =" 20px" ><td ></td ></tr >
51
+
52
+ <!-- Detailed results -->
53
+ <tr ><td colspan =" 2" ><strong ><h2 >Scan Results</h2 ></strong ></td ></tr >
54
+ <tr height =" 20px" ><td ></td ></tr >
55
+ <xsl : for-each select =" target" >
56
+ <xsl : sort order =" ascending" />
57
+ <tr ><td colspan =" 2" class =" target" ><strong ><a name =" {uri}" ><xsl : value-of select =" uri" /></a ></strong > [<xsl : value-of select =" http-status" />]</td ></tr >
58
+ <xsl : for-each select =" plugin" >
59
+ <xsl : choose >
60
+ <xsl : when test =" position() mod 2 = 0" >
61
+ <tr bgcolor =" #ccffcc" ><td ><em ><xsl : if test =" certainty > 0 and certainty < 50" >(Maybe) </xsl : if ><xsl : if test =" certainty > 49 and certainty < 100" >(Probably) </xsl : if ><xsl : value-of select =" name" /></em ></td ><td bgcolor =" #ccffcc" >
62
+ <xsl : if test =" certainty" ><tr bgcolor =" #ccffcc" ><td >Certainty: <xsl : value-of select =" certainty" />%</td ></tr ></xsl : if >
63
+ <xsl : if test =" string" ><tr bgcolor =" #ccffcc" ><td ><xsl : value-of select =" string" /></td ></tr ></xsl : if >
64
+ <xsl : if test =" os" ><tr bgcolor =" #ccffcc" ><td >Operating System: <xsl : value-of select =" os" /></td ></tr ></xsl : if >
65
+ <xsl : if test =" version" ><tr bgcolor =" #ccffcc" ><td >Version: <xsl : value-of select =" version" /></td ></tr ></xsl : if >
66
+ <xsl : if test =" model" ><tr bgcolor =" #ccffcc" ><td >Model: <xsl : value-of select =" model" /></td ></tr ></xsl : if >
67
+ <xsl : if test =" firmware" ><tr bgcolor =" #ccffcc" ><td >Firmware: <xsl : value-of select =" firmware" /></td ></tr ></xsl : if >
68
+ <xsl : if test =" filepath" ><tr bgcolor =" #ccffcc" ><td >Filepath: <xsl : value-of select =" filepath" /></td ></tr ></xsl : if >
69
+ <xsl : if test =" account" ><tr bgcolor =" #ccffcc" ><td >Account: <xsl : value-of select =" account" /></td ></tr ></xsl : if >
70
+ <xsl : if test =" module" ><tr bgcolor =" #ccffcc" ><td >Module: <xsl : value-of select =" module" /></td ></tr ></xsl : if >
71
+ </td ></tr >
72
+ </xsl : when >
73
+ <xsl : otherwise >
74
+ <tr bgcolor =" #bbddbb" ><td ><em ><xsl : if test =" certainty > 0 and certainty < 50" >(Maybe) </xsl : if ><xsl : if test =" certainty > 49 and certainty < 100" >(Probably) </xsl : if ><xsl : value-of select =" name" /></em ></td ><td bgcolor =" #bbddbb" >
75
+ <xsl : if test =" certainty" ><tr bgcolor =" #bbddbb" ><td >Certainty: <xsl : value-of select =" certainty" />%</td ></tr ></xsl : if >
76
+ <xsl : if test =" string" ><tr bgcolor =" #bbddbb" ><td ><xsl : value-of select =" string" /></td ></tr ></xsl : if >
77
+ <xsl : if test =" os" ><tr bgcolor =" #bbddbb" ><td >Operating System: <xsl : value-of select =" os" /></td ></tr ></xsl : if >
78
+ <xsl : if test =" version" ><tr bgcolor =" #bbddbb" ><td >Version: <xsl : value-of select =" version" /></td ></tr ></xsl : if >
79
+ <xsl : if test =" model" ><tr bgcolor =" #bbddbb" ><td >Model: <xsl : value-of select =" model" /></td ></tr ></xsl : if >
80
+ <xsl : if test =" firmware" ><tr bgcolor =" #bbddbb" ><td >Firmware: <xsl : value-of select =" firmware" /></td ></tr ></xsl : if >
81
+ <xsl : if test =" filepath" ><tr bgcolor =" #bbddbb" ><td >Filepath: <xsl : value-of select =" filepath" /></td ></tr ></xsl : if >
82
+ <xsl : if test =" account" ><tr bgcolor =" #bbddbb" ><td >Account: <xsl : value-of select =" account" /></td ></tr ></xsl : if >
83
+ <xsl : if test =" module" ><tr bgcolor =" #bbddbb" ><td >Module: <xsl : value-of select =" module" /></td ></tr ></xsl : if >
84
+ </td ></tr >
85
+ </xsl : otherwise >
86
+ </xsl : choose >
87
+ </xsl : for-each >
88
+ <tr ><td ></td ><td ><a class =" toplink" href =" #" title =" Return to top" >^</a ></td ></tr >
89
+ </xsl : for-each >
90
+ </table >
91
+
92
+ </div ><div id =" top" ><a class =" toplink" href =" #" title =" Return to top" >Return to top</a ></div >
93
+
94
+ </body >
95
+ </html >
96
+ </xsl : template >
97
+
98
+ </xsl : stylesheet >
0 commit comments