612 lines
24 KiB
HTML
612 lines
24 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>
|
|
Class: Msf::Modules::Metadata::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::Modules::Metadata::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="../../Modules.html" title="Msf::Modules (module)">Modules</a></span></span> » <span class='title'><span class='object_link'><a href="../Metadata.html" title="Msf::Modules::Metadata (module)">Metadata</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>Class: Msf::Modules::Metadata::Cache
|
|
|
|
|
|
|
|
</h1>
|
|
<div class="box_info">
|
|
|
|
<dl>
|
|
<dt>Inherits:</dt>
|
|
<dd>
|
|
<span class="inheritName">Object</span>
|
|
|
|
<ul class="fullTree">
|
|
<li>Object</li>
|
|
|
|
<li class="next">Msf::Modules::Metadata::Cache</li>
|
|
|
|
</ul>
|
|
<a href="#" class="inheritanceTree">show all</a>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Includes:</dt>
|
|
<dd><span class='object_link'><a href="Maps.html" title="Msf::Modules::Metadata::Maps (module)">Maps</a></span>, <span class='object_link'><a href="Search.html" title="Msf::Modules::Metadata::Search (module)">Search</a></span>, <span class='object_link'><a href="Stats.html" title="Msf::Modules::Metadata::Stats (module)">Stats</a></span>, <span class='object_link'><a href="Store.html" title="Msf::Modules::Metadata::Store (module)">Store</a></span>, Singleton</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Defined in:</dt>
|
|
<dd>lib/msf/core/modules/metadata/cache.rb</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h2>Constant Summary</h2>
|
|
|
|
<h3 class="inherited">Constants included
|
|
from <span class='object_link'><a href="Store.html" title="Msf::Modules::Metadata::Store (module)">Store</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Store.html#BaseMetaDataFile-constant" title="Msf::Modules::Metadata::Store::BaseMetaDataFile (constant)">Store::BaseMetaDataFile</a></span>, <span class='object_link'><a href="Store.html#CacheMetaDataFile-constant" title="Msf::Modules::Metadata::Store::CacheMetaDataFile (constant)">Store::CacheMetaDataFile</a></span>, <span class='object_link'><a href="Store.html#UserMetaDataFile-constant" title="Msf::Modules::Metadata::Store::UserMetaDataFile (constant)">Store::UserMetaDataFile</a></span></p>
|
|
|
|
|
|
|
|
<h3 class="inherited">Constants included
|
|
from <span class='object_link'><a href="Search.html" title="Msf::Modules::Metadata::Search (module)">Search</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Search.html#MODULE_TYPE_SHORTHANDS-constant" title="Msf::Modules::Metadata::Search::MODULE_TYPE_SHORTHANDS (constant)">Search::MODULE_TYPE_SHORTHANDS</a></span>, <span class='object_link'><a href="Search.html#VALID_PARAMS-constant" title="Msf::Modules::Metadata::Search::VALID_PARAMS (constant)">Search::VALID_PARAMS</a></span></p>
|
|
|
|
|
|
|
|
|
|
<h2>Instance Attribute Summary</h2>
|
|
|
|
<h3 class="inherited">Attributes included from <span class='object_link'><a href="Stats.html" title="Msf::Modules::Metadata::Stats (module)">Stats</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Stats.html#module_counts-instance_method" title="Msf::Modules::Metadata::Stats#module_counts (method)">#module_counts</a></span></p>
|
|
|
|
|
|
|
|
<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="#get_metadata-instance_method" title="#get_metadata (instance method)">#<strong>get_metadata</strong> ⇒ Object </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Returns the module data cache, but first ensures all the metadata is loaded.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#get_module_reference-instance_method" title="#get_module_reference (instance method)">#<strong>get_module_reference</strong>(type:, reference_name:) ⇒ Object </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#module_metadata-instance_method" title="#module_metadata (instance method)">#<strong>module_metadata</strong>(type) ⇒ Object </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#refresh_metadata-instance_method" title="#refresh_metadata (instance method)">#<strong>refresh_metadata</strong>(module_sets) ⇒ Object </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Checks for modules loaded that are not a part of the cache and updates the underlying store if there are changes.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#refresh_metadata_instance-instance_method" title="#refresh_metadata_instance (instance method)">#<strong>refresh_metadata_instance</strong>(module_instance) ⇒ Object </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Refreshes cached module metadata as well as updating the store.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Stats.html" title="Msf::Modules::Metadata::Stats (module)">Stats</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Stats.html#update_stats-instance_method" title="Msf::Modules::Metadata::Stats#update_stats (method)">#update_stats</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Maps.html" title="Msf::Modules::Metadata::Maps (module)">Maps</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Maps.html#all_exploit_maps-instance_method" title="Msf::Modules::Metadata::Maps#all_exploit_maps (method)">#all_exploit_maps</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Store.html" title="Msf::Modules::Metadata::Store (module)">Store</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Store.html#init_store-instance_method" title="Msf::Modules::Metadata::Store#init_store (method)">#init_store</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="Search.html" title="Msf::Modules::Metadata::Search (module)">Search</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="Search.html#find-instance_method" title="Msf::Modules::Metadata::Search#find (method)">#find</a></span>, <span class='object_link'><a href="Search.html#parse_search_string-class_method" title="Msf::Modules::Metadata::Search.parse_search_string (method)">parse_search_string</a></span></p>
|
|
|
|
|
|
|
|
<div id="instance_method_details" class="method_details_list">
|
|
<h2>Instance Method Details</h2>
|
|
|
|
|
|
<div class="method_details first">
|
|
<h3 class="signature first" id="get_metadata-instance_method">
|
|
|
|
#<strong>get_metadata</strong> ⇒ <tt>Object</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Returns the module data cache, but first ensures all the metadata is loaded</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
31
|
|
32
|
|
33
|
|
34
|
|
35
|
|
36</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/modules/metadata/cache.rb', line 31</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_get_metadata'>get_metadata</span>
|
|
<span class='ivar'>@mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span>
|
|
<span class='id identifier rubyid_wait_for_load'>wait_for_load</span>
|
|
<span class='ivar'>@module_metadata_cache</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span>
|
|
<span class='rbrace'>}</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="get_module_reference-instance_method">
|
|
|
|
#<strong>get_module_reference</strong>(type:, reference_name:) ⇒ <tt>Object</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
38
|
|
39
|
|
40
|
|
41
|
|
42
|
|
43</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/modules/metadata/cache.rb', line 38</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_get_module_reference'>get_module_reference</span><span class='lparen'>(</span><span class='label'>type:</span><span class='comma'>,</span> <span class='label'>reference_name:</span><span class='rparen'>)</span>
|
|
<span class='ivar'>@mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
|
<span class='id identifier rubyid_wait_for_load'>wait_for_load</span>
|
|
<span class='ivar'>@module_metadata_cache</span><span class='lbracket'>[</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_reference_name'>reference_name</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span>
|
|
<span class='kw'>end</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="module_metadata-instance_method">
|
|
|
|
#<strong>module_metadata</strong>(type) ⇒ <tt>Object</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
92
|
|
93
|
|
94
|
|
95
|
|
96
|
|
97
|
|
98</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/modules/metadata/cache.rb', line 92</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_module_metadata'>module_metadata</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
|
<span class='ivar'>@mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='kw'>do</span>
|
|
<span class='id identifier rubyid_wait_for_load'>wait_for_load</span>
|
|
<span class='id identifier rubyid_type_hash'>type_hash</span> <span class='op'>=</span> <span class='ivar'>@metadata_type_index</span><span class='lbracket'>[</span><span class='id identifier rubyid_type'>type</span><span class='rbracket'>]</span>
|
|
<span class='id identifier rubyid_type_hash'>type_hash</span> <span class='op'>?</span> <span class='id identifier rubyid_type_hash'>type_hash</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span> <span class='op'>:</span> <span class='lbrace'>{</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="refresh_metadata-instance_method">
|
|
|
|
#<strong>refresh_metadata</strong>(module_sets) ⇒ <tt>Object</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Checks for modules loaded that are not a part of the cache and updates the underlying store if there are changes.</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
48
|
|
49
|
|
50
|
|
51
|
|
52
|
|
53
|
|
54
|
|
55
|
|
56
|
|
57
|
|
58
|
|
59
|
|
60
|
|
61
|
|
62
|
|
63
|
|
64
|
|
65
|
|
66
|
|
67
|
|
68
|
|
69
|
|
70
|
|
71
|
|
72
|
|
73
|
|
74
|
|
75
|
|
76
|
|
77
|
|
78
|
|
79
|
|
80
|
|
81
|
|
82
|
|
83
|
|
84
|
|
85
|
|
86
|
|
87
|
|
88
|
|
89
|
|
90</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/modules/metadata/cache.rb', line 48</span>
|
|
|
|
<span class='kw'>def</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='id identifier rubyid_has_changes'>has_changes</span> <span class='op'>=</span> <span class='kw'>false</span>
|
|
<span class='ivar'>@mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span>
|
|
<span class='id identifier rubyid_unchanged_module_references'>unchanged_module_references</span> <span class='op'>=</span> <span class='id identifier rubyid_get_unchanged_module_references'>get_unchanged_module_references</span>
|
|
<span class='id identifier rubyid_module_sets'>module_sets</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_mt'>mt</span><span class='op'>|</span>
|
|
<span class='id identifier rubyid_unchanged_reference_name_set'>unchanged_reference_name_set</span> <span class='op'>=</span> <span class='id identifier rubyid_unchanged_module_references'>unchanged_module_references</span><span class='lbracket'>[</span><span class='id identifier rubyid_mt'>mt</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rbracket'>]</span>
|
|
|
|
<span class='id identifier rubyid_mt'>mt</span><span class='lbracket'>[</span><span class='int'>1</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_sort'>sort</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_mn'>mn</span><span class='op'>|</span>
|
|
<span class='kw'>next</span> <span class='kw'>if</span> <span class='id identifier rubyid_unchanged_reference_name_set'>unchanged_reference_name_set</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_mn'>mn</span>
|
|
|
|
<span class='kw'>begin</span>
|
|
<span class='id identifier rubyid_module_instance'>module_instance</span> <span class='op'>=</span> <span class='id identifier rubyid_mt'>mt</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='id identifier rubyid_mn'>mn</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="../../ModuleManager/Cache.html" title="Msf::ModuleManager::Cache (module)">Cache</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../ModuleManager/Cache.html#MEMORY-constant" title="Msf::ModuleManager::Cache::MEMORY (constant)">MEMORY</a></span></span><span class='rparen'>)</span>
|
|
<span class='kw'>rescue</span> <span class='const'><span class='object_link'><a href="../../Exception.html" title="Msf::Exception (module)">Exception</a></span></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='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Unable to create module: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_mn'>mn</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='kw'>end</span>
|
|
|
|
<span class='kw'>unless</span> <span class='id identifier rubyid_module_instance'>module_instance</span>
|
|
<span class='id identifier rubyid_wlog'><span class='object_link'><a href="../../../top-level-namespace.html#wlog-instance_method" title="#wlog (method)">wlog</a></span></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Removing invalid module reference from cache: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_mn'>mn</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
|
<span class='id identifier rubyid_existed'>existed</span> <span class='op'>=</span> <span class='id identifier rubyid_remove_from_cache'>remove_from_cache</span><span class='lparen'>(</span><span class='id identifier rubyid_mn'>mn</span><span class='rparen'>)</span>
|
|
<span class='kw'>if</span> <span class='id identifier rubyid_existed'>existed</span>
|
|
<span class='id identifier rubyid_has_changes'>has_changes</span> <span class='op'>=</span> <span class='kw'>true</span>
|
|
<span class='kw'>end</span>
|
|
<span class='kw'>next</span>
|
|
<span class='kw'>end</span>
|
|
|
|
<span class='kw'>begin</span>
|
|
<span class='id identifier rubyid_refresh_metadata_instance_internal'>refresh_metadata_instance_internal</span><span class='lparen'>(</span><span class='id identifier rubyid_module_instance'>module_instance</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_has_changes'>has_changes</span> <span class='op'>=</span> <span class='kw'>true</span>
|
|
<span class='kw'>rescue</span> <span class='const'><span class='object_link'><a href="../../Exception.html" title="Msf::Exception (module)">Exception</a></span></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'>Error updating module details for </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_module_instance'>module_instance</span><span class='period'>.</span><span class='id identifier rubyid_fullname'>fullname</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='label'>error:</span> <span class='id identifier rubyid_e'>e</span><span class='rparen'>)</span>
|
|
<span class='kw'>end</span>
|
|
<span class='kw'>end</span>
|
|
<span class='kw'>end</span>
|
|
<span class='kw'>if</span> <span class='id identifier rubyid_has_changes'>has_changes</span>
|
|
<span class='id identifier rubyid_rebuild_type_cache'>rebuild_type_cache</span>
|
|
<span class='kw'>end</span>
|
|
<span class='rbrace'>}</span>
|
|
<span class='kw'>if</span> <span class='id identifier rubyid_has_changes'>has_changes</span>
|
|
<span class='id identifier rubyid_update_store'>update_store</span>
|
|
<span class='id identifier rubyid_clear_maps'>clear_maps</span>
|
|
<span class='id identifier rubyid_update_stats'>update_stats</span>
|
|
<span class='kw'>end</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="refresh_metadata_instance-instance_method">
|
|
|
|
#<strong>refresh_metadata_instance</strong>(module_instance) ⇒ <tt>Object</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Refreshes cached module metadata as well as updating the store</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
20
|
|
21
|
|
22
|
|
23
|
|
24
|
|
25
|
|
26</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/msf/core/modules/metadata/cache.rb', line 20</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_refresh_metadata_instance'>refresh_metadata_instance</span><span class='lparen'>(</span><span class='id identifier rubyid_module_instance'>module_instance</span><span class='rparen'>)</span>
|
|
<span class='ivar'>@mutex</span><span class='period'>.</span><span class='id identifier rubyid_synchronize'>synchronize</span> <span class='lbrace'>{</span>
|
|
<span class='id identifier rubyid_dlog'><span class='object_link'><a href="../../../top-level-namespace.html#dlog-instance_method" title="#dlog (method)">dlog</a></span></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Refreshing </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_module_instance'>module_instance</span><span class='period'>.</span><span class='id identifier rubyid_refname'>refname</span><span class='embexpr_end'>}</span><span class='tstring_content'> of type: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_module_instance'>module_instance</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
|
<span class='id identifier rubyid_refresh_metadata_instance_internal'>refresh_metadata_instance_internal</span><span class='lparen'>(</span><span class='id identifier rubyid_module_instance'>module_instance</span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_update_store'>update_store</span>
|
|
<span class='rbrace'>}</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="footer">
|
|
Generated on Fri May 8 17:03:32 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> |