nasldoc 0.1.1 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/Gemfile +5 -0
- data/Gemfile.ci +5 -0
- data/Gemfile.lock +17 -0
- data/LICENSE +1 -1
- data/NEWS.markdown +16 -1
- data/Rakefile +19 -19
- data/TODO.markdown +6 -8
- data/bin/nasldoc +20 -19
- data/lib/nasldoc.rb +21 -20
- data/lib/nasldoc/cli.rb +19 -19
- data/lib/nasldoc/cli/application.rb +43 -21
- data/lib/nasldoc/cli/application.rb.orig +290 -0
- data/lib/nasldoc/cli/application.rb.rej +16 -0
- data/lib/nasldoc/cli/comment.rb +19 -19
- data/lib/nasldoc/templates/file.erb +8 -6
- data/lib/nasldoc/templates/index.erb +1 -1
- data/nasldoc.gemspec +25 -22
- metadata +68 -22
- data/lib/nasldoc/templates/old/file.erb +0 -332
- data/lib/nasldoc/templates/old/xfile.erb +0 -267
- data/lib/nasldoc/templates/old/xindex.erb +0 -16
- data/lib/nasldoc/templates/old/xoverview.erb +0 -26
- data/lib/nasldoc/templates/old/xsidebar.erb +0 -21
- data/lib/nasldoc/templates/xindex.erb +0 -16
@@ -0,0 +1,16 @@
|
|
1
|
+
--- application.rb
|
2
|
+
+++ application.rb
|
3
|
+
@@ -98,7 +98,12 @@ module NaslDoc
|
4
|
+
contents = File.open(path, "rb") { |f| f.read }
|
5
|
+
|
6
|
+
# Parse the input file.
|
7
|
+
- tree = Nasl::Parser.new.parse(contents, path)
|
8
|
+
+ begin
|
9
|
+
+ tree = Nasl::Parser.new.parse(contents, path)
|
10
|
+
+ rescue Nasl::ParseException, Nasl::TokenException
|
11
|
+
+ puts "[!!!] File '#{path}' couldn't be parsed. It should be added to the blacklist."
|
12
|
+
+ return nil
|
13
|
+
+ end
|
14
|
+
|
15
|
+
# Collect the functions.
|
16
|
+
@functions = Hash.new()
|
data/lib/nasldoc/cli/comment.rb
CHANGED
@@ -1,28 +1,28 @@
|
|
1
|
-
|
1
|
+
################################################################################
|
2
|
+
# Copyright (c) 2011-2014, Tenable Network Security
|
2
3
|
# All rights reserved.
|
3
4
|
#
|
4
5
|
# Redistribution and use in source and binary forms, with or without
|
5
6
|
# modification, are permitted provided that the following conditions are met:
|
6
7
|
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
# * Redistributions in binary form must reproduce the above copyright
|
10
|
-
# notice, this list of conditions and the following disclaimer in the
|
11
|
-
# documentation and/or other materials provided with the distribution.
|
12
|
-
# * Neither the name of the Tenable Network Security nor the names of its contributors
|
13
|
-
# may be used to endorse or promote products derived from this software
|
14
|
-
# without specific prior written permission.
|
8
|
+
# 1. Redistributions of source code must retain the above copyright notice, this
|
9
|
+
# list of conditions and the following disclaimer.
|
15
10
|
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
11
|
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
12
|
+
# this list of conditions and the following disclaimer in the documentation
|
13
|
+
# and/or other materials provided with the distribution.
|
14
|
+
#
|
15
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
16
|
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
17
|
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
18
|
+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
19
|
+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
20
|
+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
21
|
+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
22
|
+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
23
|
+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
24
|
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
25
|
+
################################################################################
|
26
26
|
|
27
27
|
module NaslDoc
|
28
28
|
module CLI
|
@@ -314,10 +314,11 @@
|
|
314
314
|
<% unless @functions[name].nil? || @functions[name].empty? %>
|
315
315
|
<h3>Named Parameters</h3>
|
316
316
|
<dl>
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
317
|
+
|
318
|
+
<% @functions[name][:params].sort.each do |param| %>
|
319
|
+
<dt><%= param.name %></dt>
|
320
|
+
<% unless comm.nil? || !comm.params.has_key?(param.name) %>
|
321
|
+
<dd><%= comm.params[param.name] %></dd>
|
321
322
|
<% end %>
|
322
323
|
<% end %>
|
323
324
|
</dl>
|
@@ -329,8 +330,9 @@
|
|
329
330
|
<% end %>
|
330
331
|
|
331
332
|
<h3>Code</h3>
|
333
|
+
<!-- The contents must not have indentation, else formatting is off. -->
|
332
334
|
<pre class="brush: nasl">
|
333
|
-
|
335
|
+
<%= CGI::escapeHTML(@functions[name][:code]) %>
|
334
336
|
</pre>
|
335
337
|
<a href="#top">top</a>
|
336
338
|
<hr>
|
@@ -344,7 +346,7 @@
|
|
344
346
|
<hr>
|
345
347
|
|
346
348
|
<footer>
|
347
|
-
<p>© Tenable Network Security
|
349
|
+
<p>© Tenable Network Security 2014</p>
|
348
350
|
</footer>
|
349
351
|
|
350
352
|
</div><!--/.fluid-container-->
|
data/nasldoc.gemspec
CHANGED
@@ -1,28 +1,28 @@
|
|
1
|
-
|
1
|
+
################################################################################
|
2
|
+
# Copyright (c) 2011-2014, Tenable Network Security
|
2
3
|
# All rights reserved.
|
3
4
|
#
|
4
5
|
# Redistribution and use in source and binary forms, with or without
|
5
6
|
# modification, are permitted provided that the following conditions are met:
|
6
7
|
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
# * Redistributions in binary form must reproduce the above copyright
|
10
|
-
# notice, this list of conditions and the following disclaimer in the
|
11
|
-
# documentation and/or other materials provided with the distribution.
|
12
|
-
# * Neither the name of the Tenable Network Security nor the names of its contributors
|
13
|
-
# may be used to endorse or promote products derived from this software
|
14
|
-
# without specific prior written permission.
|
8
|
+
# 1. Redistributions of source code must retain the above copyright notice, this
|
9
|
+
# list of conditions and the following disclaimer.
|
15
10
|
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
11
|
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
12
|
+
# this list of conditions and the following disclaimer in the documentation
|
13
|
+
# and/or other materials provided with the distribution.
|
14
|
+
#
|
15
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
16
|
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
17
|
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
18
|
+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
19
|
+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
20
|
+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
21
|
+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
22
|
+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
23
|
+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
24
|
+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
25
|
+
################################################################################
|
26
26
|
|
27
27
|
$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
|
28
28
|
|
@@ -37,8 +37,8 @@ Gem::Specification.new do |s|
|
|
37
37
|
s.description = "#{NaslDoc::APP_NAME} is a NASL documentation generator"
|
38
38
|
s.license = "BSD"
|
39
39
|
|
40
|
-
s.
|
41
|
-
s.email = "jhammack@tenable.com"
|
40
|
+
s.authors = ["Jacob Hammack", "Alex Weber", "Mak Kolybabi"]
|
41
|
+
s.email = ["jhammack@tenable.com", "aweber@tenable.com", "mak@kolybabi.com"]
|
42
42
|
|
43
43
|
s.files = Dir['[A-Z]*'] + Dir['lib/**/*'] + ["#{NaslDoc::APP_NAME}.gemspec"]
|
44
44
|
s.bindir = "bin"
|
@@ -50,5 +50,8 @@ Gem::Specification.new do |s|
|
|
50
50
|
s.required_rubygems_version = ">= 1.8.24"
|
51
51
|
s.rubyforge_project = "#{NaslDoc::APP_NAME}"
|
52
52
|
|
53
|
-
s.
|
53
|
+
s.add_development_dependency 'rake', '~>10.1'
|
54
|
+
|
55
|
+
s.add_runtime_dependency 'nasl', '~> 0.2', '>= 0.2.0'
|
56
|
+
s.add_runtime_dependency 'rainbow', '~> 2.0', '>= 2.0.0'
|
54
57
|
end
|
metadata
CHANGED
@@ -1,34 +1,82 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nasldoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jacob Hammack
|
8
|
+
- Alex Weber
|
9
|
+
- Mak Kolybabi
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date:
|
13
|
+
date: 2015-09-11 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rake
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '10.1'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ~>
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '10.1'
|
14
29
|
- !ruby/object:Gem::Dependency
|
15
30
|
name: nasl
|
16
31
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
32
|
requirements:
|
33
|
+
- - ~>
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0.2'
|
19
36
|
- - ! '>='
|
20
37
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
38
|
+
version: !binary |-
|
39
|
+
MC4yLjA=
|
22
40
|
type: :runtime
|
23
41
|
prerelease: false
|
24
42
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
43
|
requirements:
|
44
|
+
- - ~>
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0.2'
|
47
|
+
- - ! '>='
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: !binary |-
|
50
|
+
MC4yLjA=
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
name: rainbow
|
53
|
+
requirement: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - ~>
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: !binary |-
|
58
|
+
Mi4w
|
27
59
|
- - ! '>='
|
28
60
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
61
|
+
version: !binary |-
|
62
|
+
Mi4wLjA=
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: !binary |-
|
70
|
+
Mi4w
|
71
|
+
- - ! '>='
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: !binary |-
|
74
|
+
Mi4wLjA=
|
30
75
|
description: nasldoc is a NASL documentation generator
|
31
|
-
email:
|
76
|
+
email:
|
77
|
+
- jhammack@tenable.com
|
78
|
+
- aweber@tenable.com
|
79
|
+
- mak@kolybabi.com
|
32
80
|
executables:
|
33
81
|
- nasldoc
|
34
82
|
extensions: []
|
@@ -37,11 +85,16 @@ extra_rdoc_files:
|
|
37
85
|
- NEWS.markdown
|
38
86
|
- TODO.markdown
|
39
87
|
files:
|
88
|
+
- Gemfile
|
89
|
+
- Gemfile.ci
|
90
|
+
- Gemfile.lock
|
40
91
|
- LICENSE
|
41
92
|
- NEWS.markdown
|
42
|
-
- Rakefile
|
43
93
|
- README.markdown
|
94
|
+
- Rakefile
|
44
95
|
- TODO.markdown
|
96
|
+
- bin/nasldoc
|
97
|
+
- lib/nasldoc.rb
|
45
98
|
- lib/nasldoc/assets/css/bootstrap.css
|
46
99
|
- lib/nasldoc/assets/css/bootstrap.min.css
|
47
100
|
- lib/nasldoc/assets/css/shCore.css
|
@@ -55,43 +108,36 @@ files:
|
|
55
108
|
- lib/nasldoc/assets/js/jquery-1.8.2.js
|
56
109
|
- lib/nasldoc/assets/js/shBrushNasl.js
|
57
110
|
- lib/nasldoc/assets/js/shCore.js
|
111
|
+
- lib/nasldoc/cli.rb
|
58
112
|
- lib/nasldoc/cli/application.rb
|
113
|
+
- lib/nasldoc/cli/application.rb.orig
|
114
|
+
- lib/nasldoc/cli/application.rb.rej
|
59
115
|
- lib/nasldoc/cli/comment.rb
|
60
|
-
- lib/nasldoc/cli.rb
|
61
116
|
- lib/nasldoc/templates/file.erb
|
62
117
|
- lib/nasldoc/templates/index.erb
|
63
|
-
- lib/nasldoc/templates/old/file.erb
|
64
|
-
- lib/nasldoc/templates/old/xfile.erb
|
65
|
-
- lib/nasldoc/templates/old/xindex.erb
|
66
|
-
- lib/nasldoc/templates/old/xoverview.erb
|
67
|
-
- lib/nasldoc/templates/old/xsidebar.erb
|
68
|
-
- lib/nasldoc/templates/xindex.erb
|
69
|
-
- lib/nasldoc.rb
|
70
118
|
- nasldoc.gemspec
|
71
|
-
- bin/nasldoc
|
72
119
|
homepage: http://github.com/tenable/nasldoc
|
73
120
|
licenses:
|
74
121
|
- BSD
|
122
|
+
metadata: {}
|
75
123
|
post_install_message:
|
76
124
|
rdoc_options: []
|
77
125
|
require_paths:
|
78
126
|
- lib
|
79
127
|
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
-
none: false
|
81
128
|
requirements:
|
82
129
|
- - ! '>='
|
83
130
|
- !ruby/object:Gem::Version
|
84
131
|
version: '0'
|
85
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
-
none: false
|
87
133
|
requirements:
|
88
134
|
- - ! '>='
|
89
135
|
- !ruby/object:Gem::Version
|
90
136
|
version: 1.8.24
|
91
137
|
requirements: []
|
92
138
|
rubyforge_project: nasldoc
|
93
|
-
rubygems_version:
|
139
|
+
rubygems_version: 2.4.6
|
94
140
|
signing_key:
|
95
|
-
specification_version:
|
141
|
+
specification_version: 4
|
96
142
|
summary: nasldoc
|
97
143
|
test_files: []
|
@@ -1,332 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html lang="en">
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<title>nasldoc: nasl</title>
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
-
<meta name="description" content="">
|
8
|
-
<meta name="author" content="">
|
9
|
-
|
10
|
-
<!-- Le styles -->
|
11
|
-
<link href="assets/css/bootstrap.css" rel="stylesheet">
|
12
|
-
<style type="text/css">
|
13
|
-
body {
|
14
|
-
padding-top: 60px;
|
15
|
-
padding-bottom: 40px;
|
16
|
-
}
|
17
|
-
.sidebar-nav {
|
18
|
-
padding: 9px 0;
|
19
|
-
}
|
20
|
-
</style>
|
21
|
-
<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
|
22
|
-
|
23
|
-
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
24
|
-
<!--[if lt IE 9]>
|
25
|
-
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
26
|
-
<![endif]-->
|
27
|
-
|
28
|
-
<!-- Fav and touch icons -->
|
29
|
-
<link rel="shortcut icon" href="assets/ico/favicon.ico">
|
30
|
-
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
|
31
|
-
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
|
32
|
-
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
|
33
|
-
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
|
34
|
-
</head>
|
35
|
-
|
36
|
-
<body>
|
37
|
-
|
38
|
-
<div class="navbar navbar-inverse navbar-fixed-top">
|
39
|
-
<div class="navbar-inner">
|
40
|
-
<div class="container-fluid">
|
41
|
-
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
42
|
-
<span class="icon-bar"></span>
|
43
|
-
<span class="icon-bar"></span>
|
44
|
-
<span class="icon-bar"></span>
|
45
|
-
</a>
|
46
|
-
<a class="brand" href="#">nasldoc</a>
|
47
|
-
<div class="nav-collapse collapse">
|
48
|
-
<ul class="nav">
|
49
|
-
<li class="active"><a href="#">Home</a></li>
|
50
|
-
</ul>
|
51
|
-
</div><!--/.nav-collapse -->
|
52
|
-
</div>
|
53
|
-
</div>
|
54
|
-
</div>
|
55
|
-
|
56
|
-
<div class="container-fluid">
|
57
|
-
<div class="row-fluid">
|
58
|
-
<div class="span3">
|
59
|
-
<div class="well sidebar-nav">
|
60
|
-
<ul class="nav nav-list">
|
61
|
-
<% @file_list.sort.each_with_index do |file, i| %>
|
62
|
-
<% row = i.even? ? 'even' : 'odd' %>
|
63
|
-
<% link = url(file) %>
|
64
|
-
<li class="<%= row %>">
|
65
|
-
<a href="<%= link %>" target="content"><%= link %></a>
|
66
|
-
</li>
|
67
|
-
<% end %>
|
68
|
-
</ul>
|
69
|
-
</div><!--/.well -->
|
70
|
-
</div><!--/span-->
|
71
|
-
<div class="span9">
|
72
|
-
|
73
|
-
<a name="top"></a>
|
74
|
-
<h1>Overview of <%= @current_file %></h1>
|
75
|
-
<% unless @overview.nil? %>
|
76
|
-
<% unless @overview.summary.nil? %>
|
77
|
-
<p class="summary"><%= @overview.summary %></p>
|
78
|
-
<% end %>
|
79
|
-
<% @overview.description.each do |paragraph| %>
|
80
|
-
<p class="description"><%= paragraph %></p>
|
81
|
-
<% end %>
|
82
|
-
|
83
|
-
<% if @overview.signed %>
|
84
|
-
<h1>Signed</h1>
|
85
|
-
<p>This library contains a signature, indicating that it is permitted to
|
86
|
-
call trusted builtin functions.</p>
|
87
|
-
<p class="warning">The signature on this library has not been checked, so
|
88
|
-
there is no guarantee it will run in Nessus.</p>
|
89
|
-
<% end %>
|
90
|
-
|
91
|
-
<% unless @overview.includes.empty? %>
|
92
|
-
<h1>Required Includes</h1>
|
93
|
-
<p>These files must be included by the importing code.</p>
|
94
|
-
<ul>
|
95
|
-
<% @overview.includes.sort.each do |inc| %>
|
96
|
-
<li><a href="<%= url(inc) %>"><%= inc %></a></li>
|
97
|
-
<% end %>
|
98
|
-
</ul>
|
99
|
-
<% end %>
|
100
|
-
<% end %>
|
101
|
-
|
102
|
-
<% unless @includes.empty? %>
|
103
|
-
<h1>Automatic Includes</h1>
|
104
|
-
<p>These files are automatically included by the library.</p>
|
105
|
-
<ul>
|
106
|
-
<% @includes.sort.each do |inc| %>
|
107
|
-
<li><a href="<%= url(inc) %>"><%= inc %></a></li>
|
108
|
-
<% end %>
|
109
|
-
</ul>
|
110
|
-
<% end %>
|
111
|
-
|
112
|
-
<% {Public: @globs_pub, Private: @globs_prv}.each do |name, list| %>
|
113
|
-
<% unless list.empty? %>
|
114
|
-
<h1><%= name %> Variable Summary</h1>
|
115
|
-
|
116
|
-
<% if name == :Public %>
|
117
|
-
<p>Public variables are intended to be accessed by the code that imports
|
118
|
-
this library.</p>
|
119
|
-
<% else %>
|
120
|
-
<p>Private variables are not intended to be accessed by the code that
|
121
|
-
imports this library. There is no functional difference between private
|
122
|
-
and public variables, only convention, and they may be accessed as
|
123
|
-
normal. </p>
|
124
|
-
<% end %>
|
125
|
-
|
126
|
-
<table class="nopad">
|
127
|
-
<tr class="TableHeadingColor">
|
128
|
-
<th>Name</th>
|
129
|
-
<th>Summary</th>
|
130
|
-
</tr>
|
131
|
-
<% list.sort.each do |name| %>
|
132
|
-
<tr>
|
133
|
-
<td><a href="#<%= name %>"><%= name %></a></td>
|
134
|
-
<td><%= safe(comment(name, :global), "", :summary) %></td>
|
135
|
-
</tr>
|
136
|
-
<% end %>
|
137
|
-
</table>
|
138
|
-
<% end %>
|
139
|
-
<% end %>
|
140
|
-
|
141
|
-
<% {Public: @funcs_pub, Private: @funcs_prv}.each do |name, list| %>
|
142
|
-
<% unless list.empty? %>
|
143
|
-
<h1><%= name %> Function Summary</h1>
|
144
|
-
|
145
|
-
<% if name == :Public %>
|
146
|
-
<p>Public functions are intended to be called by the code that imports
|
147
|
-
this library.</p>
|
148
|
-
<% else %>
|
149
|
-
<p>Private functions are not intended to be called by the code that
|
150
|
-
imports this library. There is no functional difference between private
|
151
|
-
and public functions, only convention, and they may be called as
|
152
|
-
normal. </p>
|
153
|
-
<% end %>
|
154
|
-
|
155
|
-
<table class="nopad">
|
156
|
-
<tr class="TableHeadingColor">
|
157
|
-
<th>Name</th>
|
158
|
-
<th>Summary</th>
|
159
|
-
</tr>
|
160
|
-
<% list.keys.sort.each do |name| %>
|
161
|
-
<tr>
|
162
|
-
<td><a href="#<%= name %>"><%= name %></a></td>
|
163
|
-
<td><%= safe(comment(name, :function), "", :summary) %></td>
|
164
|
-
</tr>
|
165
|
-
<% end %>
|
166
|
-
</table>
|
167
|
-
<% end %>
|
168
|
-
<% end %>
|
169
|
-
|
170
|
-
<% {Public: @globs_pub, Private: @globs_prv}.each do |name, list| %>
|
171
|
-
<% unless list.empty? %>
|
172
|
-
<h1><%= name %> Variable Details</h1>
|
173
|
-
<% list.sort.each do |name| %>
|
174
|
-
<h2 id="<%= name %>"><%= name %></h2>
|
175
|
-
<% comm = comment(name, :global) %>
|
176
|
-
|
177
|
-
<% unless comm.nil? %>
|
178
|
-
<% unless comm.summary.nil? %>
|
179
|
-
<h3>Summary</h3>
|
180
|
-
<p class="summary"><%= comm.summary %></p>
|
181
|
-
<% end %>
|
182
|
-
|
183
|
-
<% unless comm.description.empty? %>
|
184
|
-
<h3>Description</h3>
|
185
|
-
<% comm.description.each do |para| %>
|
186
|
-
<p class="description"><%= para %></p>
|
187
|
-
<% end %>
|
188
|
-
<% end %>
|
189
|
-
|
190
|
-
<% unless comm.remarks.empty? %>
|
191
|
-
<h3>Remarks</h3>
|
192
|
-
<% comm.remarks.each do |rem| %>
|
193
|
-
<p class="remark"><%= rem %></p>
|
194
|
-
<% end %>
|
195
|
-
<% end %>
|
196
|
-
|
197
|
-
<% unless comm.deprecated.nil? %>
|
198
|
-
<h3>Deprecated</h3>
|
199
|
-
<p class="deprecated"><%= comm.deprecated %></p>
|
200
|
-
<% end %>
|
201
|
-
|
202
|
-
<% unless comm.nessus.nil? %>
|
203
|
-
<h3>Nessus Version</h3>
|
204
|
-
<p class="nessus"><%= comm.nessus %></p>
|
205
|
-
<% end %>
|
206
|
-
|
207
|
-
<% unless comm.categories.empty? %>
|
208
|
-
<h3>Categories</h3>
|
209
|
-
<ul>
|
210
|
-
<% comm.categories.sort.each do |cat| %>
|
211
|
-
<li><%= cat %></li>
|
212
|
-
<% end %>
|
213
|
-
</ul>
|
214
|
-
<% end %>
|
215
|
-
<% end %>
|
216
|
-
|
217
|
-
<a href="#top">top</a>
|
218
|
-
<hr>
|
219
|
-
<% end %>
|
220
|
-
<% end %>
|
221
|
-
<% end %>
|
222
|
-
|
223
|
-
<% {Public: @funcs_pub, Private: @funcs_prv}.each do |name, list| %>
|
224
|
-
<% unless list.empty? %>
|
225
|
-
<h1><%= name %> Function Details</h1>
|
226
|
-
<% list.keys.sort.each do |name| %>
|
227
|
-
<h2 id="<%= name %>"><%= name %></h2>
|
228
|
-
<% comm = comment(name, :function) %>
|
229
|
-
|
230
|
-
<% unless comm.nil? %>
|
231
|
-
<% unless comm.summary.nil? %>
|
232
|
-
<h3>Summary</h3>
|
233
|
-
<p class="summary"><%= comm.summary %></p>
|
234
|
-
<% end %>
|
235
|
-
|
236
|
-
<% unless comm.description.empty? %>
|
237
|
-
<h3>Description</h3>
|
238
|
-
<% comm.description.each do |para| %>
|
239
|
-
<p class="description"><%= para %></p>
|
240
|
-
<% end %>
|
241
|
-
<% end %>
|
242
|
-
|
243
|
-
<% unless comm.remarks.empty? %>
|
244
|
-
<h3>Remarks</h3>
|
245
|
-
<% comm.remarks.each do |rem| %>
|
246
|
-
<p class="remark"><%= rem %></p>
|
247
|
-
<% end %>
|
248
|
-
<% end %>
|
249
|
-
|
250
|
-
<% unless comm.deprecated.nil? %>
|
251
|
-
<h3>Deprecated</h3>
|
252
|
-
<p class="deprecated"><%= comm.deprecated %></p>
|
253
|
-
<% end %>
|
254
|
-
|
255
|
-
<% unless comm.nessus.nil? %>
|
256
|
-
<h3>Nessus Version</h3>
|
257
|
-
<p class="nessus"><%= comm.nessus %></p>
|
258
|
-
<% end %>
|
259
|
-
|
260
|
-
<% unless comm.categories.empty? %>
|
261
|
-
<h3>Categories</h3>
|
262
|
-
<ul>
|
263
|
-
<% comm.categories.sort.each do |cat| %>
|
264
|
-
<li><%= cat %></li>
|
265
|
-
<% end %>
|
266
|
-
</ul>
|
267
|
-
<% end %>
|
268
|
-
|
269
|
-
<% unless comm.anonparams.empty? %>
|
270
|
-
<h3>Anonymous Parameters</h3>
|
271
|
-
<dl>
|
272
|
-
<% comm.anonparams.sort.each do |name, block| %>
|
273
|
-
<dt><%= name %></dt>
|
274
|
-
<dd><%= block %></dd>
|
275
|
-
<% end %>
|
276
|
-
</dl>
|
277
|
-
<% end %>
|
278
|
-
<% end %>
|
279
|
-
|
280
|
-
<% unless @functions[name].nil? || @functions[name].empty? %>
|
281
|
-
<h3>Named Parameters</h3>
|
282
|
-
<dl>
|
283
|
-
<% @functions[name].sort.each do |name| %>
|
284
|
-
<dt><%= name %></dt>
|
285
|
-
<% unless comm.nil? || !comm.params.has_key?(name) %>
|
286
|
-
<dd><%= comm.params[name] %></dd>
|
287
|
-
<% end %>
|
288
|
-
<% end %>
|
289
|
-
</dl>
|
290
|
-
<% end %>
|
291
|
-
|
292
|
-
<% unless comm.nil? || comm.return.nil? %>
|
293
|
-
<h3>Return Value</h3>
|
294
|
-
<p class="return"><%= comm.return %></p>
|
295
|
-
<% end %>
|
296
|
-
|
297
|
-
<a href="#top">top</a>
|
298
|
-
<hr>
|
299
|
-
<% end %>
|
300
|
-
<% end %>
|
301
|
-
<% end %>
|
302
|
-
|
303
|
-
</div><!--/span-->
|
304
|
-
</div><!--/row-->
|
305
|
-
|
306
|
-
<hr>
|
307
|
-
|
308
|
-
<footer>
|
309
|
-
<p>© Company 2012</p>
|
310
|
-
</footer>
|
311
|
-
|
312
|
-
</div><!--/.fluid-container-->
|
313
|
-
|
314
|
-
<!-- Le javascript
|
315
|
-
================================================== -->
|
316
|
-
<!-- Placed at the end of the document so the pages load faster -->
|
317
|
-
<script src="assets/js/jquery.js"></script>
|
318
|
-
<script src="assets/js/bootstrap-transition.js"></script>
|
319
|
-
<script src="assets/js/bootstrap-alert.js"></script>
|
320
|
-
<script src="assets/js/bootstrap-modal.js"></script>
|
321
|
-
<script src="assets/js/bootstrap-dropdown.js"></script>
|
322
|
-
<script src="assets/js/bootstrap-scrollspy.js"></script>
|
323
|
-
<script src="assets/js/bootstrap-tab.js"></script>
|
324
|
-
<script src="assets/js/bootstrap-tooltip.js"></script>
|
325
|
-
<script src="assets/js/bootstrap-popover.js"></script>
|
326
|
-
<script src="assets/js/bootstrap-button.js"></script>
|
327
|
-
<script src="assets/js/bootstrap-collapse.js"></script>
|
328
|
-
<script src="assets/js/bootstrap-carousel.js"></script>
|
329
|
-
<script src="assets/js/bootstrap-typeahead.js"></script>
|
330
|
-
|
331
|
-
</body>
|
332
|
-
</html>
|