public
Description: Ronin is a Ruby platform for exploit development and security research. Ronin allows for the rapid development and distribution of code, exploits or payloads over many common Source-Code-Management (SCM) systems.
Homepage: http://ronin.rubyforge.org/
Clone URL: git://github.com/postmodern/ronin.git
ronin / static / ronin / platform / overlay.xsl
100644 204 lines (165 sloc) 6.123 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" version="1.0" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" indent="yes" />
 
  <xsl:template match="/ronin-overlay">
    <html>
      <head>
        <title>Ronin Overlay :: <xsl:value-of select="title/." /></title>
        <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
        <style type="text/css">
          html {
            height: 100%;
          }
 
          body {
            height: 100%;
            margin: 0;
            padding: 0;
            font-family: sans-serif;
            font-size: 1.0em;
            background: url(http://ronin.rubyforge.org/images/diamond.png) repeat top left;
            over-flow: auto;
          }
 
          img {
            border: none;
          }
 
          #content {
            margin: 1em 10em 1em 10em;
            padding: 1em 1em 1em 1em;
            border: 20px solid black;
            background-color: white;
          }
 
          #content a {
            color: black;
            font-weight: bold;
            text-decoration: none;
          }
 
          #content pre.shell {
            margin: 0.5em 0 0.5em 0;
            padding: 0.5em;
            color: white;
            background-color: black;
            white-space: pre;
            over-flow: auto;
          }
 
          #content a:hover {
            color: #BD0000;
          }
        </style>
        <style type="text/css" media="print">
          #content {
            border: none;
          }
 
          #content a {
            font-weight: normal;
          }
        </style>
      </head>
 
      <body>
        <div id="page">
          <div id="banner">
            <a href="http://ronin.rubyforge.org/">
              <img id="logo" src="http://ronin.rubyforge.org/images/logo.png" />
            </a>
          </div>
 
          <div id="content">
            <h2><xsl:value-of select="title/." /></h2>
            <xsl:apply-templates select="description" />
 
            <xsl:apply-templates select="dependencies" />
 
            <xsl:apply-templates select="source" />
 
            <xsl:apply-templates select="maintainers" />
 
            <xsl:apply-templates select="license" />
          </div>
        </div>
      </body>
    </html>
  </xsl:template>
 
  <xsl:template match="/ronin-overlay/description">
    <p><xsl:value-of select="." /></p>
 
    <xsl:if test="@href">
      <p>
        <a>
          <xsl:attribute name="href"><xsl:value-of select="@href" /></xsl:attribute>
          [ Continued ]
        </a>
      </p>
    </xsl:if>
  </xsl:template>
 
  <xsl:template match="/ronin-overlay/dependencies">
    <h2>Dependencies</h2>
 
    <p>Before installing this Overlay you will need to install some other things first.</p>
    <xsl:if test="gem">
      <pre class="shell">$ <xsl:for-each select="gem"> <xsl:value-of select="." /></xsl:for-each></pre>
    </xsl:if>
  </xsl:template>
 
  <xsl:template match="/ronin-overlay/source">
    <h2>Install</h2>
 
    <p>To install this Overlay, simply run the following command:</p>
    <pre class="shell">$ ronin install <xsl:value-of select="." /></pre>
  </xsl:template>
 
  <xsl:template match="/ronin-overlay/maintainers">
    <h2>Maintainers</h2>
 
    <ul>
      <xsl:apply-templates select="maintainer" />
    </ul>
  </xsl:template>
 
  <xsl:template match="/ronin-overlay/maintainers/maintainer">
    <li>
      <xsl:choose>
        <xsl:when test="email">
          <a>
            <xsl:attribute name="href">mailto:<xsl:value-of select="email/." /></xsl:attribute>
            <xsl:value-of select="name/." />
          </a>
        </xsl:when>
 
        <xsl:otherwise>
          <xsl:value-of select="name/." />
        </xsl:otherwise>
      </xsl:choose>
    </li>
  </xsl:template>
 
  <xsl:template match="/ronin-overlay/license">
    <h2>License</h2>
 
    <p>
      This Overlay is licensed under the
      <a>
        <xsl:attribute name="target">blank</xsl:attribute>
 
        <xsl:choose>
          <xsl:when test="@href">
            <xsl:attribute name="href"><xsl:value-of select="@href" /></xsl:attribute>
          </xsl:when>
 
          <xsl:when test=". = 'GPL-2'">
            <xsl:attribute name="href">http://www.gnu.org/licenses/gpl-2.0.html</xsl:attribute>
          </xsl:when>
 
          <xsl:when test=". = 'GPL-3'">
            <xsl:attribute name="href">http://www.gnu.org/licenses/gpl-3.0.html</xsl:attribute>
          </xsl:when>
 
          <xsl:when test=". = 'BSD'">
            <xsl:attribute name="href">http://www.opensource.org/licenses/bsd-license.php</xsl:attribute>
          </xsl:when>
 
          <xsl:when test=". = 'MIT'">
            <xsl:attribute name="href">http://www.opensource.org/licenses/mit-license.html</xsl:attribute>
          </xsl:when>
 
          <xsl:when test=". = 'CC-by'">
            <xsl:attribute name="href">http://creativecommons.org/licenses/by/3.0/</xsl:attribute>
          </xsl:when>
 
          <xsl:when test=". = 'CC-by-nd'">
            <xsl:attribute name="href">http://creativecommons.org/licenses/by-nd/3.0/</xsl:attribute>
          </xsl:when>
 
          <xsl:when test=". = 'CC-by-nc-nd'">
            <xsl:attribute name="href">http://creativecommons.org/licenses/by-nc-nd/3.0/</xsl:attribute>
          </xsl:when>
 
          <xsl:when test=". = 'CC-by-nc'">
            <xsl:attribute name="href">http://creativecommons.org/licenses/by-nc/3.0/</xsl:attribute>
          </xsl:when>
 
          <xsl:when test=". = 'CC-by-nc-sa'">
            <xsl:attribute name="href">http://creativecommons.org/licenses/by-nc-sa/3.0/</xsl:attribute>
          </xsl:when>
 
          <xsl:when test=". = 'CC-sa'">
            <xsl:attribute name="href">http://creativecommons.org/licenses/sa/3.0/</xsl:attribute>
          </xsl:when>
        </xsl:choose>
 
        <xsl:value-of select="." />
      </a> license.
    </p>
  </xsl:template>
</xsl:stylesheet>