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

448 lines
14 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::Handler::FindTty
&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::Handler::FindTty";
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 (F)</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="../Handler.html" title="Msf::Handler (module)">Handler</a></span></span>
&raquo;
<span class="title">FindTty</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::Handler::FindTty
</h1>
<div class="box_info">
<dl>
<dt>Includes:</dt>
<dd><span class='object_link'><a href="FindPort.html" title="Msf::Handler::FindPort (module)">FindPort</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/handler/find_tty.rb</dd>
</dl>
</div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>This handler expects an interactive TTY on the supplied socket/io object</p>
</div>
</div>
<div class="tags">
</div>
<h2>Constant Summary</h2>
<h3 class="inherited">Constants included
from <span class='object_link'><a href="../Handler.html" title="Msf::Handler (module)">Msf::Handler</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../Handler.html#Claimed-constant" title="Msf::Handler::Claimed (constant)">Claimed</a></span>, <span class='object_link'><a href="../Handler.html#Unused-constant" title="Msf::Handler::Unused (constant)">Unused</a></span></p>
<h2>Instance Attribute Summary</h2>
<h3 class="inherited">Attributes included from <span class='object_link'><a href="FindPort.html" title="Msf::Handler::FindPort (module)">FindPort</a></span></h3>
<p class="inherited"><span class='object_link'><a href="FindPort.html#_handler_return_value-instance_method" title="Msf::Handler::FindPort#_handler_return_value (method)">#_handler_return_value</a></span></p>
<h3 class="inherited">Attributes included from <span class='object_link'><a href="../Handler.html" title="Msf::Handler (module)">Msf::Handler</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../Handler.html#exploit_config-instance_method" title="Msf::Handler#exploit_config (method)">#exploit_config</a></span>, <span class='object_link'><a href="../Handler.html#parent_payload-instance_method" title="Msf::Handler#parent_payload (method)">#parent_payload</a></span>, <span class='object_link'><a href="../Handler.html#pending_connections-instance_method" title="Msf::Handler#pending_connections (method)">#pending_connections</a></span>, <span class='object_link'><a href="../Handler.html#session_waiter_event-instance_method" title="Msf::Handler#session_waiter_event (method)">#session_waiter_event</a></span>, <span class='object_link'><a href="../Handler.html#sessions-instance_method" title="Msf::Handler#sessions (method)">#sessions</a></span></p>
<h2>
Class Method Summary
<small><a href="#" class="summary_toggle">collapse</a></small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#general_handler_type-class_method" title="general_handler_type (class method)">.<strong>general_handler_type</strong> &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the connection oriented general handler type, in this case none.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#handler_type-class_method" title="handler_type (class method)">.<strong>handler_type</strong> &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the string representation of the handler type, in this case none, which is kind of a lie, but we dont have a better way to handle this yet.</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="#_check_shell-instance_method" title="#_check_shell (instance method)">#<strong>_check_shell</strong>(sock) &#x21d2; 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="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(info = {}) &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Remove the CPORT option from our included FindPort class.</p>
</div></span>
</li>
</ul>
<h3 class="inherited">Methods included from <span class='object_link'><a href="FindPort.html" title="Msf::Handler::FindPort (module)">FindPort</a></span></h3>
<p class="inherited"><span class='object_link'><a href="FindPort.html#_find_prefix-instance_method" title="Msf::Handler::FindPort#_find_prefix (method)">#_find_prefix</a></span>, <span class='object_link'><a href="FindPort.html#_send_id-instance_method" title="Msf::Handler::FindPort#_send_id (method)">#_send_id</a></span>, <span class='object_link'><a href="FindPort.html#create_session-instance_method" title="Msf::Handler::FindPort#create_session (method)">#create_session</a></span>, <span class='object_link'><a href="FindPort.html#handler-instance_method" title="Msf::Handler::FindPort#handler (method)">#handler</a></span></p>
<h3 class="inherited">Methods included from <span class='object_link'><a href="../Handler.html" title="Msf::Handler (module)">Msf::Handler</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../Handler.html#add_handler-instance_method" title="Msf::Handler#add_handler (method)">#add_handler</a></span>, <span class='object_link'><a href="../Handler.html#cleanup_handler-instance_method" title="Msf::Handler#cleanup_handler (method)">#cleanup_handler</a></span>, <span class='object_link'><a href="../Handler.html#create_session-instance_method" title="Msf::Handler#create_session (method)">#create_session</a></span>, <span class='object_link'><a href="../Handler.html#handle_connection-instance_method" title="Msf::Handler#handle_connection (method)">#handle_connection</a></span>, <span class='object_link'><a href="../Handler.html#handler-instance_method" title="Msf::Handler#handler (method)">#handler</a></span>, <span class='object_link'><a href="../Handler.html#handler_name-instance_method" title="Msf::Handler#handler_name (method)">#handler_name</a></span>, <span class='object_link'><a href="../Handler.html#interrupt_wait_for_session-instance_method" title="Msf::Handler#interrupt_wait_for_session (method)">#interrupt_wait_for_session</a></span>, <span class='object_link'><a href="../Handler.html#register_session-instance_method" title="Msf::Handler#register_session (method)">#register_session</a></span>, <span class='object_link'><a href="../Handler.html#setup_handler-instance_method" title="Msf::Handler#setup_handler (method)">#setup_handler</a></span>, <span class='object_link'><a href="../Handler.html#start_handler-instance_method" title="Msf::Handler#start_handler (method)">#start_handler</a></span>, <span class='object_link'><a href="../Handler.html#stop_handler-instance_method" title="Msf::Handler#stop_handler (method)">#stop_handler</a></span>, <span class='object_link'><a href="../Handler.html#wait_for_session-instance_method" title="Msf::Handler#wait_for_session (method)">#wait_for_session</a></span>, <span class='object_link'><a href="../Handler.html#wfs_delay-instance_method" title="Msf::Handler#wfs_delay (method)">#wfs_delay</a></span></p>
<div id="class_method_details" class="method_details_list">
<h2>Class Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="general_handler_type-class_method">
.<strong>general_handler_type</strong> &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the connection oriented general handler type, in this case none</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
28
29
30</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/handler/find_tty.rb', line 28</span>
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_general_handler_type'>general_handler_type</span>
<span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>none</span><span class='tstring_end'>&quot;</span></span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="handler_type-class_method">
.<strong>handler_type</strong> &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the string representation of the handler type, in this case none, which is kind of a lie, but we dont have a better way to handle this yet</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/handler/find_tty.rb', line 20</span>
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_handler_type'>handler_type</span>
<span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>none</span><span class='tstring_end'>&quot;</span></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="_check_shell-instance_method">
#<strong>_check_shell</strong>(sock) &#x21d2; <tt>Object</tt> <span class="extras">(protected)</span>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
42
43
44
45
46
47
48</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/handler/find_tty.rb', line 42</span>
<span class='kw'>def</span> <span class='id identifier rubyid__check_shell'>_check_shell</span><span class='lparen'>(</span><span class='id identifier rubyid_sock'>sock</span><span class='rparen'>)</span>
<span class='comment'># Verify that the modem is online
</span> <span class='kw'>if</span><span class='lparen'>(</span><span class='id identifier rubyid_sock'>sock</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>commandstate</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='lparen'>(</span><span class='id identifier rubyid_sock'>sock</span><span class='period'>.</span><span class='id identifier rubyid_commandstate'>commandstate</span> <span class='op'>?</span> <span class='kw'>false</span> <span class='op'>:</span> <span class='kw'>true</span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='kw'>return</span> <span class='kw'>true</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="initialize-instance_method">
#<strong>initialize</strong>(info = {}) &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Remove the CPORT option from our included FindPort class</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
35
36
37
38</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/handler/find_tty.rb', line 35</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</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='kw'>super</span>
<span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_remove_option'>remove_option</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>CPORT</span><span class='tstring_end'>&#39;</span></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:14 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>