Files
metasploit-gs/api/Rex/Post/Channel/Container.html
T
jenkins-metasploit c3f5bd3de2 Reboot gh-pages
2026-05-08 17:08:43 +00:00

478 lines
10 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Module: Rex::Post::Channel::Container
&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 = "Rex::Post::Channel::Container";
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="../../../Rex.html" title="Rex (module)">Rex</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Post.html" title="Rex::Post (module)">Post</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Channel.html" title="Rex::Post::Channel (module)">Channel</a></span></span>
&raquo;
<span class="title">Container</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: Rex::Post::Channel::Container
</h1>
<div class="box_info">
<dl>
<dt>Included in:</dt>
<dd><span class='object_link'><a href="../../../Msf/Sessions/SshCommandShellBind.html" title="Msf::Sessions::SshCommandShellBind (class)">Msf::Sessions::SshCommandShellBind</a></span>, <span class='object_link'><a href="../Meterpreter/Client.html" title="Rex::Post::Meterpreter::Client (class)">Meterpreter::Client</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/rex/post/channel/container.rb</dd>
</dl>
</div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>This interface is meant to be included by things that are meant to contain zero or more channel instances in the form of a hash.</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="public ">
<span class="summary_signature">
<a href="#channels-instance_method" title="#channels (instance method)">#<strong>channels</strong> &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>The hash of channels.</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_channel-instance_method" title="#add_channel (instance method)">#<strong>add_channel</strong>(channel) &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Adds a channel to the container that is indexed by its channel identifier.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#find_channel-instance_method" title="#find_channel (instance method)">#<strong>find_channel</strong>(cid) &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Looks up a channel instance based on its channel identifier.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#initialize_channels-instance_method" title="#initialize_channels (instance method)">#<strong>initialize_channels</strong> &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Initializes the channel association hash.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#remove_channel-instance_method" title="#remove_channel (instance method)">#<strong>remove_channel</strong>(cid) &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Removes a channel based on its channel identifier.</p>
</div></span>
</li>
</ul>
<div id="instance_attr_details" class="attr_details">
<h2>Instance Attribute Details</h2>
<span id="channels=-instance_method"></span>
<div class="method_details first">
<h3 class="signature first" id="channels-instance_method">
#<strong>channels</strong> &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>The hash of channels.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
44
45
46</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/rex/post/channel/container.rb', line 44</span>
<span class='kw'>def</span> <span class='id identifier rubyid_channels'>channels</span>
<span class='ivar'>@channels</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_channel-instance_method">
#<strong>add_channel</strong>(channel) &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Adds a channel to the container that is indexed by its channel identifier</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
23
24
25</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/rex/post/channel/container.rb', line 23</span>
<span class='kw'>def</span> <span class='id identifier rubyid_add_channel'>add_channel</span><span class='lparen'>(</span><span class='id identifier rubyid_channel'>channel</span><span class='rparen'>)</span>
<span class='id identifier rubyid_channels'>channels</span><span class='lbracket'>[</span><span class='id identifier rubyid_channel'>channel</span><span class='period'>.</span><span class='id identifier rubyid_cid'>cid</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_channel'>channel</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="find_channel-instance_method">
#<strong>find_channel</strong>(cid) &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Looks up a channel instance based on its channel identifier</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
30
31
32</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/rex/post/channel/container.rb', line 30</span>
<span class='kw'>def</span> <span class='id identifier rubyid_find_channel'>find_channel</span><span class='lparen'>(</span><span class='id identifier rubyid_cid'>cid</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='id identifier rubyid_channels'>channels</span><span class='lbracket'>[</span><span class='id identifier rubyid_cid'>cid</span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="initialize_channels-instance_method">
#<strong>initialize_channels</strong> &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Initializes the channel association hash</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
16
17
18</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/rex/post/channel/container.rb', line 16</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize_channels'>initialize_channels</span>
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_channels'>channels</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="remove_channel-instance_method">
#<strong>remove_channel</strong>(cid) &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Removes a channel based on its channel identifier</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
37
38
39</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/rex/post/channel/container.rb', line 37</span>
<span class='kw'>def</span> <span class='id identifier rubyid_remove_channel'>remove_channel</span><span class='lparen'>(</span><span class='id identifier rubyid_cid'>cid</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='id identifier rubyid_channels'>channels</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_cid'>cid</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:03:10 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>