% def comment(name, type) filter1 = proc { |c| c.type == type } filter2 = case type when :export, :function Proc.new { |c| c.function == name } when :file Proc.new { |c| true } when :global Proc.new { |c| c.variables.include? name } end @comments.select(&filter1).select(&filter2).shift end %> <% def safe(obj, default, *attrs) attrs.each do |attr| return default unless obj.respond_to? attr obj = obj.send(attr) end obj end %> <% def build_fn_name(name, colorize = 0) fn_str = '' if (!@functions[name][:namespace].nil?) if(colorize) fn_str += "" + @functions[name][:namespace] + "::" else fn_str += @functions[name][:namespace] + "::" end end if (!@functions[name][:object].nil?) if(colorize) fn_str += "" + @functions[name][:object] + "." else fn_str += @functions[name][:object] + "." end end if(colorize) color = "#50A40B" color = "#086E6E" if @functions[name][:fn_type] == "obj" fn_str += "" + @functions[name][:name] + "()" else fn_str += @functions[name][:name] end fn_str end %>
<%= @overview.summary %>
<% end %> <% @overview.description.each do |paragraph| %><%= paragraph %>
<% end %> <% if @overview.signed %>This library contains a signature, indicating that it is permitted to call trusted builtin functions.
The signature on this library has not been checked, so there is no guarantee it will run in Nessus.
<% end %> <% unless @overview.includes.empty? %>These files must be included by the importing code.
These files are automatically included by the library.
Public variables are intended to be accessed by the code that imports this library.
<% else %>Private variables are not intended to be accessed by the code that imports this library. There is no functional difference between private and public variables, only convention, and they may be accessed as normal.
<% end %>Name | Summary |
---|---|
<%= name %> | <%= safe(comment(name, :global), "", :summary) %> |
Public functions are intended to be called by the code that imports this library.
<% else %>Private functions are not intended to be called by the code that imports this library. There is no functional difference between private and public functions, only convention, and they may be called as normal.
<% end %>Name | Summary |
---|---|
<%= build_fn_name(name, 1) %> | <%= safe(comment(name, :function), "", :summary) %> |
<%= comm.summary %>
<% end %> <% unless comm.description.empty? %><%= para %>
<% end %> <% end %> <% unless comm.remarks.empty? %><%= rem %>
<% end %> <% end %> <% unless comm.deprecated.nil? %><%= comm.deprecated %>
<% end %> <% unless comm.nessus.nil? %><%= comm.nessus %>
<% end %> <% unless comm.categories.empty? %><%= comm.summary %>
<% end %> <% unless @functions[name][:namespace].nil? %><%= @functions[name][:namespace] %>
<% end %> <% unless @functions[name][:object].nil? %><%= @functions[name][:object] %>
<% end %> <% unless comm.description.empty? %><%= para %>
<% end %> <% end %> <% unless comm.remarks.empty? %><%= rem %>
<% end %> <% end %> <% unless comm.deprecated.nil? %><%= comm.deprecated %>
<% end %> <% unless comm.nessus.nil? %><%= comm.nessus %>
<% end %> <% unless comm.categories.empty? %><%= comm.return %>
<% end %><% unless @functions[name][:code].nil? %> <%= CGI::escapeHTML(@functions[name][:code]) %> <% end %>top