Reboot gh-pages
This commit is contained in:
@@ -0,0 +1,1420 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Module: Msf::ModuleManager::Cache
|
||||
|
||||
— Documentation by YARD 0.9.37
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = "Msf::ModuleManager::Cache";
|
||||
relpath = '../../';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="../../_index.html">Index (C)</a> »
|
||||
<span class='title'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span> » <span class='title'><span class='object_link'><a href="../ModuleManager.html" title="Msf::ModuleManager (class)">ModuleManager</a></span></span>
|
||||
»
|
||||
<span class="title">Cache</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="class_list_link"
|
||||
href="../../class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1>Module: Msf::ModuleManager::Cache
|
||||
|
||||
|
||||
|
||||
</h1>
|
||||
<div class="box_info">
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Extended by:</dt>
|
||||
<dd>ActiveSupport::Concern</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Included in:</dt>
|
||||
<dd><span class='object_link'><a href="../ModuleManager.html" title="Msf::ModuleManager (class)">Msf::ModuleManager</a></span></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Defined in:</dt>
|
||||
<dd>lib/msf/core/module_manager/cache.rb</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
<h2>Overview</h2><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Concerns the module cache maintained by the <span class='object_link'><a href="../ModuleManager.html" title="Msf::ModuleManager (class)">Msf::ModuleManager</a></span>.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<h2>
|
||||
Constant Summary
|
||||
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
||||
</h2>
|
||||
|
||||
<dl class="constants">
|
||||
|
||||
<dt id="MEMORY-constant" class="">MEMORY =
|
||||
|
||||
</dt>
|
||||
<dd><pre class="code"><span class='symbol'>:memory</span></pre></dd>
|
||||
|
||||
<dt id="FILESYSTEM-constant" class="">FILESYSTEM =
|
||||
|
||||
</dt>
|
||||
<dd><pre class="code"><span class='symbol'>:filesystem</span></pre></dd>
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
||||
<ul class="summary">
|
||||
|
||||
<li class="protected ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#module_info_by_path-instance_method" title="#module_info_by_path (instance method)">#<strong>module_info_by_path</strong> ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="note title protected">protected</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'></div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>
|
||||
Instance Method Summary
|
||||
<small><a href="#" class="summary_toggle">collapse</a></small>
|
||||
</h2>
|
||||
|
||||
<ul class="summary">
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#cache_empty%3F-instance_method" title="#cache_empty? (instance method)">#<strong>cache_empty?</strong> ⇒ true, false </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Returns whether the cache is empty.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#cache_in_memory-instance_method" title="#cache_in_memory (instance method)">#<strong>cache_in_memory</strong>(class_or_module, options = {}) ⇒ void </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Updates the in-memory cache so that <span class='object_link'><a href="Loading.html#file_changed%3F-instance_method" title="Msf::ModuleManager::Loading#file_changed? (method)">Loading#file_changed?</a></span> will report <code>false</code> if the module is loaded again.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="protected ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#get_parent_path-instance_method" title="#get_parent_path (instance method)">#<strong>get_parent_path</strong>(module_path, type) ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
<span class="note title protected">protected</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'></div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#load_cached_module-instance_method" title="#load_cached_module (instance method)">#<strong>load_cached_module</strong>(type, reference_name, cache_type: Msf::ModuleManager::Cache::MEMORY) ⇒ false, true </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Forces loading of the module with the given type and module reference name from the cache.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="protected ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#module_info_by_path_from_database!-instance_method" title="#module_info_by_path_from_database! (instance method)">#<strong>module_info_by_path_from_database!</strong>(allowed_paths = [""]) ⇒ Hash{String => Hash{Symbol => Object}} </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
<span class="note title protected">protected</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Return a module info from Msf::Modules::Metadata::Obj.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#refresh_cache_from_database-instance_method" title="#refresh_cache_from_database (instance method)">#<strong>refresh_cache_from_database</strong>(allowed_paths = [""]) ⇒ void </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Refreshes the in-memory cache from the database cache.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#refresh_cache_from_module_files-instance_method" title="#refresh_cache_from_module_files (instance method)">#<strong>refresh_cache_from_module_files</strong>(module_class_or_instance = nil) ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'></div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#try_load_module-instance_method" title="#try_load_module (instance method)">#<strong>try_load_module</strong>(parent_path, type, reference_name, cached_metadata: nil) ⇒ Boolean </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>True if loaded, false otherwise.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="instance_attr_details" class="attr_details">
|
||||
<h2>Instance Attribute Details</h2>
|
||||
|
||||
|
||||
<span id="module_info_by_path=-instance_method"></span>
|
||||
<div class="method_details first">
|
||||
<h3 class="signature first" id="module_info_by_path-instance_method">
|
||||
|
||||
#<strong>module_info_by_path</strong> ⇒ <tt>Object</tt> <span class="extras">(protected)</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
159
|
||||
160
|
||||
161</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/cache.rb', line 159</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_module_info_by_path'>module_info_by_path</span>
|
||||
<span class='ivar'>@module_info_by_path</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="instance_method_details" class="method_details_list">
|
||||
<h2>Instance Method Details</h2>
|
||||
|
||||
|
||||
<div class="method_details first">
|
||||
<h3 class="signature first" id="cache_empty?-instance_method">
|
||||
|
||||
#<strong>cache_empty?</strong> ⇒ <tt>true</tt>, <tt>false</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Returns whether the cache is empty</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
<p class="tag_title">Returns:</p>
|
||||
<ul class="return">
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>true</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>if the cache has no entries.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>false</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>if the cache has any entries.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
17
|
||||
18
|
||||
19</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/cache.rb', line 17</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_cache_empty?'>cache_empty?</span>
|
||||
<span class='id identifier rubyid_module_info_by_path'>module_info_by_path</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="cache_in_memory-instance_method">
|
||||
|
||||
#<strong>cache_in_memory</strong>(class_or_module, options = {}) ⇒ <tt>void</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<div class="note notetag">
|
||||
<strong>Note:</strong>
|
||||
<div class='inline'>
|
||||
<p>path, reference_name, and type must be passed as options because when <code>class_or_module</code> is a payload Module, those attributes will either not be set or not exist on the module.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="note returns_void">This method returns an undefined value.</p>
|
||||
<p>Updates the in-memory cache so that <span class='object_link'><a href="Loading.html#file_changed%3F-instance_method" title="Msf::ModuleManager::Loading#file_changed? (method)">Loading#file_changed?</a></span> will report <code>false</code> if the module is loaded again.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
<p class="tag_title">Parameters:</p>
|
||||
<ul class="param">
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>class_or_module</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Class<<span class='object_link'><a href="../Module.html" title="Msf::Module (class)">Msf::Module</a></span>></tt>, <tt>::Module</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>either a module Class or a payload Module.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>options</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Hash{Symbol => String}</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
||||
<ul class="option">
|
||||
|
||||
<li>
|
||||
<span class="name">:path</span>
|
||||
<span class="type">(<tt>String</tt>)</span>
|
||||
<span class="default">
|
||||
|
||||
</span>
|
||||
|
||||
— <div class='inline'>
|
||||
<p>the path to the file from which <code>class_or_module</code> was loaded.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class="name">:reference_name</span>
|
||||
<span class="type">(<tt>String</tt>)</span>
|
||||
<span class="default">
|
||||
|
||||
</span>
|
||||
|
||||
— <div class='inline'>
|
||||
<p>the reference name for <code>class_or_module</code>.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class="name">:type</span>
|
||||
<span class="type">(<tt>String</tt>)</span>
|
||||
<span class="default">
|
||||
|
||||
</span>
|
||||
|
||||
— <div class='inline'>
|
||||
<p>the module type</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<p class="tag_title">Raises:</p>
|
||||
<ul class="raise">
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>KeyError</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>unless <code>:path</code> is given.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>KeyError</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>unless <code>:reference_name</code> is given.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>KeyError</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>unless <code>:type</code> is given.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
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</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/cache.rb', line 39</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_cache_in_memory'>cache_in_memory</span><span class='lparen'>(</span><span class='id identifier rubyid_class_or_module'>class_or_module</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_assert_valid_keys'>assert_valid_keys</span><span class='lparen'>(</span><span class='symbol'>:path</span><span class='comma'>,</span> <span class='symbol'>:reference_name</span><span class='comma'>,</span> <span class='symbol'>:type</span><span class='rparen'>)</span>
|
||||
|
||||
<span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:path</span><span class='rparen'>)</span>
|
||||
|
||||
<span class='kw'>begin</span>
|
||||
<span class='id identifier rubyid_modification_time'>modification_time</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_mtime'>mtime</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
||||
<span class='kw'>rescue</span> <span class='const'>Errno</span><span class='op'>::</span><span class='const'>ENOENT</span> <span class='op'>=></span> <span class='id identifier rubyid_error'>error</span>
|
||||
<span class='id identifier rubyid_log_lines'>log_lines</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
||||
<span class='id identifier rubyid_log_lines'>log_lines</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Could not find the modification of time of </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='embexpr_end'>}</span><span class='tstring_content'>:</span><span class='tstring_end'>"</span></span>
|
||||
<span class='id identifier rubyid_log_lines'>log_lines</span> <span class='op'><<</span> <span class='id identifier rubyid_error'>error</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
||||
<span class='id identifier rubyid_log_lines'>log_lines</span> <span class='op'><<</span> <span class='id identifier rubyid_error'>error</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
||||
<span class='id identifier rubyid_log_lines'>log_lines</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Call stack:</span><span class='tstring_end'>"</span></span>
|
||||
<span class='id identifier rubyid_log_lines'>log_lines</span> <span class='op'>+=</span> <span class='id identifier rubyid_error'>error</span><span class='period'>.</span><span class='id identifier rubyid_backtrace'>backtrace</span>
|
||||
|
||||
<span class='id identifier rubyid_log_message'>log_message</span> <span class='op'>=</span> <span class='id identifier rubyid_log_lines'>log_lines</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_elog'><span class='object_link'><a href="../../top-level-namespace.html#elog-instance_method" title="#elog (method)">elog</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_log_message'>log_message</span><span class='rparen'>)</span>
|
||||
<span class='kw'>else</span>
|
||||
<span class='id identifier rubyid_parent_path'>parent_path</span> <span class='op'>=</span> <span class='id identifier rubyid_class_or_module'>class_or_module</span><span class='period'>.</span><span class='id identifier rubyid_module_parent'>module_parent</span><span class='period'>.</span><span class='id identifier rubyid_parent_path'>parent_path</span>
|
||||
<span class='id identifier rubyid_reference_name'>reference_name</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:reference_name</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:type</span><span class='rparen'>)</span>
|
||||
|
||||
<span class='id identifier rubyid_module_info_by_path'>module_info_by_path</span><span class='lbracket'>[</span><span class='id identifier rubyid_path'>path</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
||||
<span class='symbol'>:modification_time</span> <span class='op'>=></span> <span class='id identifier rubyid_modification_time'>modification_time</span><span class='comma'>,</span>
|
||||
<span class='symbol'>:parent_path</span> <span class='op'>=></span> <span class='id identifier rubyid_parent_path'>parent_path</span><span class='comma'>,</span>
|
||||
<span class='symbol'>:reference_name</span> <span class='op'>=></span> <span class='id identifier rubyid_reference_name'>reference_name</span><span class='comma'>,</span>
|
||||
<span class='symbol'>:type</span> <span class='op'>=></span> <span class='id identifier rubyid_type'>type</span>
|
||||
<span class='rbrace'>}</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="get_parent_path-instance_method">
|
||||
|
||||
#<strong>get_parent_path</strong>(module_path, type) ⇒ <tt>Object</tt> <span class="extras">(protected)</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
209
|
||||
210
|
||||
211
|
||||
212
|
||||
213
|
||||
214
|
||||
215</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/cache.rb', line 209</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_get_parent_path'>get_parent_path</span><span class='lparen'>(</span><span class='id identifier rubyid_module_path'>module_path</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
||||
<span class='comment'># The load path is the directory above the type directory (e.g. everything
|
||||
</span> <span class='comment'># before "/exploits/" in the module's absolute path).
|
||||
</span> <span class='id identifier rubyid_type_dir'>type_dir</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='const'>File</span><span class='op'>::</span><span class='const'>SEPARATOR</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='const'>Mdm</span><span class='op'>::</span><span class='const'>Module</span><span class='op'>::</span><span class='const'>Detail</span><span class='op'>::</span><span class='const'>DIRECTORY_BY_TYPE</span><span class='lbracket'>[</span><span class='id identifier rubyid_type'>type</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='const'>File</span><span class='op'>::</span><span class='const'>SEPARATOR</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
||||
<span class='id identifier rubyid_idx'>idx</span> <span class='op'>=</span> <span class='id identifier rubyid_module_path'>module_path</span><span class='period'>.</span><span class='id identifier rubyid_rindex'>rindex</span><span class='lparen'>(</span><span class='id identifier rubyid_type_dir'>type_dir</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_idx'>idx</span> <span class='op'>?</span> <span class='id identifier rubyid_module_path'>module_path</span><span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span> <span class='id identifier rubyid_idx'>idx</span><span class='rbracket'>]</span> <span class='op'>:</span> <span class='id identifier rubyid_module_path'>module_path</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="load_cached_module-instance_method">
|
||||
|
||||
#<strong>load_cached_module</strong>(type, reference_name, cache_type: Msf::ModuleManager::Cache::MEMORY) ⇒ <tt>false</tt>, <tt>true</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Forces loading of the module with the given type and module reference name from the cache.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
<p class="tag_title">Parameters:</p>
|
||||
<ul class="param">
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>type</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>String</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>the type of the module.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>reference_name</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>String</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>the module reference name.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p class="tag_title">Returns:</p>
|
||||
<ul class="return">
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>false</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>if a module with the given type and reference name does not exist in the cache.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>false</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>if :force is false and parent_path has not changed.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>false</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>if exception encountered while parsing module content</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>false</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>if the module is incompatible with the Core or API version.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>false</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>if the module does not implement a Metasploit class.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>false</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>if the module's is_usable method returns false.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>true</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>if all those condition pass and the module is successfully loaded.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
76
|
||||
77
|
||||
78
|
||||
79
|
||||
80
|
||||
81
|
||||
82
|
||||
83
|
||||
84
|
||||
85
|
||||
86
|
||||
87
|
||||
88
|
||||
89
|
||||
90
|
||||
91
|
||||
92
|
||||
93
|
||||
94
|
||||
95
|
||||
96
|
||||
97</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/cache.rb', line 76</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_load_cached_module'>load_cached_module</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_reference_name'>reference_name</span><span class='comma'>,</span> <span class='label'>cache_type:</span> <span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../ModuleManager.html" title="Msf::ModuleManager (class)">ModuleManager</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Msf::ModuleManager::Cache (module)">Cache</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="#MEMORY-constant" title="Msf::ModuleManager::Cache::MEMORY (constant)">MEMORY</a></span></span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_cached_metadata'>cached_metadata</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
||||
|
||||
<span class='kw'>case</span> <span class='id identifier rubyid_cache_type'>cache_type</span>
|
||||
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../ModuleManager.html" title="Msf::ModuleManager (class)">ModuleManager</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Msf::ModuleManager::Cache (module)">Cache</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="#FILESYSTEM-constant" title="Msf::ModuleManager::Cache::FILESYSTEM (constant)">FILESYSTEM</a></span></span>
|
||||
<span class='id identifier rubyid_cached_metadata'>cached_metadata</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules.html" title="Msf::Modules (module)">Modules</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules/Metadata.html" title="Msf::Modules::Metadata (module)">Metadata</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules/Metadata/Cache.html" title="Msf::Modules::Metadata::Cache (class)">Cache</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_get_module_reference'>get_module_reference</span><span class='lparen'>(</span><span class='label'>type:</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='label'>reference_name:</span> <span class='id identifier rubyid_reference_name'>reference_name</span><span class='rparen'>)</span>
|
||||
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_cached_metadata'>cached_metadata</span>
|
||||
|
||||
<span class='id identifier rubyid_parent_path'>parent_path</span> <span class='op'>=</span> <span class='id identifier rubyid_get_parent_path'>get_parent_path</span><span class='lparen'>(</span><span class='id identifier rubyid_cached_metadata'>cached_metadata</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
||||
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../ModuleManager.html" title="Msf::ModuleManager (class)">ModuleManager</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Msf::ModuleManager::Cache (module)">Cache</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="#MEMORY-constant" title="Msf::ModuleManager::Cache::MEMORY (constant)">MEMORY</a></span></span>
|
||||
<span class='id identifier rubyid_module_info'>module_info</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_module_info_by_path'>module_info_by_path</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_inner_info'>inner_info</span><span class='op'>|</span>
|
||||
<span class='id identifier rubyid_inner_info'>inner_info</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='id identifier rubyid_type'>type</span> <span class='kw'>and</span> <span class='id identifier rubyid_inner_info'>inner_info</span><span class='lbracket'>[</span><span class='symbol'>:reference_name</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='id identifier rubyid_reference_name'>reference_name</span>
|
||||
<span class='rbrace'>}</span>
|
||||
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_module_info'>module_info</span>
|
||||
|
||||
<span class='id identifier rubyid_parent_path'>parent_path</span> <span class='op'>=</span> <span class='id identifier rubyid_module_info'>module_info</span><span class='lbracket'>[</span><span class='symbol'>:parent_path</span><span class='rbracket'>]</span>
|
||||
<span class='kw'>else</span>
|
||||
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cache_type'>cache_type</span><span class='embexpr_end'>}</span><span class='tstring_content'> is not a valid cache type.</span><span class='tstring_end'>"</span></span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='id identifier rubyid_try_load_module'>try_load_module</span><span class='lparen'>(</span><span class='id identifier rubyid_parent_path'>parent_path</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_reference_name'>reference_name</span><span class='comma'>,</span> <span class='label'>cached_metadata:</span> <span class='id identifier rubyid_cached_metadata'>cached_metadata</span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="module_info_by_path_from_database!-instance_method">
|
||||
|
||||
#<strong>module_info_by_path_from_database!</strong>(allowed_paths = [""]) ⇒ <tt>Hash{String => Hash{Symbol => Object}}</tt> <span class="extras">(protected)</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<div class="note notetag">
|
||||
<strong>Note:</strong>
|
||||
<div class='inline'>
|
||||
<p>Also sets <a href="module_reference_name">module_set(module_type)</a> to nil if it is not already set.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p>Return a module info from Msf::Modules::Metadata::Obj.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
<p class="tag_title">Returns:</p>
|
||||
<ul class="return">
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Hash{String => Hash{Symbol => Object}}</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>Maps path (Mdm::Module::Detail#file) to module information. Module information is a Hash derived from Mdm::Module::Detail. It includes :modification_time, :parent_path, :type, :reference_name.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
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
|
||||
205
|
||||
206
|
||||
207</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/cache.rb', line 168</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_module_info_by_path_from_database!'>module_info_by_path_from_database!</span><span class='lparen'>(</span><span class='id identifier rubyid_allowed_paths'>allowed_paths</span><span class='op'>=</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
||||
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_module_info_by_path'>module_info_by_path</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
||||
|
||||
<span class='id identifier rubyid_allowed_paths'>allowed_paths</span> <span class='op'>=</span> <span class='id identifier rubyid_allowed_paths'>allowed_paths</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_x'>x</span><span class='op'>|</span> <span class='id identifier rubyid_x'>x</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='tstring_end'>"</span></span><span class='rbrace'>}</span>
|
||||
|
||||
<span class='id identifier rubyid_metadata'>metadata</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules.html" title="Msf::Modules (module)">Modules</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules/Metadata.html" title="Msf::Modules::Metadata (module)">Metadata</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules/Metadata/Cache.html" title="Msf::Modules::Metadata::Cache (class)">Cache</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_get_metadata'>get_metadata</span>
|
||||
<span class='id identifier rubyid_metadata'>metadata</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_module_metadata'>module_metadata</span><span class='op'>|</span>
|
||||
<span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_module_metadata'>module_metadata</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span>
|
||||
<span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='id identifier rubyid_module_metadata'>module_metadata</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span>
|
||||
<span class='id identifier rubyid_reference_name'>reference_name</span> <span class='op'>=</span> <span class='id identifier rubyid_module_metadata'>module_metadata</span><span class='period'>.</span><span class='id identifier rubyid_ref_name'>ref_name</span>
|
||||
|
||||
<span class='comment'># Skip cached modules that are not in our allowed load paths
|
||||
</span> <span class='kw'>next</span> <span class='kw'>unless</span> <span class='id identifier rubyid_allowed_paths'>allowed_paths</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_x'>x</span><span class='op'>|</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_start_with?'>start_with?</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
||||
|
||||
<span class='id identifier rubyid_parent_path'>parent_path</span> <span class='op'>=</span> <span class='id identifier rubyid_get_parent_path'>get_parent_path</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
||||
|
||||
<span class='id identifier rubyid_module_info_by_path'>module_info_by_path</span><span class='lbracket'>[</span><span class='id identifier rubyid_path'>path</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbrace'>{</span>
|
||||
<span class='symbol'>:reference_name</span> <span class='op'>=></span> <span class='id identifier rubyid_reference_name'>reference_name</span><span class='comma'>,</span>
|
||||
<span class='symbol'>:type</span> <span class='op'>=></span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span>
|
||||
<span class='symbol'>:parent_path</span> <span class='op'>=></span> <span class='id identifier rubyid_parent_path'>parent_path</span><span class='comma'>,</span>
|
||||
<span class='symbol'>:modification_time</span> <span class='op'>=></span> <span class='id identifier rubyid_module_metadata'>module_metadata</span><span class='period'>.</span><span class='id identifier rubyid_mod_time'>mod_time</span>
|
||||
<span class='rbrace'>}</span>
|
||||
<span class='id identifier rubyid_module_metadata'>module_metadata</span><span class='period'>.</span><span class='id identifier rubyid_aliases'>aliases</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span>
|
||||
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_aliases'>aliases</span><span class='lbracket'>[</span><span class='id identifier rubyid_a'>a</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_module_metadata'>module_metadata</span><span class='period'>.</span><span class='id identifier rubyid_fullname'>fullname</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_inv_aliases'>inv_aliases</span><span class='lbracket'>[</span><span class='id identifier rubyid_module_metadata'>module_metadata</span><span class='period'>.</span><span class='id identifier rubyid_fullname'>fullname</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_module_metadata'>module_metadata</span><span class='period'>.</span><span class='id identifier rubyid_aliases'>aliases</span> <span class='kw'>unless</span> <span class='id identifier rubyid_module_metadata'>module_metadata</span><span class='period'>.</span><span class='id identifier rubyid_aliases'>aliases</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
||||
|
||||
<span class='id identifier rubyid_typed_module_set'>typed_module_set</span> <span class='op'>=</span> <span class='id identifier rubyid_module_set'>module_set</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
||||
|
||||
<span class='comment'># Don't want to trigger as {Msf::ModuleSet#create} so check for
|
||||
</span> <span class='comment'># key instead of using ||= which would call {Msf::ModuleSet#[]}
|
||||
</span> <span class='comment'># which would potentially call {Msf::ModuleSet#create}.
|
||||
</span> <span class='kw'>next</span> <span class='kw'>unless</span> <span class='id identifier rubyid_typed_module_set'>typed_module_set</span>
|
||||
<span class='kw'>unless</span> <span class='id identifier rubyid_typed_module_set'>typed_module_set</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='id identifier rubyid_reference_name'>reference_name</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_typed_module_set'>typed_module_set</span><span class='lbracket'>[</span><span class='id identifier rubyid_reference_name'>reference_name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_module_info_by_path'>module_info_by_path</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="refresh_cache_from_database-instance_method">
|
||||
|
||||
#<strong>refresh_cache_from_database</strong>(allowed_paths = [""]) ⇒ <tt>void</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
<p class="note returns_void">This method returns an undefined value.</p>
|
||||
<p>Refreshes the in-memory cache from the database cache.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
151
|
||||
152
|
||||
153</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/cache.rb', line 151</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_refresh_cache_from_database'>refresh_cache_from_database</span><span class='lparen'>(</span><span class='id identifier rubyid_allowed_paths'>allowed_paths</span><span class='op'>=</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
||||
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_module_info_by_path_from_database!'>module_info_by_path_from_database!</span><span class='lparen'>(</span><span class='id identifier rubyid_allowed_paths'>allowed_paths</span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="refresh_cache_from_module_files-instance_method">
|
||||
|
||||
|
||||
<span class="overload">#<strong>refresh_cache_from_module_files</strong> ⇒ <tt>void</tt> </span>
|
||||
|
||||
<span class="overload">#<strong>refresh_cache_from_module_files</strong>(module_class_or_instance) ⇒ <tt>void</tt> </span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
<p class="tag_title">Overloads:</p>
|
||||
<ul class="overload">
|
||||
|
||||
|
||||
<li class="overload_item">
|
||||
<span class="signature">#<strong>refresh_cache_from_module_files</strong> ⇒ <tt>void</tt> </span>
|
||||
<div class="docstring">
|
||||
<div class="discussion">
|
||||
<p class="note returns_void">This method returns an undefined value.</p>
|
||||
<p>Rebuilds module metadata store and in-memory cache for all modules.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="overload_item">
|
||||
<span class="signature">#<strong>refresh_cache_from_module_files</strong>(module_class_or_instance) ⇒ <tt>void</tt> </span>
|
||||
<div class="docstring">
|
||||
<div class="discussion">
|
||||
<p class="note returns_void">This method returns an undefined value.</p>
|
||||
<p>Rebuilds database and in-memory cache for given module_class_or_instance.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
128
|
||||
129
|
||||
130
|
||||
131
|
||||
132
|
||||
133
|
||||
134
|
||||
135
|
||||
136
|
||||
137
|
||||
138
|
||||
139
|
||||
140
|
||||
141
|
||||
142
|
||||
143
|
||||
144
|
||||
145
|
||||
146</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/cache.rb', line 128</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_refresh_cache_from_module_files'>refresh_cache_from_module_files</span><span class='lparen'>(</span><span class='id identifier rubyid_module_class_or_instance'>module_class_or_instance</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
||||
<span class='kw'>if</span> <span class='id identifier rubyid_module_class_or_instance'>module_class_or_instance</span>
|
||||
<span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules.html" title="Msf::Modules (module)">Modules</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules/Metadata.html" title="Msf::Modules::Metadata (module)">Metadata</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules/Metadata/Cache.html" title="Msf::Modules::Metadata::Cache (class)">Cache</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_refresh_metadata_instance'>refresh_metadata_instance</span><span class='lparen'>(</span><span class='id identifier rubyid_module_class_or_instance'>module_class_or_instance</span><span class='rparen'>)</span>
|
||||
<span class='kw'>else</span>
|
||||
<span class='id identifier rubyid_module_sets'>module_sets</span> <span class='op'>=</span>
|
||||
<span class='lbracket'>[</span>
|
||||
<span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>exploit</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='ivar'>@framework</span><span class='period'>.</span><span class='id identifier rubyid_exploits'>exploits</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
||||
<span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>auxiliary</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='ivar'>@framework</span><span class='period'>.</span><span class='id identifier rubyid_auxiliary'>auxiliary</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
||||
<span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>post</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='ivar'>@framework</span><span class='period'>.</span><span class='id identifier rubyid_post'>post</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
||||
<span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>payload</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='ivar'>@framework</span><span class='period'>.</span><span class='id identifier rubyid_payloads'>payloads</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
||||
<span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>encoder</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='ivar'>@framework</span><span class='period'>.</span><span class='id identifier rubyid_encoders'>encoders</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
||||
<span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>nop</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='ivar'>@framework</span><span class='period'>.</span><span class='id identifier rubyid_nops'>nops</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
||||
<span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>evasion</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='ivar'>@framework</span><span class='period'>.</span><span class='id identifier rubyid_evasion'>evasion</span><span class='rbracket'>]</span>
|
||||
<span class='rbracket'>]</span>
|
||||
<span class='ivar'>@framework</span><span class='period'>.</span><span class='id identifier rubyid_payloads'>payloads</span><span class='period'>.</span><span class='id identifier rubyid_recalculate'>recalculate</span> <span class='comment'># Ensure all payloads are calculated before refreshing metadata
|
||||
</span> <span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules.html" title="Msf::Modules (module)">Modules</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules/Metadata.html" title="Msf::Modules::Metadata (module)">Metadata</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules/Metadata/Cache.html" title="Msf::Modules::Metadata::Cache (class)">Cache</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_refresh_metadata'>refresh_metadata</span><span class='lparen'>(</span><span class='id identifier rubyid_module_sets'>module_sets</span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='id identifier rubyid_refresh_cache_from_database'>refresh_cache_from_database</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_module_paths'>module_paths</span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="try_load_module-instance_method">
|
||||
|
||||
#<strong>try_load_module</strong>(parent_path, type, reference_name, cached_metadata: nil) ⇒ <tt>Boolean</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Returns True if loaded, false otherwise.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
<p class="tag_title">Parameters:</p>
|
||||
<ul class="param">
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>parent_path</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>String</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>Root directory to load modules from</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>reference_name</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>String</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>THe module reference name, without the type prefix</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>type</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>String</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>Such as auxiliary, exploit, etc</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>cached_metadata</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>nil</tt>, <tt><span class='object_link'><a href="../Modules/Metadata/Obj.html" title="Msf::Modules::Metadata::Obj (class)">Msf::Modules::Metadata::Obj</a></span></tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p class="tag_title">Returns:</p>
|
||||
<ul class="return">
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Boolean</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>True if loaded, false otherwise</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
104
|
||||
105
|
||||
106
|
||||
107
|
||||
108
|
||||
109
|
||||
110
|
||||
111
|
||||
112
|
||||
113
|
||||
114
|
||||
115
|
||||
116</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/cache.rb', line 104</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_try_load_module'>try_load_module</span><span class='lparen'>(</span><span class='id identifier rubyid_parent_path'>parent_path</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_reference_name'>reference_name</span><span class='comma'>,</span> <span class='label'>cached_metadata:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_loaded'>loaded</span> <span class='op'>=</span> <span class='kw'>false</span>
|
||||
<span class='comment'># XXX borked
|
||||
</span> <span class='id identifier rubyid_loaders'>loaders</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_loader'>loader</span><span class='op'>|</span>
|
||||
<span class='kw'>if</span> <span class='id identifier rubyid_loader'>loader</span><span class='period'>.</span><span class='id identifier rubyid_loadable_module?'>loadable_module?</span><span class='lparen'>(</span><span class='id identifier rubyid_parent_path'>parent_path</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_reference_name'>reference_name</span><span class='comma'>,</span> <span class='label'>cached_metadata:</span> <span class='id identifier rubyid_cached_metadata'>cached_metadata</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_loaded'>loaded</span> <span class='op'>=</span> <span class='id identifier rubyid_loader'>loader</span><span class='period'>.</span><span class='id identifier rubyid_load_module'>load_module</span><span class='lparen'>(</span><span class='id identifier rubyid_parent_path'>parent_path</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_reference_name'>reference_name</span><span class='comma'>,</span> <span class='label'>force:</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>cached_metadata:</span> <span class='id identifier rubyid_cached_metadata'>cached_metadata</span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='kw'>break</span> <span class='kw'>if</span> <span class='id identifier rubyid_loaded'>loaded</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='id identifier rubyid_loaded'>loaded</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri May 8 17:01:36 2026 by
|
||||
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.37 (ruby-3.1.5).
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,1236 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Module: Msf::ModuleManager::Loading
|
||||
|
||||
— Documentation by YARD 0.9.37
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = "Msf::ModuleManager::Loading";
|
||||
relpath = '../../';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="../../_index.html">Index (L)</a> »
|
||||
<span class='title'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span> » <span class='title'><span class='object_link'><a href="../ModuleManager.html" title="Msf::ModuleManager (class)">ModuleManager</a></span></span>
|
||||
»
|
||||
<span class="title">Loading</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="class_list_link"
|
||||
href="../../class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1>Module: Msf::ModuleManager::Loading
|
||||
|
||||
|
||||
|
||||
</h1>
|
||||
<div class="box_info">
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Extended by:</dt>
|
||||
<dd>ActiveSupport::Concern</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Included in:</dt>
|
||||
<dd><span class='object_link'><a href="../ModuleManager.html" title="Msf::ModuleManager (class)">Msf::ModuleManager</a></span></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Defined in:</dt>
|
||||
<dd>lib/msf/core/module_manager/loading.rb</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
<h2>Overview</h2><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Project</p>
|
||||
|
||||
<p>Deals with loading modules for the <span class='object_link'><a href="../ModuleManager.html" title="Msf::ModuleManager (class)">Msf::ModuleManager</a></span></p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<h2>
|
||||
Constant Summary
|
||||
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
||||
</h2>
|
||||
|
||||
<dl class="constants">
|
||||
|
||||
<dt id="LOADER_CLASSES-constant" class="">LOADER_CLASSES =
|
||||
<div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Classes that can be used to load modules.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div>
|
||||
</dt>
|
||||
<dd><pre class="code"><span class='lbracket'>[</span>
|
||||
<span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules.html" title="Msf::Modules (module)">Modules</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules/Loader.html" title="Msf::Modules::Loader (module)">Loader</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules/Loader/Directory.html" title="Msf::Modules::Loader::Directory (class)">Directory</a></span></span><span class='comma'>,</span>
|
||||
<span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules.html" title="Msf::Modules (module)">Modules</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules/Loader.html" title="Msf::Modules::Loader (module)">Loader</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules/Loader/Executable.html" title="Msf::Modules::Loader::Executable (class)">Executable</a></span></span> <span class='comment'># TODO: XXX: When this is the first loader we can load normal exploits, but not payloads
|
||||
</span><span class='rbracket'>]</span></pre></dd>
|
||||
|
||||
<dt id="DIRECTORY_BY_TYPE-constant" class="">DIRECTORY_BY_TYPE =
|
||||
<div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Maps module type directory to its module type.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div>
|
||||
</dt>
|
||||
<dd><pre class="code"><span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules.html" title="Msf::Modules (module)">Modules</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules/Loader.html" title="Msf::Modules::Loader (module)">Loader</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules/Loader/Base.html" title="Msf::Modules::Loader::Base (class)">Base</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules/Loader/Base.html#DIRECTORY_BY_TYPE-constant" title="Msf::Modules::Loader::Base::DIRECTORY_BY_TYPE (constant)">DIRECTORY_BY_TYPE</a></span></span></pre></dd>
|
||||
|
||||
<dt id="TYPE_BY_DIRECTORY-constant" class="">TYPE_BY_DIRECTORY =
|
||||
|
||||
</dt>
|
||||
<dd><pre class="code"><span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules.html" title="Msf::Modules (module)">Modules</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules/Loader.html" title="Msf::Modules::Loader (module)">Loader</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules/Loader/Base.html" title="Msf::Modules::Loader::Base (class)">Base</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Modules/Loader/Base.html#TYPE_BY_DIRECTORY-constant" title="Msf::Modules::Loader::Base::TYPE_BY_DIRECTORY (constant)">TYPE_BY_DIRECTORY</a></span></span></pre></dd>
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
||||
<ul class="summary">
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#module_load_error_by_path-instance_method" title="#module_load_error_by_path (instance method)">#<strong>module_load_error_by_path</strong> ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Returns the value of attribute module_load_error_by_path.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#module_load_warnings-instance_method" title="#module_load_warnings (instance method)">#<strong>module_load_warnings</strong> ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Returns the value of attribute module_load_warnings.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>
|
||||
Instance Method Summary
|
||||
<small><a href="#" class="summary_toggle">collapse</a></small>
|
||||
</h2>
|
||||
|
||||
<ul class="summary">
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#file_changed%3F-instance_method" title="#file_changed? (instance method)">#<strong>file_changed?</strong>(path) ⇒ Boolean </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'></div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="protected ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#get_module_error-instance_method" title="#get_module_error (instance method)">#<strong>get_module_error</strong>(module_reference_name, type) ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
<span class="note title protected">protected</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Get a specific modules errors from the supplied module_reference_name and type.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#load_error_by_name-instance_method" title="#load_error_by_name (instance method)">#<strong>load_error_by_name</strong>(name) ⇒ error </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Return errors associated with the supplied reference name.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="protected ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#load_modules-instance_method" title="#load_modules (instance method)">#<strong>load_modules</strong>(path, options = {}) ⇒ Hash{String => Integer} </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
<span class="note title protected">protected</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Load all of the modules from the supplied directory or archive.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="protected ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#loaders-instance_method" title="#loaders (instance method)">#<strong>loaders</strong> ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
<span class="note title protected">protected</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Return list of <span class='object_link'><a href="#LOADER_CLASSES-constant" title="Msf::ModuleManager::Loading::LOADER_CLASSES (constant)">LOADER_CLASSES</a></span> instances that load modules into this module manager.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#on_module_load-instance_method" title="#on_module_load (instance method)">#<strong>on_module_load</strong>(class_or_module, type, reference_name, info = {}) ⇒ void </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Called when a module is initially loaded such that it can be categorized accordingly.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="instance_attr_details" class="attr_details">
|
||||
<h2>Instance Attribute Details</h2>
|
||||
|
||||
|
||||
<span id="module_load_error_by_path=-instance_method"></span>
|
||||
<div class="method_details first">
|
||||
<h3 class="signature first" id="module_load_error_by_path-instance_method">
|
||||
|
||||
#<strong>module_load_error_by_path</strong> ⇒ <tt>Object</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Returns the value of attribute module_load_error_by_path.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
90
|
||||
91
|
||||
92</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/loading.rb', line 90</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_module_load_error_by_path'>module_load_error_by_path</span>
|
||||
<span class='ivar'>@module_load_error_by_path</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<span id="module_load_warnings=-instance_method"></span>
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="module_load_warnings-instance_method">
|
||||
|
||||
#<strong>module_load_warnings</strong> ⇒ <tt>Object</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Returns the value of attribute module_load_warnings.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
90
|
||||
91
|
||||
92</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/loading.rb', line 90</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_module_load_warnings'>module_load_warnings</span>
|
||||
<span class='ivar'>@module_load_warnings</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="instance_method_details" class="method_details_list">
|
||||
<h2>Instance Method Details</h2>
|
||||
|
||||
|
||||
<div class="method_details first">
|
||||
<h3 class="signature first" id="file_changed?-instance_method">
|
||||
|
||||
#<strong>file_changed?</strong>(path) ⇒ <tt>Boolean</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
<p class="tag_title">Returns:</p>
|
||||
<ul class="return">
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Boolean</tt>)</span>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
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</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/loading.rb', line 28</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_file_changed?'>file_changed?</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_changed'>changed</span> <span class='op'>=</span> <span class='kw'>false</span>
|
||||
|
||||
<span class='id identifier rubyid_module_info'>module_info</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_module_info_by_path'>module_info_by_path</span><span class='lbracket'>[</span><span class='id identifier rubyid_path'>path</span><span class='rbracket'>]</span>
|
||||
|
||||
<span class='comment'># if uncached then it counts as changed
|
||||
</span> <span class='comment'># Payloads can't be cached due to stage/stager matching
|
||||
</span> <span class='kw'>if</span> <span class='id identifier rubyid_module_info'>module_info</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='id identifier rubyid_module_info'>module_info</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Msf.html#MODULE_PAYLOAD-constant" title="Msf::MODULE_PAYLOAD (constant)">MODULE_PAYLOAD</a></span></span>
|
||||
<span class='id identifier rubyid_changed'>changed</span> <span class='op'>=</span> <span class='kw'>true</span>
|
||||
<span class='kw'>else</span>
|
||||
<span class='kw'>begin</span>
|
||||
<span class='id identifier rubyid_current_modification_time'>current_modification_time</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_mtime'>mtime</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
||||
<span class='kw'>rescue</span> <span class='op'>::</span><span class='const'>Errno</span><span class='op'>::</span><span class='const'>ENOENT</span>
|
||||
<span class='comment'># if the file does not exist now, that's a change
|
||||
</span> <span class='id identifier rubyid_changed'>changed</span> <span class='op'>=</span> <span class='kw'>true</span>
|
||||
<span class='kw'>else</span>
|
||||
<span class='id identifier rubyid_cached_modification_time'>cached_modification_time</span> <span class='op'>=</span> <span class='id identifier rubyid_module_info'>module_info</span><span class='lbracket'>[</span><span class='symbol'>:modification_time</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
|
||||
|
||||
<span class='comment'># if the file's modification time's different from the cache, then it's changed
|
||||
</span> <span class='kw'>if</span> <span class='id identifier rubyid_current_modification_time'>current_modification_time</span> <span class='op'>!=</span> <span class='id identifier rubyid_cached_modification_time'>cached_modification_time</span>
|
||||
<span class='id identifier rubyid_changed'>changed</span> <span class='op'>=</span> <span class='kw'>true</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='id identifier rubyid_changed'>changed</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="get_module_error-instance_method">
|
||||
|
||||
#<strong>get_module_error</strong>(module_reference_name, type) ⇒ <tt>Object</tt> <span class="extras">(protected)</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Get a specific modules errors from the supplied module_reference_name and type</p>
|
||||
|
||||
<p>These @params will the be used to loop through ‘module_info_by_path` [Hash] to check for any matching modules paths. This path becomes the key and returns the associated error.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
<p class="tag_title">Parameters:</p>
|
||||
<ul class="param">
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>module_reference_name</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>String</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>e.g. 'scanner/msmail/host_id'</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>type</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>String</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>this will be the type of module e.g. 'auxiliary'</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
186
|
||||
187
|
||||
188
|
||||
189
|
||||
190
|
||||
191
|
||||
192
|
||||
193</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/loading.rb', line 186</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_get_module_error'>get_module_error</span><span class='lparen'>(</span><span class='id identifier rubyid_module_reference_name'>module_reference_name</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_module_info_by_path'>module_info_by_path</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_mod_path'>mod_path</span><span class='comma'>,</span> <span class='id identifier rubyid_module_value'>module_value</span><span class='op'>|</span>
|
||||
<span class='kw'>if</span> <span class='id identifier rubyid_module_value'>module_value</span><span class='lbracket'>[</span><span class='symbol'>:reference_name</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='id identifier rubyid_module_reference_name'>module_reference_name</span> <span class='op'>&&</span> <span class='id identifier rubyid_module_value'>module_value</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='id identifier rubyid_type'>type</span>
|
||||
<span class='kw'>return</span> <span class='id identifier rubyid_module_load_error_by_path'>module_load_error_by_path</span><span class='lbracket'>[</span><span class='id identifier rubyid_mod_path'>mod_path</span><span class='rbracket'>]</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='kw'>nil</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="load_error_by_name-instance_method">
|
||||
|
||||
#<strong>load_error_by_name</strong>(name) ⇒ <tt>error</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Return errors associated with the supplied reference name.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
<p class="tag_title">Parameters:</p>
|
||||
<ul class="param">
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>name</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>String</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>e.g. 'auxiliary/scanner/msmail/host_id' It may optionally be prefixed with a "<type>/", in which case we will pass it to 'get_module_error(module_reference_name, type)`. Otherwise, we step through all sets until we find one that matches.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p class="tag_title">Returns:</p>
|
||||
<ul class="return">
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>error</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>which will return either an error or nil.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
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</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/loading.rb', line 64</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_load_error_by_name'>load_error_by_name</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
||||
<span class='kw'>return</span> <span class='id identifier rubyid_load_error_by_name'>load_error_by_name</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_aliases'>aliases</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_aliases'>aliases</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span>
|
||||
<span class='id identifier rubyid_names'>names</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_potential_type_or_directory'>potential_type_or_directory</span> <span class='op'>=</span> <span class='id identifier rubyid_names'>names</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
|
||||
|
||||
<span class='kw'>if</span> <span class='const'><span class='object_link'><a href="#DIRECTORY_BY_TYPE-constant" title="Msf::ModuleManager::Loading::DIRECTORY_BY_TYPE (constant)">DIRECTORY_BY_TYPE</a></span></span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span> <span class='id identifier rubyid_potential_type_or_directory'>potential_type_or_directory</span>
|
||||
<span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='id identifier rubyid_potential_type_or_directory'>potential_type_or_directory</span>
|
||||
<span class='comment'># if first name is a type directory
|
||||
</span> <span class='kw'>else</span>
|
||||
<span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#TYPE_BY_DIRECTORY-constant" title="Msf::ModuleManager::Loading::TYPE_BY_DIRECTORY (constant)">TYPE_BY_DIRECTORY</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_potential_type_or_directory'>potential_type_or_directory</span><span class='rbracket'>]</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='id identifier rubyid_error'>error</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
||||
<span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span>
|
||||
<span class='id identifier rubyid_module_reference_name'>module_reference_name</span> <span class='op'>=</span> <span class='id identifier rubyid_names'>names</span><span class='lbracket'>[</span><span class='int'>1</span> <span class='op'>..</span> <span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_join'><span class='object_link'><a href="../../top-level-namespace.html#join-instance_method" title="#join (method)">join</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_error'>error</span> <span class='op'>=</span> <span class='id identifier rubyid_get_module_error'>get_module_error</span><span class='lparen'>(</span><span class='id identifier rubyid_module_reference_name'>module_reference_name</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
||||
<span class='kw'>else</span>
|
||||
<span class='id identifier rubyid_module_set_by_type'>module_set_by_type</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid__set'>_set</span><span class='op'>|</span>
|
||||
<span class='id identifier rubyid_module_reference_name'>module_reference_name</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
||||
<span class='id identifier rubyid_error'>error</span> <span class='op'>=</span> <span class='id identifier rubyid_load_error_by_name'>load_error_by_name</span><span class='lparen'>(</span><span class='id identifier rubyid_module_reference_name'>module_reference_name</span><span class='rparen'>)</span>
|
||||
<span class='kw'>break</span> <span class='kw'>if</span> <span class='id identifier rubyid_error'>error</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='id identifier rubyid_error'>error</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="load_modules-instance_method">
|
||||
|
||||
#<strong>load_modules</strong>(path, options = {}) ⇒ <tt>Hash{String => Integer}</tt> <span class="extras">(protected)</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Load all of the modules from the supplied directory or archive</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
<p class="tag_title">Parameters:</p>
|
||||
<ul class="param">
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>path</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>String</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>Path to a directory</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>options</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Hash</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="tag_title">Options Hash (<tt>options</tt>):</p>
|
||||
<ul class="option">
|
||||
|
||||
<li>
|
||||
<span class="name">:force</span>
|
||||
<span class="type">(<tt>Boolean</tt>)</span>
|
||||
<span class="default">
|
||||
|
||||
</span>
|
||||
|
||||
— <div class='inline'>
|
||||
<p>Whether the force loading the modules even if they are unchanged and already loaded.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class="name">:modules</span>
|
||||
<span class="type">(<tt>Array</tt>)</span>
|
||||
<span class="default">
|
||||
|
||||
</span>
|
||||
|
||||
— <div class='inline'>
|
||||
<p>An array of regex patterns to search for specific modules</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<p class="tag_title">Returns:</p>
|
||||
<ul class="return">
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Hash{String => Integer}</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>Maps module type to number of modules loaded</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
163
|
||||
164
|
||||
165
|
||||
166
|
||||
167
|
||||
168
|
||||
169
|
||||
170
|
||||
171
|
||||
172
|
||||
173
|
||||
174
|
||||
175
|
||||
176
|
||||
177</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/loading.rb', line 163</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_load_modules'>load_modules</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_assert_valid_keys'>assert_valid_keys</span><span class='lparen'>(</span><span class='symbol'>:force</span><span class='comma'>,</span> <span class='symbol'>:whitelist</span><span class='comma'>,</span> <span class='symbol'>:recalculate</span><span class='rparen'>)</span>
|
||||
|
||||
<span class='id identifier rubyid_count_by_type'>count_by_type</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
||||
|
||||
<span class='id identifier rubyid_loaders'>loaders</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_loader'>loader</span><span class='op'>|</span>
|
||||
<span class='kw'>if</span> <span class='id identifier rubyid_loader'>loader</span><span class='period'>.</span><span class='id identifier rubyid_loadable?'>loadable?</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_count_by_type'>count_by_type</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_loader'>loader</span><span class='period'>.</span><span class='id identifier rubyid_load_modules'>load_modules</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_prev'>prev</span><span class='comma'>,</span> <span class='id identifier rubyid_now'>now</span><span class='op'>|</span>
|
||||
<span class='id identifier rubyid_prev'>prev</span> <span class='op'>+</span> <span class='id identifier rubyid_now'>now</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='id identifier rubyid_count_by_type'>count_by_type</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="loaders-instance_method">
|
||||
|
||||
#<strong>loaders</strong> ⇒ <tt>Object</tt> <span class="extras">(protected)</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Return list of <span class='object_link'><a href="#LOADER_CLASSES-constant" title="Msf::ModuleManager::Loading::LOADER_CLASSES (constant)">LOADER_CLASSES</a></span> instances that load modules into this module manager</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
145
|
||||
146
|
||||
147
|
||||
148
|
||||
149
|
||||
150
|
||||
151
|
||||
152
|
||||
153</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/loading.rb', line 145</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_loaders'>loaders</span>
|
||||
<span class='kw'>unless</span> <span class='id identifier rubyid_instance_variable_defined?'>instance_variable_defined?</span> <span class='symbol'>:@loaders</span>
|
||||
<span class='ivar'>@loaders</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#LOADER_CLASSES-constant" title="Msf::ModuleManager::Loading::LOADER_CLASSES (constant)">LOADER_CLASSES</a></span></span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_klass'>klass</span><span class='op'>|</span>
|
||||
<span class='id identifier rubyid_klass'>klass</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
|
||||
<span class='rbrace'>}</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='ivar'>@loaders</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="on_module_load-instance_method">
|
||||
|
||||
#<strong>on_module_load</strong>(class_or_module, type, reference_name, info = {}) ⇒ <tt>void</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
<p class="note returns_void">This method returns an undefined value.</p>
|
||||
<p>Called when a module is initially loaded such that it can be categorized accordingly.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
<p class="tag_title">Parameters:</p>
|
||||
<ul class="param">
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>class_or_module</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Class<<span class='object_link'><a href="../Module.html" title="Msf::Module (class)">Msf::Module</a></span>></tt>, <tt>::Module</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>either a module Class or a payload Module.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>type</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>String</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>The module type.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>reference_name</span>
|
||||
|
||||
|
||||
<span class='type'></span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>The module reference name.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>info</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Hash{String => Array}</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>additional information about the module</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="tag_title">Options Hash (<tt>info</tt>):</p>
|
||||
<ul class="option">
|
||||
|
||||
<li>
|
||||
<span class="name">'files'</span>
|
||||
<span class="type">(<tt>Array<String></tt>)</span>
|
||||
<span class="default">
|
||||
|
||||
</span>
|
||||
|
||||
— <div class='inline'>
|
||||
<p>List of paths to the ruby source files where <code>class_or_module</code> is defined.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class="name">'paths'</span>
|
||||
<span class="type">(<tt>Array<String></tt>)</span>
|
||||
<span class="default">
|
||||
|
||||
</span>
|
||||
|
||||
— <div class='inline'>
|
||||
<p>List of module reference names.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class="name">'type'</span>
|
||||
<span class="type">(<tt>String</tt>)</span>
|
||||
<span class="default">
|
||||
|
||||
</span>
|
||||
|
||||
— <div class='inline'>
|
||||
<p>The module type, should match positional <code>type</code> argument.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
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</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/loading.rb', line 106</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_on_module_load'>on_module_load</span><span class='lparen'>(</span><span class='id identifier rubyid_class_or_module'>class_or_module</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_reference_name'>reference_name</span><span class='comma'>,</span> <span class='id identifier rubyid_info'>info</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_module_set'>module_set</span> <span class='op'>=</span> <span class='id identifier rubyid_module_set_by_type'>module_set_by_type</span><span class='lbracket'>[</span><span class='id identifier rubyid_type'>type</span><span class='rbracket'>]</span>
|
||||
<span class='id identifier rubyid_module_set'>module_set</span><span class='period'>.</span><span class='id identifier rubyid_add_module'>add_module</span><span class='lparen'>(</span><span class='id identifier rubyid_class_or_module'>class_or_module</span><span class='comma'>,</span> <span class='id identifier rubyid_reference_name'>reference_name</span><span class='comma'>,</span> <span class='id identifier rubyid_info'>info</span><span class='rparen'>)</span>
|
||||
|
||||
<span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='id identifier rubyid_info'>info</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>files</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
|
||||
<span class='id identifier rubyid_cache_in_memory'>cache_in_memory</span><span class='lparen'>(</span>
|
||||
<span class='id identifier rubyid_class_or_module'>class_or_module</span><span class='comma'>,</span>
|
||||
<span class='symbol'>:path</span> <span class='op'>=></span> <span class='id identifier rubyid_path'>path</span><span class='comma'>,</span>
|
||||
<span class='symbol'>:reference_name</span> <span class='op'>=></span> <span class='id identifier rubyid_reference_name'>reference_name</span><span class='comma'>,</span>
|
||||
<span class='symbol'>:type</span> <span class='op'>=></span> <span class='id identifier rubyid_type'>type</span>
|
||||
<span class='rparen'>)</span>
|
||||
|
||||
<span class='comment'># Automatically subscribe a wrapper around this module to the necessary
|
||||
</span> <span class='comment'># event providers based on whatever events it wishes to receive.
|
||||
</span> <span class='id identifier rubyid_auto_subscribe_module'>auto_subscribe_module</span><span class='lparen'>(</span><span class='id identifier rubyid_class_or_module'>class_or_module</span><span class='rparen'>)</span>
|
||||
|
||||
<span class='comment'># Notify the framework that a module was loaded
|
||||
</span> <span class='id identifier rubyid_framework'>framework</span><span class='period'>.</span><span class='id identifier rubyid_events'>events</span><span class='period'>.</span><span class='id identifier rubyid_on_module_load'>on_module_load</span><span class='lparen'>(</span><span class='id identifier rubyid_reference_name'>reference_name</span><span class='comma'>,</span> <span class='id identifier rubyid_class_or_module'>class_or_module</span><span class='rparen'>)</span>
|
||||
|
||||
<span class='comment'># Clear and add aliases, if any (payloads cannot)
|
||||
</span>
|
||||
<span class='kw'>if</span> <span class='id identifier rubyid_class_or_module'>class_or_module</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:realname</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_aliased_as'>aliased_as</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_inv_aliases'>inv_aliases</span><span class='lbracket'>[</span><span class='id identifier rubyid_class_or_module'>class_or_module</span><span class='period'>.</span><span class='id identifier rubyid_realname'>realname</span><span class='rbracket'>]</span>
|
||||
<span class='id identifier rubyid_aliased_as'>aliased_as</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span>
|
||||
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_aliases'>aliases</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='id identifier rubyid_a'>a</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_inv_aliases'>inv_aliases</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='id identifier rubyid_class_or_module'>class_or_module</span><span class='period'>.</span><span class='id identifier rubyid_realname'>realname</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='kw'>if</span> <span class='id identifier rubyid_class_or_module'>class_or_module</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span> <span class='symbol'>:aliases</span>
|
||||
<span class='id identifier rubyid_class_or_module'>class_or_module</span><span class='period'>.</span><span class='id identifier rubyid_aliases'>aliases</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span>
|
||||
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_aliases'>aliases</span><span class='lbracket'>[</span><span class='id identifier rubyid_a'>a</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_class_or_module'>class_or_module</span><span class='period'>.</span><span class='id identifier rubyid_realname'>realname</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_inv_aliases'>inv_aliases</span><span class='lbracket'>[</span><span class='id identifier rubyid_class_or_module'>class_or_module</span><span class='period'>.</span><span class='id identifier rubyid_realname'>realname</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_class_or_module'>class_or_module</span><span class='period'>.</span><span class='id identifier rubyid_aliases'>aliases</span> <span class='kw'>unless</span> <span class='id identifier rubyid_class_or_module'>class_or_module</span><span class='period'>.</span><span class='id identifier rubyid_aliases'>aliases</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri May 8 17:01:46 2026 by
|
||||
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.37 (ruby-3.1.5).
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,488 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Module: Msf::ModuleManager::ModulePaths
|
||||
|
||||
— Documentation by YARD 0.9.37
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = "Msf::ModuleManager::ModulePaths";
|
||||
relpath = '../../';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="../../_index.html">Index (M)</a> »
|
||||
<span class='title'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span> » <span class='title'><span class='object_link'><a href="../ModuleManager.html" title="Msf::ModuleManager (class)">ModuleManager</a></span></span>
|
||||
»
|
||||
<span class="title">ModulePaths</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="class_list_link"
|
||||
href="../../class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1>Module: Msf::ModuleManager::ModulePaths
|
||||
|
||||
|
||||
|
||||
</h1>
|
||||
<div class="box_info">
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Extended by:</dt>
|
||||
<dd>ActiveSupport::Concern</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Included in:</dt>
|
||||
<dd><span class='object_link'><a href="../ModuleManager.html" title="Msf::ModuleManager (class)">Msf::ModuleManager</a></span></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Defined in:</dt>
|
||||
<dd>lib/msf/core/module_manager/module_paths.rb</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
<h2>Overview</h2><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Deals with module paths in the <span class='object_link'><a href="../ModuleManager.html" title="Msf::ModuleManager (class)">Msf::ModuleManager</a></span></p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
||||
<ul class="summary">
|
||||
|
||||
<li class="protected ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#module_paths-instance_method" title="#module_paths (instance method)">#<strong>module_paths</strong> ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="note title protected">protected</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>:nodoc:.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>
|
||||
Instance Method Summary
|
||||
<small><a href="#" class="summary_toggle">collapse</a></small>
|
||||
</h2>
|
||||
|
||||
<ul class="summary">
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#add_module_path-instance_method" title="#add_module_path (instance method)">#<strong>add_module_path</strong>(path, opts = {}, recalculate: true) ⇒ Hash{String => Integer} </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Adds a path to be searched for new modules.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#remove_module_path-instance_method" title="#remove_module_path (instance method)">#<strong>remove_module_path</strong>(path) ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Removes a path from which to search for modules.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="instance_attr_details" class="attr_details">
|
||||
<h2>Instance Attribute Details</h2>
|
||||
|
||||
|
||||
<span id="module_paths=-instance_method"></span>
|
||||
<div class="method_details first">
|
||||
<h3 class="signature first" id="module_paths-instance_method">
|
||||
|
||||
#<strong>module_paths</strong> ⇒ <tt>Object</tt> <span class="extras">(protected)</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>:nodoc:</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
63
|
||||
64
|
||||
65</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/module_paths.rb', line 63</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_module_paths'>module_paths</span>
|
||||
<span class='ivar'>@module_paths</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="instance_method_details" class="method_details_list">
|
||||
<h2>Instance Method Details</h2>
|
||||
|
||||
|
||||
<div class="method_details first">
|
||||
<h3 class="signature first" id="add_module_path-instance_method">
|
||||
|
||||
#<strong>add_module_path</strong>(path, opts = {}, recalculate: true) ⇒ <tt>Hash{String => Integer}</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Adds a path to be searched for new modules.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
<p class="tag_title">Parameters:</p>
|
||||
<ul class="param">
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>path</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>String</tt>)</span>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>opts</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Hash</tt>)</span>
|
||||
|
||||
|
||||
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="tag_title">Options Hash (<tt>opts</tt>):</p>
|
||||
<ul class="option">
|
||||
|
||||
<li>
|
||||
<span class="name">whitelist</span>
|
||||
<span class="type">(<tt>Array</tt>)</span>
|
||||
<span class="default">
|
||||
|
||||
</span>
|
||||
|
||||
— <div class='inline'>
|
||||
<p>An array of regex patterns to search for specific modules</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="tag_title">Returns:</p>
|
||||
<ul class="return">
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Hash{String => Integer}</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>Maps module type to number of modules loaded</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
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</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/module_paths.rb', line 19</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_add_module_path'>add_module_path</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='label'>recalculate:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_nested_paths'>nested_paths</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
||||
|
||||
<span class='comment'># remove trailing file separator
|
||||
</span> <span class='id identifier rubyid_path_without_trailing_file_separator'>path_without_trailing_file_separator</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_sub'>sub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='embexpr_beg'>#{</span><span class='const'>File</span><span class='op'>::</span><span class='const'>SEPARATOR</span><span class='embexpr_end'>}</span><span class='tstring_content'>$</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
||||
|
||||
<span class='comment'># Make the path completely canonical
|
||||
</span> <span class='id identifier rubyid_pathname'>pathname</span> <span class='op'>=</span> <span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_path_without_trailing_file_separator'>path_without_trailing_file_separator</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span>
|
||||
|
||||
<span class='comment'># Make sure the path is a valid directory
|
||||
</span> <span class='kw'>unless</span> <span class='id identifier rubyid_pathname'>pathname</span><span class='period'>.</span><span class='id identifier rubyid_directory?'>directory?</span>
|
||||
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>The path supplied is not a valid directory.</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_caller'>caller</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='id identifier rubyid_nested_paths'>nested_paths</span> <span class='op'><<</span> <span class='id identifier rubyid_pathname'>pathname</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
||||
|
||||
<span class='comment'># Update the module paths appropriately
|
||||
</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_module_paths'>module_paths</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_module_paths'>module_paths</span> <span class='op'>+</span> <span class='id identifier rubyid_nested_paths'>nested_paths</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>.</span><span class='id identifier rubyid_uniq'>uniq</span>
|
||||
|
||||
<span class='comment'># Load all of the modules from the nested paths
|
||||
</span> <span class='id identifier rubyid_count_by_type'>count_by_type</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
||||
<span class='id identifier rubyid_nested_paths'>nested_paths</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_path'>path</span><span class='op'>|</span>
|
||||
<span class='id identifier rubyid_path_count_by_type'>path_count_by_type</span> <span class='op'>=</span> <span class='id identifier rubyid_load_modules'>load_modules</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='symbol'>:force</span> <span class='op'>=></span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>recalculate:</span> <span class='id identifier rubyid_recalculate'>recalculate</span><span class='rbrace'>}</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
||||
|
||||
<span class='comment'># merge hashes
|
||||
</span> <span class='id identifier rubyid_path_count_by_type'>path_count_by_type</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_path_count'>path_count</span><span class='op'>|</span>
|
||||
<span class='id identifier rubyid_accumulated_count'>accumulated_count</span> <span class='op'>=</span> <span class='id identifier rubyid_count_by_type'>count_by_type</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='int'>0</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_count_by_type'>count_by_type</span><span class='lbracket'>[</span><span class='id identifier rubyid_type'>type</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_accumulated_count'>accumulated_count</span> <span class='op'>+</span> <span class='id identifier rubyid_path_count'>path_count</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='rbrace'>}</span>
|
||||
|
||||
<span class='kw'>return</span> <span class='id identifier rubyid_count_by_type'>count_by_type</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="remove_module_path-instance_method">
|
||||
|
||||
#<strong>remove_module_path</strong>(path) ⇒ <tt>Object</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Removes a path from which to search for modules.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
56
|
||||
57
|
||||
58
|
||||
59</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/module_paths.rb', line 56</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_remove_module_path'>remove_module_path</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_module_paths'>module_paths</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_module_paths'>module_paths</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri May 8 17:02:06 2026 by
|
||||
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.37 (ruby-3.1.5).
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,1079 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Module: Msf::ModuleManager::ModuleSets
|
||||
|
||||
— Documentation by YARD 0.9.37
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = "Msf::ModuleManager::ModuleSets";
|
||||
relpath = '../../';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="../../_index.html">Index (M)</a> »
|
||||
<span class='title'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span> » <span class='title'><span class='object_link'><a href="../ModuleManager.html" title="Msf::ModuleManager (class)">ModuleManager</a></span></span>
|
||||
»
|
||||
<span class="title">ModuleSets</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="class_list_link"
|
||||
href="../../class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1>Module: Msf::ModuleManager::ModuleSets
|
||||
|
||||
|
||||
|
||||
</h1>
|
||||
<div class="box_info">
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Extended by:</dt>
|
||||
<dd>ActiveSupport::Concern</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Included in:</dt>
|
||||
<dd><span class='object_link'><a href="../ModuleManager.html" title="Msf::ModuleManager (class)">Msf::ModuleManager</a></span></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Defined in:</dt>
|
||||
<dd>lib/msf/core/module_manager/module_sets.rb</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
<h2>Overview</h2><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Concerns the various type-specific module sets in a <span class='object_link'><a href="../ModuleManager.html" title="Msf::ModuleManager (class)">Msf::ModuleManager</a></span></p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
||||
<ul class="summary">
|
||||
|
||||
<li class="protected ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#enablement_by_type-instance_method" title="#enablement_by_type (instance method)">#<strong>enablement_by_type</strong> ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="note title protected">protected</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>:nodoc:.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="protected ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#module_set_by_type-instance_method" title="#module_set_by_type (instance method)">#<strong>module_set_by_type</strong> ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="note title protected">protected</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>:nodoc:.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>
|
||||
Instance Method Summary
|
||||
<small><a href="#" class="summary_toggle">collapse</a></small>
|
||||
</h2>
|
||||
|
||||
<ul class="summary">
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#auxiliary-instance_method" title="#auxiliary (instance method)">#<strong>auxiliary</strong> ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Returns the set of loaded auxiliary module classes.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#encoders-instance_method" title="#encoders (instance method)">#<strong>encoders</strong> ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Returns the set of loaded encoder module classes.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#evasion-instance_method" title="#evasion (instance method)">#<strong>evasion</strong> ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'></div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#exploits-instance_method" title="#exploits (instance method)">#<strong>exploits</strong> ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Returns the set of loaded exploit module classes.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#init_module_set-instance_method" title="#init_module_set (instance method)">#<strong>init_module_set</strong>(type) ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'></div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#module_names-instance_method" title="#module_names (instance method)">#<strong>module_names</strong>(set) ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Provide a list of module names of a specific type.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#module_set-instance_method" title="#module_set (instance method)">#<strong>module_set</strong>(type) ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Returns all of the modules of the specified type.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#module_types-instance_method" title="#module_types (instance method)">#<strong>module_types</strong> ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Provide a list of the types of modules in the set.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#nops-instance_method" title="#nops (instance method)">#<strong>nops</strong> ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Returns the set of loaded nop module classes.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#payloads-instance_method" title="#payloads (instance method)">#<strong>payloads</strong> ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Returns the set of loaded payload module classes.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#post-instance_method" title="#post (instance method)">#<strong>post</strong> ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Returns the set of loaded auxiliary module classes.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#type_enabled%3F-instance_method" title="#type_enabled? (instance method)">#<strong>type_enabled?</strong>(type) ⇒ Boolean </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'></div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="instance_attr_details" class="attr_details">
|
||||
<h2>Instance Attribute Details</h2>
|
||||
|
||||
|
||||
<span id="enablement_by_type=-instance_method"></span>
|
||||
<div class="method_details first">
|
||||
<h3 class="signature first" id="enablement_by_type-instance_method">
|
||||
|
||||
#<strong>enablement_by_type</strong> ⇒ <tt>Object</tt> <span class="extras">(protected)</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>:nodoc:</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
105
|
||||
106
|
||||
107</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/module_sets.rb', line 105</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_enablement_by_type'>enablement_by_type</span>
|
||||
<span class='ivar'>@enablement_by_type</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<span id="module_set_by_type=-instance_method"></span>
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="module_set_by_type-instance_method">
|
||||
|
||||
#<strong>module_set_by_type</strong> ⇒ <tt>Object</tt> <span class="extras">(protected)</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>:nodoc:</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
106
|
||||
107
|
||||
108</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/module_sets.rb', line 106</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_module_set_by_type'>module_set_by_type</span>
|
||||
<span class='ivar'>@module_set_by_type</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="instance_method_details" class="method_details_list">
|
||||
<h2>Instance Method Details</h2>
|
||||
|
||||
|
||||
<div class="method_details first">
|
||||
<h3 class="signature first" id="auxiliary-instance_method">
|
||||
|
||||
#<strong>auxiliary</strong> ⇒ <tt>Object</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Returns the set of loaded auxiliary module classes.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
20
|
||||
21
|
||||
22</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/module_sets.rb', line 20</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_auxiliary'>auxiliary</span>
|
||||
<span class='id identifier rubyid_module_set'>module_set</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Msf.html#MODULE_AUX-constant" title="Msf::MODULE_AUX (constant)">MODULE_AUX</a></span></span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="encoders-instance_method">
|
||||
|
||||
#<strong>encoders</strong> ⇒ <tt>Object</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Returns the set of loaded encoder module classes.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
27
|
||||
28
|
||||
29</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/module_sets.rb', line 27</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_encoders'>encoders</span>
|
||||
<span class='id identifier rubyid_module_set'>module_set</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Msf.html#MODULE_ENCODER-constant" title="Msf::MODULE_ENCODER (constant)">MODULE_ENCODER</a></span></span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="evasion-instance_method">
|
||||
|
||||
#<strong>evasion</strong> ⇒ <tt>Object</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
95
|
||||
96
|
||||
97</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/module_sets.rb', line 95</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_evasion'>evasion</span>
|
||||
<span class='id identifier rubyid_module_set'>module_set</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Msf.html#MODULE_EVASION-constant" title="Msf::MODULE_EVASION (constant)">MODULE_EVASION</a></span></span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="exploits-instance_method">
|
||||
|
||||
#<strong>exploits</strong> ⇒ <tt>Object</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Returns the set of loaded exploit module classes.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
34
|
||||
35
|
||||
36</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/module_sets.rb', line 34</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_exploits'>exploits</span>
|
||||
<span class='id identifier rubyid_module_set'>module_set</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Msf.html#MODULE_EXPLOIT-constant" title="Msf::MODULE_EXPLOIT (constant)">MODULE_EXPLOIT</a></span></span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="init_module_set-instance_method">
|
||||
|
||||
#<strong>init_module_set</strong>(type) ⇒ <tt>Object</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
38
|
||||
39
|
||||
40
|
||||
41
|
||||
42
|
||||
43
|
||||
44
|
||||
45
|
||||
46
|
||||
47
|
||||
48
|
||||
49
|
||||
50
|
||||
51</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/module_sets.rb', line 38</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_init_module_set'>init_module_set</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
||||
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_enablement_by_type'>enablement_by_type</span><span class='lbracket'>[</span><span class='id identifier rubyid_type'>type</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>true</span>
|
||||
<span class='kw'>case</span> <span class='id identifier rubyid_type'>type</span>
|
||||
<span class='kw'>when</span> <span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Msf.html#MODULE_PAYLOAD-constant" title="Msf::MODULE_PAYLOAD (constant)">MODULE_PAYLOAD</a></span></span>
|
||||
<span class='id identifier rubyid_instance'>instance</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../PayloadSet.html" title="Msf::PayloadSet (class)">PayloadSet</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../PayloadSet.html#initialize-instance_method" title="Msf::PayloadSet#initialize (method)">new</a></span></span>
|
||||
<span class='kw'>else</span>
|
||||
<span class='id identifier rubyid_instance'>instance</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../ModuleSet.html" title="Msf::ModuleSet (class)">ModuleSet</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../ModuleSet.html#initialize-instance_method" title="Msf::ModuleSet#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_module_set_by_type'>module_set_by_type</span><span class='lbracket'>[</span><span class='id identifier rubyid_type'>type</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_instance'>instance</span>
|
||||
|
||||
<span class='comment'># Set the module set's framework reference
|
||||
</span> <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_framework'>framework</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_framework'>framework</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="module_names-instance_method">
|
||||
|
||||
#<strong>module_names</strong>(set) ⇒ <tt>Object</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Provide a list of module names of a specific type</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
56
|
||||
57
|
||||
58</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/module_sets.rb', line 56</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_module_names'>module_names</span><span class='lparen'>(</span><span class='id identifier rubyid_set'>set</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_module_set_by_type'>module_set_by_type</span><span class='lbracket'>[</span><span class='id identifier rubyid_set'>set</span><span class='rbracket'>]</span> <span class='op'>?</span> <span class='id identifier rubyid_module_set_by_type'>module_set_by_type</span><span class='lbracket'>[</span><span class='id identifier rubyid_set'>set</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span> <span class='op'>:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="module_set-instance_method">
|
||||
|
||||
#<strong>module_set</strong>(type) ⇒ <tt>Object</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Returns all of the modules of the specified type</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
63
|
||||
64
|
||||
65</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/module_sets.rb', line 63</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_module_set'>module_set</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_module_set_by_type'>module_set_by_type</span><span class='lbracket'>[</span><span class='id identifier rubyid_type'>type</span><span class='rbracket'>]</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="module_types-instance_method">
|
||||
|
||||
#<strong>module_types</strong> ⇒ <tt>Object</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Provide a list of the types of modules in the set</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
70
|
||||
71
|
||||
72</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/module_sets.rb', line 70</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_module_types'>module_types</span>
|
||||
<span class='id identifier rubyid_module_set_by_type'>module_set_by_type</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="nops-instance_method">
|
||||
|
||||
#<strong>nops</strong> ⇒ <tt>Object</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Returns the set of loaded nop module classes.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
77
|
||||
78
|
||||
79</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/module_sets.rb', line 77</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_nops'>nops</span>
|
||||
<span class='id identifier rubyid_module_set'>module_set</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Msf.html#MODULE_NOP-constant" title="Msf::MODULE_NOP (constant)">MODULE_NOP</a></span></span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="payloads-instance_method">
|
||||
|
||||
#<strong>payloads</strong> ⇒ <tt>Object</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Returns the set of loaded payload module classes.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
84
|
||||
85
|
||||
86</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/module_sets.rb', line 84</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_payloads'>payloads</span>
|
||||
<span class='id identifier rubyid_module_set'>module_set</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Msf.html#MODULE_PAYLOAD-constant" title="Msf::MODULE_PAYLOAD (constant)">MODULE_PAYLOAD</a></span></span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="post-instance_method">
|
||||
|
||||
#<strong>post</strong> ⇒ <tt>Object</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Returns the set of loaded auxiliary module classes.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
91
|
||||
92
|
||||
93</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/module_sets.rb', line 91</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_post'>post</span>
|
||||
<span class='id identifier rubyid_module_set'>module_set</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Msf.html#MODULE_POST-constant" title="Msf::MODULE_POST (constant)">MODULE_POST</a></span></span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="type_enabled?-instance_method">
|
||||
|
||||
#<strong>type_enabled?</strong>(type) ⇒ <tt>Boolean</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
<p class="tag_title">Returns:</p>
|
||||
<ul class="return">
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Boolean</tt>)</span>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
99
|
||||
100
|
||||
101</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/module_sets.rb', line 99</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_type_enabled?'>type_enabled?</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_enablement_by_type'>enablement_by_type</span><span class='lbracket'>[</span><span class='id identifier rubyid_type'>type</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='kw'>false</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri May 8 17:02:02 2026 by
|
||||
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.37 (ruby-3.1.5).
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,709 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Module: Msf::ModuleManager::Reloading
|
||||
|
||||
— Documentation by YARD 0.9.37
|
||||
|
||||
</title>
|
||||
|
||||
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
||||
|
||||
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
pathId = "Msf::ModuleManager::Reloading";
|
||||
relpath = '../../';
|
||||
</script>
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="nav_wrap">
|
||||
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
||||
<div id="resizer"></div>
|
||||
</div>
|
||||
|
||||
<div id="main" tabindex="-1">
|
||||
<div id="header">
|
||||
<div id="menu">
|
||||
|
||||
<a href="../../_index.html">Index (R)</a> »
|
||||
<span class='title'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span> » <span class='title'><span class='object_link'><a href="../ModuleManager.html" title="Msf::ModuleManager (class)">ModuleManager</a></span></span>
|
||||
»
|
||||
<span class="title">Reloading</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="search">
|
||||
|
||||
<a class="full_list_link" id="class_list_link"
|
||||
href="../../class_list.html">
|
||||
|
||||
<svg width="24" height="24">
|
||||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="content"><h1>Module: Msf::ModuleManager::Reloading
|
||||
|
||||
|
||||
|
||||
</h1>
|
||||
<div class="box_info">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Included in:</dt>
|
||||
<dd><span class='object_link'><a href="../ModuleManager.html" title="Msf::ModuleManager (class)">Msf::ModuleManager</a></span></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Defined in:</dt>
|
||||
<dd>lib/msf/core/module_manager/reloading.rb</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
<h2>Overview</h2><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Msf::ModuleManager::Reloading</p>
|
||||
|
||||
<p>Provides methods for reloading Metasploit modules (including payloads, stagers, adapters, stages, etc.), clearing out old aliases, and refreshing the module cache.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>
|
||||
Instance Method Summary
|
||||
<small><a href="#" class="summary_toggle">collapse</a></small>
|
||||
</h2>
|
||||
|
||||
<ul class="summary">
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#manual_reload-instance_method" title="#manual_reload (instance method)">#<strong>manual_reload</strong>(parent_path, type, ref_name) ⇒ Object </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'></div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#reload_module-instance_method" title="#reload_module (instance method)">#<strong>reload_module</strong>(mod) ⇒ Class, Msf::Module </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Reloads the module specified in mod.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#reload_modules-instance_method" title="#reload_modules (instance method)">#<strong>reload_modules</strong> ⇒ Hash{String => Integer} </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Reloads modules from all module paths.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#reload_payload_module-instance_method" title="#reload_payload_module (instance method)">#<strong>reload_payload_module</strong>(mod) ⇒ Class, Msf::Module </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Reload payload module, separately from other categories.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="instance_method_details" class="method_details_list">
|
||||
<h2>Instance Method Details</h2>
|
||||
|
||||
|
||||
<div class="method_details first">
|
||||
<h3 class="signature first" id="manual_reload-instance_method">
|
||||
|
||||
#<strong>manual_reload</strong>(parent_path, type, ref_name) ⇒ <tt>Object</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
51
|
||||
52
|
||||
53</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/reloading.rb', line 51</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_manual_reload'>manual_reload</span><span class='lparen'>(</span><span class='id identifier rubyid_parent_path'>parent_path</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_ref_name'>ref_name</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_loaders'>loaders</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_loader'>loader</span><span class='op'>|</span> <span class='id identifier rubyid_loader'>loader</span><span class='period'>.</span><span class='id identifier rubyid_load_module'>load_module</span><span class='lparen'>(</span><span class='id identifier rubyid_parent_path'>parent_path</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_ref_name'>ref_name</span><span class='comma'>,</span> <span class='lbrace'>{</span> <span class='label'>force:</span> <span class='kw'>true</span> <span class='rbrace'>}</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="reload_module-instance_method">
|
||||
|
||||
#<strong>reload_module</strong>(mod) ⇒ <tt>Class</tt>, <tt><span class='object_link'><a href="../Module.html" title="Msf::Module (class)">Msf::Module</a></span></tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Reloads the module specified in mod. This can either be an instance of a module or a module class.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
<p class="tag_title">Parameters:</p>
|
||||
<ul class="param">
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>mod</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt><span class='object_link'><a href="../Module.html" title="Msf::Module (class)">Msf::Module</a></span></tt>, <tt>Class</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>either an instance of a module or a module class</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p class="tag_title">Returns:</p>
|
||||
<ul class="return">
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Class</tt>, <tt><span class='object_link'><a href="../Module.html" title="Msf::Module (class)">Msf::Module</a></span></tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>original_metasploit_class_or_instance if an instance of the reloaded module cannot be created.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt><span class='object_link'><a href="../Module.html" title="Msf::Module (class)">Msf::Module</a></span></tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>new instance of original_metasploit_class with datastore copied from original_metasploit_instance.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
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</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/reloading.rb', line 13</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_reload_module'>reload_module</span><span class='lparen'>(</span><span class='id identifier rubyid_mod'>mod</span><span class='rparen'>)</span>
|
||||
<span class='comment'># if it's an instance, then get its class
|
||||
</span> <span class='kw'>if</span> <span class='id identifier rubyid_mod'>mod</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Module.html" title="Msf::Module (class)">Module</a></span></span>
|
||||
<span class='id identifier rubyid_metasploit_class'>metasploit_class</span> <span class='op'>=</span> <span class='id identifier rubyid_mod'>mod</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span>
|
||||
<span class='kw'>else</span>
|
||||
<span class='id identifier rubyid_metasploit_class'>metasploit_class</span> <span class='op'>=</span> <span class='id identifier rubyid_mod'>mod</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_aliased_as'>aliased_as</span> <span class='op'>=</span> <span class='id identifier rubyid_inv_aliases'>inv_aliases</span><span class='lbracket'>[</span><span class='id identifier rubyid_metasploit_class'>metasploit_class</span><span class='period'>.</span><span class='id identifier rubyid_fullname'>fullname</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_aliased_as'>aliased_as</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span>
|
||||
<span class='id identifier rubyid_aliases'>aliases</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='id identifier rubyid_a'>a</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='id identifier rubyid_inv_aliases'>inv_aliases</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='id identifier rubyid_metasploit_class'>metasploit_class</span><span class='period'>.</span><span class='id identifier rubyid_fullname'>fullname</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='kw'>if</span> <span class='id identifier rubyid_mod'>mod</span><span class='period'>.</span><span class='id identifier rubyid_payload?'>payload?</span>
|
||||
<span class='kw'>return</span> <span class='id identifier rubyid_reload_payload_module'>reload_payload_module</span><span class='lparen'>(</span><span class='id identifier rubyid_mod'>mod</span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_aliased_as'>aliased_as</span> <span class='op'>=</span> <span class='id identifier rubyid_inv_aliases'>inv_aliases</span><span class='lbracket'>[</span><span class='id identifier rubyid_metasploit_class'>metasploit_class</span><span class='period'>.</span><span class='id identifier rubyid_fullname'>fullname</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_aliased_as'>aliased_as</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span>
|
||||
<span class='id identifier rubyid_aliases'>aliases</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='id identifier rubyid_a'>a</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='id identifier rubyid_inv_aliases'>inv_aliases</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span> <span class='id identifier rubyid_metasploit_class'>metasploit_class</span><span class='period'>.</span><span class='id identifier rubyid_fullname'>fullname</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='id identifier rubyid_namespace_module'>namespace_module</span> <span class='op'>=</span> <span class='id identifier rubyid_metasploit_class'>metasploit_class</span><span class='period'>.</span><span class='id identifier rubyid_module_parent'>module_parent</span>
|
||||
|
||||
<span class='comment'># Check if the namespace module has a loader
|
||||
</span> <span class='kw'>unless</span> <span class='id identifier rubyid_namespace_module'>namespace_module</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:loader</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_elog'><span class='object_link'><a href="../../top-level-namespace.html#elog-instance_method" title="#elog (method)">elog</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Module does not have loader</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
||||
<span class='kw'>return</span> <span class='id identifier rubyid_mod'>mod</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='id identifier rubyid_loader'>loader</span> <span class='op'>=</span> <span class='id identifier rubyid_namespace_module'>namespace_module</span><span class='period'>.</span><span class='id identifier rubyid_loader'>loader</span>
|
||||
<span class='id identifier rubyid_loader'>loader</span><span class='period'>.</span><span class='id identifier rubyid_reload_module'>reload_module</span><span class='lparen'>(</span><span class='id identifier rubyid_mod'>mod</span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="reload_modules-instance_method">
|
||||
|
||||
#<strong>reload_modules</strong> ⇒ <tt>Hash{String => Integer}</tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Reloads modules from all module paths</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
|
||||
<p class="tag_title">Returns:</p>
|
||||
<ul class="return">
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Hash{String => Integer}</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>Maps module type to number of modules loaded</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
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</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/reloading.rb', line 108</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_reload_modules'>reload_modules</span>
|
||||
<span class='id identifier rubyid_enablement_by_type'>enablement_by_type</span><span class='period'>.</span><span class='id identifier rubyid_each_key'>each_key</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_type'>type</span><span class='op'>|</span>
|
||||
<span class='id identifier rubyid_module_set_by_type'>module_set_by_type</span><span class='lbracket'>[</span><span class='id identifier rubyid_type'>type</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_clear'>clear</span>
|
||||
<span class='id identifier rubyid_init_module_set'>init_module_set</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='id identifier rubyid_aliases'>aliases</span><span class='period'>.</span><span class='id identifier rubyid_clear'>clear</span>
|
||||
<span class='id identifier rubyid_inv_aliases'>inv_aliases</span><span class='period'>.</span><span class='id identifier rubyid_clear'>clear</span>
|
||||
|
||||
<span class='comment'># default the count to zero the first time a type is accessed
|
||||
</span> <span class='id identifier rubyid_count_by_type'>count_by_type</span> <span class='op'>=</span> <span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span>
|
||||
|
||||
<span class='id identifier rubyid_framework'>framework</span><span class='period'>.</span><span class='id identifier rubyid_init_module_paths'>init_module_paths</span> <span class='kw'>unless</span> <span class='id identifier rubyid_framework'>framework</span><span class='period'>.</span><span class='id identifier rubyid_module_paths_inited'>module_paths_inited</span>
|
||||
|
||||
<span class='id identifier rubyid_module_paths'>module_paths</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_path'>path</span><span class='op'>|</span>
|
||||
<span class='id identifier rubyid_path_count_by_type'>path_count_by_type</span> <span class='op'>=</span> <span class='id identifier rubyid_load_modules'>load_modules</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='label'>force:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
||||
|
||||
<span class='comment'># merge count with count from other paths
|
||||
</span> <span class='id identifier rubyid_path_count_by_type'>path_count_by_type</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_count'>count</span><span class='op'>|</span>
|
||||
<span class='id identifier rubyid_count_by_type'>count_by_type</span><span class='lbracket'>[</span><span class='id identifier rubyid_type'>type</span><span class='rbracket'>]</span> <span class='op'>+=</span> <span class='id identifier rubyid_count'>count</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='id identifier rubyid_refresh_cache_from_module_files'>refresh_cache_from_module_files</span>
|
||||
|
||||
<span class='id identifier rubyid_count_by_type'>count_by_type</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="reload_payload_module-instance_method">
|
||||
|
||||
#<strong>reload_payload_module</strong>(mod) ⇒ <tt>Class</tt>, <tt><span class='object_link'><a href="../Module.html" title="Msf::Module (class)">Msf::Module</a></span></tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Reload payload module, separately from other categories. This is due to complexity of payload module and due to the fact they don’t follow class structure as rest of the modules.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
<p class="tag_title">Parameters:</p>
|
||||
<ul class="param">
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>mod</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt><span class='object_link'><a href="../Module.html" title="Msf::Module (class)">Msf::Module</a></span></tt>, <tt>Class</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>either an instance of a module or a module class</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p class="tag_title">Returns:</p>
|
||||
<ul class="return">
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Class</tt>, <tt><span class='object_link'><a href="../Module.html" title="Msf::Module (class)">Msf::Module</a></span></tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>original_metasploit_class_or_instance if an instance of the reloaded module cannot be created.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt><span class='object_link'><a href="../Module.html" title="Msf::Module (class)">Msf::Module</a></span></tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>new instance of original_metasploit_class with datastore copied from original_metasploit_instance.</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
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</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/module_manager/reloading.rb', line 58</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='id identifier rubyid_reload_payload_module'>reload_payload_module</span><span class='lparen'>(</span><span class='id identifier rubyid_mod'>mod</span><span class='rparen'>)</span>
|
||||
<span class='kw'>if</span> <span class='id identifier rubyid_mod'>mod</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Module.html" title="Msf::Module (class)">Module</a></span></span>
|
||||
<span class='id identifier rubyid_metasploit_class'>metasploit_class</span> <span class='op'>=</span> <span class='id identifier rubyid_mod'>mod</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span>
|
||||
<span class='id identifier rubyid_original_instance'>original_instance</span> <span class='op'>=</span> <span class='id identifier rubyid_mod'>mod</span>
|
||||
<span class='kw'>else</span>
|
||||
<span class='id identifier rubyid_metasploit_class'>metasploit_class</span> <span class='op'>=</span> <span class='id identifier rubyid_mod'>mod</span>
|
||||
<span class='id identifier rubyid_original_instance'>original_instance</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_module_set'>module_set</span> <span class='op'>=</span> <span class='id identifier rubyid_module_set_by_type'>module_set_by_type</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_metasploit_class'>metasploit_class</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_module_set'>module_set</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_metasploit_class'>metasploit_class</span><span class='period'>.</span><span class='id identifier rubyid_refname'>refname</span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='id identifier rubyid_module_info'>module_info</span> <span class='op'>=</span> <span class='id identifier rubyid_module_info_by_path'>module_info_by_path</span><span class='lbracket'>[</span><span class='id identifier rubyid_metasploit_class'>metasploit_class</span><span class='period'>.</span><span class='id identifier rubyid_file_path'>file_path</span><span class='rbracket'>]</span>
|
||||
<span class='kw'>unless</span> <span class='id identifier rubyid_module_info'>module_info</span> <span class='op'>&&</span> <span class='lparen'>(</span><span class='id identifier rubyid_parent_path'>parent_path</span> <span class='op'>=</span> <span class='id identifier rubyid_module_info'>module_info</span><span class='lbracket'>[</span><span class='symbol'>:parent_path</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_elog'><span class='object_link'><a href="../../top-level-namespace.html#elog-instance_method" title="#elog (method)">elog</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Failed to get parent_path from module object</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
||||
<span class='kw'>return</span> <span class='id identifier rubyid_mod'>mod</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='comment'># reload adapters if any
|
||||
</span> <span class='id identifier rubyid_manual_reload'>manual_reload</span><span class='lparen'>(</span><span class='id identifier rubyid_parent_path'>parent_path</span><span class='comma'>,</span> <span class='id identifier rubyid_module_info'>module_info</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>adapters</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_mod'>mod</span><span class='period'>.</span><span class='id identifier rubyid_adapter_refname'>adapter_refname</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_mod'>mod</span><span class='period'>.</span><span class='id identifier rubyid_adapter_refname'>adapter_refname</span>
|
||||
|
||||
<span class='comment'># reload stagers if any
|
||||
</span> <span class='id identifier rubyid_manual_reload'>manual_reload</span><span class='lparen'>(</span><span class='id identifier rubyid_parent_path'>parent_path</span><span class='comma'>,</span> <span class='id identifier rubyid_module_info'>module_info</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>stagers</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_mod'>mod</span><span class='period'>.</span><span class='id identifier rubyid_stager_refname'>stager_refname</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_mod'>mod</span><span class='period'>.</span><span class='id identifier rubyid_stager_refname'>stager_refname</span>
|
||||
|
||||
<span class='comment'># reload stages if any
|
||||
</span> <span class='id identifier rubyid_manual_reload'>manual_reload</span><span class='lparen'>(</span><span class='id identifier rubyid_parent_path'>parent_path</span><span class='comma'>,</span> <span class='id identifier rubyid_module_info'>module_info</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>stages</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_mod'>mod</span><span class='period'>.</span><span class='id identifier rubyid_stage_refname'>stage_refname</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_mod'>mod</span><span class='period'>.</span><span class='id identifier rubyid_stage_refname'>stage_refname</span>
|
||||
|
||||
<span class='comment'># reload single if any
|
||||
</span> <span class='id identifier rubyid_manual_reload'>manual_reload</span><span class='lparen'>(</span><span class='id identifier rubyid_parent_path'>parent_path</span><span class='comma'>,</span> <span class='id identifier rubyid_module_info'>module_info</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>singles</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_module_info'>module_info</span><span class='lbracket'>[</span><span class='symbol'>:reference_name</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_original_instance'>original_instance</span><span class='period'>.</span><span class='id identifier rubyid_payload_type'>payload_type</span> <span class='op'>==</span> <span class='const'><span class='object_link'><a href="../../Msf.html" title="Msf (module)">Msf</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Payload.html" title="Msf::Payload (class)">Payload</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Payload/Type.html" title="Msf::Payload::Type (module)">Type</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Payload/Type.html#Single-constant" title="Msf::Payload::Type::Single (constant)">Single</a></span></span>
|
||||
|
||||
<span class='comment'># Get reloaded module
|
||||
</span> <span class='id identifier rubyid_new_instance'>new_instance</span> <span class='op'>=</span> <span class='id identifier rubyid_framework'>framework</span><span class='period'>.</span><span class='id identifier rubyid_modules'>modules</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='id identifier rubyid_metasploit_class'>metasploit_class</span><span class='period'>.</span><span class='id identifier rubyid_fullname'>fullname</span><span class='rparen'>)</span>
|
||||
|
||||
<span class='kw'>if</span> <span class='id identifier rubyid_new_instance'>new_instance</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
|
||||
<span class='id identifier rubyid_elog'><span class='object_link'><a href="../../top-level-namespace.html#elog-instance_method" title="#elog (method)">elog</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Failed create new instance</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
||||
<span class='kw'>return</span> <span class='id identifier rubyid_mod'>mod</span>
|
||||
<span class='kw'>end</span>
|
||||
|
||||
<span class='comment'># Restore the datastore
|
||||
</span> <span class='id identifier rubyid_new_instance'>new_instance</span><span class='period'>.</span><span class='id identifier rubyid_datastore'>datastore</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_original_instance'>original_instance</span><span class='period'>.</span><span class='id identifier rubyid_datastore'>datastore</span><span class='rparen'>)</span>
|
||||
|
||||
<span class='comment'># Return the new instance, which the framework will make the active module.
|
||||
</span> <span class='kw'>return</span> <span class='id identifier rubyid_new_instance'>new_instance</span>
|
||||
<span class='kw'>rescue</span> <span class='const'>StandardError</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
|
||||
<span class='id identifier rubyid_elog'><span class='object_link'><a href="../../top-level-namespace.html#elog-instance_method" title="#elog (method)">elog</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Failed to reload payload </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_fullname'>fullname</span><span class='embexpr_end'>}</span><span class='tstring_content'>: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
||||
<span class='kw'>return</span> <span class='id identifier rubyid_mod'>mod</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri May 8 17:01:51 2026 by
|
||||
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||||
0.9.37 (ruby-3.1.5).
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user