Files
metasploit-gs/api/Msf/Module/Alert/ClassMethods.html
T
jenkins-metasploit c3f5bd3de2 Reboot gh-pages
2026-05-08 17:08:43 +00:00

1098 lines
28 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Module: Msf::Module::Alert::ClassMethods
&mdash; 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::Module::Alert::ClassMethods";
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> &raquo;
<span class='title'><span class='object_link'><a href="../../../Msf.html" title="Msf (module)">Msf</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Module.html" title="Msf::Module (class)">Module</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Alert.html" title="Msf::Module::Alert (module)">Alert</a></span></span>
&raquo;
<span class="title">ClassMethods</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::Module::Alert::ClassMethods
</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/module/alert.rb</dd>
</dl>
</div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>This mixin provides a way for alert messages to be added to module classes and instances, retrieved from module classes and instances, and displayed from module instances. The two alert levels provided by this mixin are :error` and `:warning`, though other levels or display methods can be added by subclasses/other mixins if desired by overriding <span class='object_link'><a href="../Alert.html#alert_user-instance_method" title="Msf::Module::Alert#alert_user (method)">#alert_user</a></span> method (calling `super` as necessary), adding a proxy method like <span class='object_link'><a href="#add_warning-instance_method" title="Msf::Module::Alert::ClassMethods#add_warning (method)">#add_warning</a></span> that calls <span class='object_link'><a href="#add_alert-instance_method" title="Msf::Module::Alert::ClassMethods#add_alert (method)">#add_alert</a></span> or <span class='object_link'><a href="#add_alert-instance_method" title="Msf::Module::Alert::ClassMethods#add_alert (method)">#add_alert</a></span> and optionally a helper retrieval method like <span class='object_link'><a href="#warnings-instance_method" title="Msf::Module::Alert::ClassMethods#warnings (method)">#warnings</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="#alerts-instance_method" title="#alerts (instance method)">#<strong>alerts</strong> &#x21d2; Object </a>
</span>
<span class="note title protected">protected</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute alerts.</p>
</div></span>
</li>
</ul>
<h2>
Instance Method Summary
<small><a href="#" class="summary_toggle">collapse</a></small>
</h2>
<ul class="summary">
<li class="protected ">
<span class="summary_signature">
<a href="#add_alert-instance_method" title="#add_alert (instance method)">#<strong>add_alert</strong>(level, msg, &amp;block) &#x21d2; Object </a>
</span>
<span class="note title protected">protected</span>
<span class="summary_desc"><div class='inline'>
<p>Add a message (or block that generates messages) to a module.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#add_error-instance_method" title="#add_error (instance method)">#<strong>add_error</strong>(msg = nil, &amp;block) &#x21d2; true<sup>?</sup> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Add an error that will be provided to the user as early possible when using the module, either when they select it with the use` command, when the module is about to start running, or when the module generates its output.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#add_info-instance_method" title="#add_info (instance method)">#<strong>add_info</strong>(msg = nil, &amp;block) &#x21d2; true<sup>?</sup> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Add an info message that will be provided to the user as early possible when using this instance of a module, either when they select it with the use` command, when the module is about to start running, or when the module generates its output.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#add_warning-instance_method" title="#add_warning (instance method)">#<strong>add_warning</strong>(msg = nil, &amp;block) &#x21d2; true<sup>?</sup> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Add a warning that will be provided to the user as early possible when using the module, either when they select it with the use` command, when the module is about to start running, or when the module generates its output.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#errors-instance_method" title="#errors (instance method)">#<strong>errors</strong> &#x21d2; Array&lt;String, Proc&gt; </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>A list of error message strings, or blocks (see #get_alerts).</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#get_alerts-instance_method" title="#get_alerts (instance method)">#<strong>get_alerts</strong>(level) &#x21d2; Array&lt;String, Proc&gt; </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>A list of level` alerts, either in string or block form.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#infos-instance_method" title="#infos (instance method)">#<strong>infos</strong> &#x21d2; Array&lt;String, Proc&gt; </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>A list of info message strings, or blocks (see #get_alerts).</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#usable%3F-instance_method" title="#usable? (instance method)">#<strong>usable?</strong> &#x21d2; true, false </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>This method allows modules to tell the framework if they are usable on the system that they are being loaded on in a generic fashion.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#warnings-instance_method" title="#warnings (instance method)">#<strong>warnings</strong> &#x21d2; Array&lt;String, Proc&gt; </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>A list of warning message strings, or blocks (see #get_alerts).</p>
</div></span>
</li>
</ul>
<div id="instance_attr_details" class="attr_details">
<h2>Instance Attribute Details</h2>
<span id="alerts=-instance_method"></span>
<div class="method_details first">
<h3 class="signature first" id="alerts-instance_method">
#<strong>alerts</strong> &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute alerts.</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/alert.rb', line 105</span>
<span class='kw'>def</span> <span class='id identifier rubyid_alerts'>alerts</span>
<span class='ivar'>@alerts</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_alert-instance_method">
#<strong>add_alert</strong>(level, msg, &amp;block) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
</h3><div class="docstring">
<div class="discussion">
<p>Add a message (or block that generates messages) to a module. This message will be displayed once to the user by every instance of this module.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
110
111
112
113
114
115
116
117
118
119
120</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/module/alert.rb', line 110</span>
<span class='kw'>def</span> <span class='id identifier rubyid_add_alert'>add_alert</span><span class='lparen'>(</span><span class='id identifier rubyid_level'>level</span><span class='comma'>,</span> <span class='id identifier rubyid_msg'>msg</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_alerts'>alerts</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_alerts'>alerts</span><span class='lbracket'>[</span><span class='id identifier rubyid_level'>level</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='kw'>if</span> <span class='id identifier rubyid_block'>block</span>
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_alerts'>alerts</span><span class='lbracket'>[</span><span class='id identifier rubyid_level'>level</span><span class='rbracket'>]</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_block'>block</span>
<span class='kw'>true</span>
<span class='kw'>elsif</span> <span class='id identifier rubyid_msg'>msg</span>
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_alerts'>alerts</span><span class='lbracket'>[</span><span class='id identifier rubyid_level'>level</span><span class='rbracket'>]</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_msg'>msg</span>
<span class='kw'>true</span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="add_error-instance_method">
#<strong>add_error</strong>(msg = nil, &amp;block) &#x21d2; <tt>true</tt><sup>?</sup>
</h3><div class="docstring">
<div class="discussion">
<p>Add an error that will be provided to the user as early possible when using the module, either when they select it with the use` command, when the module is about to start running, or when the module generates its output. Adding an error will cause #is_usable to return `false`.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>msg</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>nil</tt>)</em>
&mdash;
<div class='inline'>
<p>an optional error message</p>
</div>
</li>
<li>
<span class='name'>block</span>
<span class='type'>(<tt>Proc</tt>)</span>
&mdash;
<div class='inline'>
<p>an optional block that will be executed in the context of the module instance at alert time to generate the error message. If provided the msg parameter is ignored.</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>true</tt>, <tt>nil</tt>)</span>
&mdash;
<div class='inline'>
<p>whether or not the message was added to the list of errors</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
39
40
41</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/module/alert.rb', line 39</span>
<span class='kw'>def</span> <span class='id identifier rubyid_add_error'>add_error</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
<span class='id identifier rubyid_add_alert'>add_alert</span><span class='lparen'>(</span><span class='symbol'>:error</span><span class='comma'>,</span> <span class='id identifier rubyid_msg'>msg</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="add_info-instance_method">
#<strong>add_info</strong>(msg = nil, &amp;block) &#x21d2; <tt>true</tt><sup>?</sup>
</h3><div class="docstring">
<div class="discussion">
<p>Add an info message that will be provided to the user as early possible when using this instance of a module, either when they select it with the use` command, when the module is about to start running, or when the module generates its output.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>msg</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>nil</tt>)</em>
&mdash;
<div class='inline'>
<p>an optional info message</p>
</div>
</li>
<li>
<span class='name'>block</span>
<span class='type'>(<tt>Proc</tt>)</span>
&mdash;
<div class='inline'>
<p>an optional block that will be executed in the context of the module instance at alert time to generate the message. If provided the msg parameter is ignored.</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>true</tt>, <tt>nil</tt>)</span>
&mdash;
<div class='inline'>
<p>whether or not the message was added to the list of info messages</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
54
55
56</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/module/alert.rb', line 54</span>
<span class='kw'>def</span> <span class='id identifier rubyid_add_info'>add_info</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
<span class='id identifier rubyid_add_alert'>add_alert</span><span class='lparen'>(</span><span class='symbol'>:info</span><span class='comma'>,</span> <span class='id identifier rubyid_msg'>msg</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="add_warning-instance_method">
#<strong>add_warning</strong>(msg = nil, &amp;block) &#x21d2; <tt>true</tt><sup>?</sup>
</h3><div class="docstring">
<div class="discussion">
<p>Add a warning that will be provided to the user as early possible when using the module, either when they select it with the use` command, when the module is about to start running, or when the module generates its output.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>msg</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>nil</tt>)</em>
&mdash;
<div class='inline'>
<p>an optional warning message</p>
</div>
</li>
<li>
<span class='name'>block</span>
<span class='type'>(<tt>Proc</tt>)</span>
&mdash;
<div class='inline'>
<p>an optional block that will be executed in the context of the module instance at alert time to generate the warning message. If provided the msg parameter is ignored.</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>true</tt>, <tt>nil</tt>)</span>
&mdash;
<div class='inline'>
<p>whether or not the message was added to the list of warnings</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
24
25
26</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/module/alert.rb', line 24</span>
<span class='kw'>def</span> <span class='id identifier rubyid_add_warning'>add_warning</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
<span class='id identifier rubyid_add_alert'>add_alert</span><span class='lparen'>(</span><span class='symbol'>:warning</span><span class='comma'>,</span> <span class='id identifier rubyid_msg'>msg</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="errors-instance_method">
#<strong>errors</strong> &#x21d2; <tt>Array&lt;String, Proc&gt;</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns a list of error message strings, or blocks (see #get_alerts).</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Array&lt;String, Proc&gt;</tt>)</span>
&mdash;
<div class='inline'>
<p>a list of error message strings, or blocks (see #get_alerts)</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
66
67
68</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/module/alert.rb', line 66</span>
<span class='kw'>def</span> <span class='id identifier rubyid_errors'>errors</span>
<span class='id identifier rubyid_get_alerts'>get_alerts</span><span class='lparen'>(</span><span class='symbol'>:error</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="get_alerts-instance_method">
#<strong>get_alerts</strong>(level) &#x21d2; <tt>Array&lt;String, Proc&gt;</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns A list of level` alerts, either in string or block form. Blocks expect to be executed in the context of a fully initialized module instance and will return `nil` if the alert they are looking for does not apply or a string or array of strings, each representing an alert.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>level</span>
<span class='type'>(<tt>Symbol</tt>)</span>
&mdash;
<div class='inline'>
<p>The alert level to return</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Array&lt;String, Proc&gt;</tt>)</span>
&mdash;
<div class='inline'>
<p>A list of level` alerts, either in string or block form. Blocks expect to be executed in the context of a fully initialized module instance and will return `nil` if the alert they are looking for does not apply or a string or array of strings, each representing an alert.</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
82
83
84
85
86</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/module/alert.rb', line 82</span>
<span class='kw'>def</span> <span class='id identifier rubyid_get_alerts'>get_alerts</span><span class='lparen'>(</span><span class='id identifier rubyid_level'>level</span><span class='rparen'>)</span>
<span class='comment'># Initialize here if needed, thanks to weird metaprogramming side-effects
</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_alerts'>alerts</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_alerts'>alerts</span><span class='lbracket'>[</span><span class='id identifier rubyid_level'>level</span><span class='rbracket'>]</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="infos-instance_method">
#<strong>infos</strong> &#x21d2; <tt>Array&lt;String, Proc&gt;</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns a list of info message strings, or blocks (see #get_alerts).</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Array&lt;String, Proc&gt;</tt>)</span>
&mdash;
<div class='inline'>
<p>a list of info message strings, or blocks (see #get_alerts)</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
72
73
74</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/module/alert.rb', line 72</span>
<span class='kw'>def</span> <span class='id identifier rubyid_infos'>infos</span>
<span class='id identifier rubyid_get_alerts'>get_alerts</span><span class='lparen'>(</span><span class='symbol'>:info</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="usable?-instance_method">
#<strong>usable?</strong> &#x21d2; <tt>true</tt>, <tt>false</tt>
</h3><div class="docstring">
<div class="discussion">
<p>This method allows modules to tell the framework if they are usable on the system that they are being loaded on in a generic fashion. By default, all modules are indicated as being usable. An example of where this is useful is if the module depends on something external to ruby, such as a binary.</p>
<p>This looks to have been abandoned at some point in the past, but it may be time to resurrect it.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>true</tt>, <tt>false</tt>)</span>
&mdash;
<div class='inline'>
<p>whether or not the module has encountered any fatal errors thus far.</p>
</div>
</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/alert.rb', line 99</span>
<span class='kw'>def</span> <span class='id identifier rubyid_usable?'>usable?</span>
<span class='id identifier rubyid_errors'>errors</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="warnings-instance_method">
#<strong>warnings</strong> &#x21d2; <tt>Array&lt;String, Proc&gt;</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns a list of warning message strings, or blocks (see #get_alerts).</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Array&lt;String, Proc&gt;</tt>)</span>
&mdash;
<div class='inline'>
<p>a list of warning message strings, or blocks (see #get_alerts)</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
60
61
62</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/module/alert.rb', line 60</span>
<span class='kw'>def</span> <span class='id identifier rubyid_warnings'>warnings</span>
<span class='id identifier rubyid_get_alerts'>get_alerts</span><span class='lparen'>(</span><span class='symbol'>:warning</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:01:05 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>