Reboot gh-pages
This commit is contained in:
@@ -0,0 +1,418 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>
|
||||
Class: Msf::RPC::JSON::RpcCommandFactory
|
||||
|
||||
— 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::RPC::JSON::RpcCommandFactory";
|
||||
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="../../RPC.html" title="Msf::RPC (module)">RPC</a></span></span> » <span class='title'><span class='object_link'><a href="../JSON.html" title="Msf::RPC::JSON (module)">JSON</a></span></span>
|
||||
»
|
||||
<span class="title">RpcCommandFactory</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::RPC::JSON::RpcCommandFactory
|
||||
|
||||
|
||||
|
||||
</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::RPC::JSON::RpcCommandFactory</li>
|
||||
|
||||
</ul>
|
||||
<a href="#" class="inheritanceTree">show all</a>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Defined in:</dt>
|
||||
<dd>lib/msf/core/rpc/json/rpc_command_factory.rb</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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="#create-class_method" title="create (class method)">.<strong>create</strong>(version, framework) ⇒ RpcCommand </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Create an RpcCommand for the provided version.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li class="public ">
|
||||
<span class="summary_signature">
|
||||
|
||||
<a href="#create_rpc_command_v2_0-class_method" title="create_rpc_command_v2_0 (class method)">.<strong>create_rpc_command_v2_0</strong>(framework) ⇒ RpcCommand </a>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="summary_desc"><div class='inline'>
|
||||
<p>Creates an RpcCommand for a demonstration RPC version 2.0.</p>
|
||||
</div></span>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="class_method_details" class="method_details_list">
|
||||
<h2>Class Method Details</h2>
|
||||
|
||||
|
||||
<div class="method_details first">
|
||||
<h3 class="signature first" id="create-class_method">
|
||||
|
||||
.<strong>create</strong>(version, framework) ⇒ <tt><span class='object_link'><a href="RpcCommand.html" title="Msf::RPC::JSON::RpcCommand (class)">RpcCommand</a></span></tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Create an RpcCommand for the provided version.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
<p class="tag_title">Parameters:</p>
|
||||
<ul class="param">
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>version</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt>Symbol</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>the RPC version</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>framework</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt><span class='object_link'><a href="../../Simple/Framework.html" title="Msf::Simple::Framework (module)">Msf::Simple::Framework</a></span></tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>Framework wrapper instance</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p class="tag_title">Returns:</p>
|
||||
<ul class="return">
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt><span class='object_link'><a href="RpcCommand.html" title="Msf::RPC::JSON::RpcCommand (class)">RpcCommand</a></span></tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>an RpcCommand for the specified version</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<p class="tag_title">Raises:</p>
|
||||
<ul class="raise">
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>invalid RPC version</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/rpc/json/rpc_command_factory.rb', line 11</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='id identifier rubyid_version'>version</span><span class='comma'>,</span> <span class='id identifier rubyid_framework'>framework</span><span class='rparen'>)</span>
|
||||
<span class='kw'>case</span> <span class='id identifier rubyid_version'>version</span>
|
||||
<span class='kw'>when</span> <span class='symbol'>:v1</span><span class='comma'>,</span> <span class='symbol'>:v1_0</span><span class='comma'>,</span> <span class='symbol'>:v10</span>
|
||||
<span class='kw'>return</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="../../RPC.html" title="Msf::RPC (module)">RPC</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../JSON.html" title="Msf::RPC::JSON (module)">JSON</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="V1_0.html" title="Msf::RPC::JSON::V1_0 (module)">V1_0</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="V1_0/RpcCommand.html" title="Msf::RPC::JSON::V1_0::RpcCommand (class)">RpcCommand</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="V1_0/RpcCommand.html#initialize-instance_method" title="Msf::RPC::JSON::V1_0::RpcCommand#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_framework'>framework</span><span class='rparen'>)</span>
|
||||
<span class='kw'>when</span> <span class='symbol'>:v2</span><span class='comma'>,</span> <span class='symbol'>:v2_0</span>
|
||||
<span class='kw'>return</span> <span class='const'><span class='object_link'><a href="" title="Msf::RPC::JSON::RpcCommandFactory (class)">RpcCommandFactory</a></span></span><span class='period'>.</span><span class='id identifier rubyid_create_rpc_command_v2_0'><span class='object_link'><a href="#create_rpc_command_v2_0-class_method" title="Msf::RPC::JSON::RpcCommandFactory.create_rpc_command_v2_0 (method)">create_rpc_command_v2_0</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_framework'>framework</span><span class='rparen'>)</span>
|
||||
<span class='kw'>else</span>
|
||||
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>invalid RPC version </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_version'>version</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
||||
<span class='kw'>end</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="method_details ">
|
||||
<h3 class="signature " id="create_rpc_command_v2_0-class_method">
|
||||
|
||||
.<strong>create_rpc_command_v2_0</strong>(framework) ⇒ <tt><span class='object_link'><a href="RpcCommand.html" title="Msf::RPC::JSON::RpcCommand (class)">RpcCommand</a></span></tt>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</h3><div class="docstring">
|
||||
<div class="discussion">
|
||||
|
||||
<p>Creates an RpcCommand for a demonstration RPC version 2.0.</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="tags">
|
||||
<p class="tag_title">Parameters:</p>
|
||||
<ul class="param">
|
||||
|
||||
<li>
|
||||
|
||||
<span class='name'>framework</span>
|
||||
|
||||
|
||||
<span class='type'>(<tt><span class='object_link'><a href="../../Simple/Framework.html" title="Msf::Simple::Framework (module)">Msf::Simple::Framework</a></span></tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>Framework wrapper instance</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p class="tag_title">Returns:</p>
|
||||
<ul class="return">
|
||||
|
||||
<li>
|
||||
|
||||
|
||||
<span class='type'>(<tt><span class='object_link'><a href="RpcCommand.html" title="Msf::RPC::JSON::RpcCommand (class)">RpcCommand</a></span></tt>)</span>
|
||||
|
||||
|
||||
|
||||
—
|
||||
<div class='inline'>
|
||||
<p>an RpcCommand for a demonstration RPC version 2.0</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div><table class="source_code">
|
||||
<tr>
|
||||
<td>
|
||||
<pre class="lines">
|
||||
|
||||
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29
|
||||
30
|
||||
31
|
||||
32
|
||||
33
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40</pre>
|
||||
</td>
|
||||
<td>
|
||||
<pre class="code"><span class="info file"># File 'lib/msf/core/rpc/json/rpc_command_factory.rb', line 25</span>
|
||||
|
||||
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_create_rpc_command_v2_0'>create_rpc_command_v2_0</span><span class='lparen'>(</span><span class='id identifier rubyid_framework'>framework</span><span class='rparen'>)</span>
|
||||
<span class='comment'># TODO: does belong in some sort of loader class for an RPC version?
|
||||
</span> <span class='comment'># instantiate receiver
|
||||
</span> <span class='id identifier rubyid_rpc_test'>rpc_test</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="../../RPC.html" title="Msf::RPC (module)">RPC</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../JSON.html" title="Msf::RPC::JSON (module)">JSON</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="V2_0.html" title="Msf::RPC::JSON::V2_0 (module)">V2_0</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="V2_0/RpcTest.html" title="Msf::RPC::JSON::V2_0::RpcTest (class)">RpcTest</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="V2_0/RpcTest.html#initialize-instance_method" title="Msf::RPC::JSON::V2_0::RpcTest#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='rparen'>)</span>
|
||||
|
||||
<span class='id identifier rubyid_command'>command</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="../../RPC.html" title="Msf::RPC (module)">RPC</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../JSON.html" title="Msf::RPC::JSON (module)">JSON</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="RpcCommand.html" title="Msf::RPC::JSON::RpcCommand (class)">RpcCommand</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="RpcCommand.html#initialize-instance_method" title="Msf::RPC::JSON::RpcCommand#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_framework'>framework</span><span class='rparen'>)</span>
|
||||
|
||||
<span class='comment'># Add class methods
|
||||
</span> <span class='id identifier rubyid_command'>command</span><span class='period'>.</span><span class='id identifier rubyid_register_method'>register_method</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="../../RPC.html" title="Msf::RPC (module)">RPC</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../JSON.html" title="Msf::RPC::JSON (module)">JSON</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="V2_0.html" title="Msf::RPC::JSON::V2_0 (module)">V2_0</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="V2_0/RpcTest.html" title="Msf::RPC::JSON::V2_0::RpcTest (class)">RpcTest</a></span></span><span class='period'>.</span><span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='symbol'>:add</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_command'>command</span><span class='period'>.</span><span class='id identifier rubyid_register_method'>register_method</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="../../RPC.html" title="Msf::RPC (module)">RPC</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../JSON.html" title="Msf::RPC::JSON (module)">JSON</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="V2_0.html" title="Msf::RPC::JSON::V2_0 (module)">V2_0</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="V2_0/RpcTest.html" title="Msf::RPC::JSON::V2_0::RpcTest (class)">RpcTest</a></span></span><span class='period'>.</span><span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='symbol'>:add</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='label'>name:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>add_alias</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
||||
<span class='comment'># Add instance methods
|
||||
</span> <span class='id identifier rubyid_command'>command</span><span class='period'>.</span><span class='id identifier rubyid_register_method'>register_method</span><span class='lparen'>(</span><span class='id identifier rubyid_rpc_test'>rpc_test</span><span class='period'>.</span><span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='symbol'>:get_instance_rand_num</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
||||
<span class='id identifier rubyid_command'>command</span><span class='period'>.</span><span class='id identifier rubyid_register_method'>register_method</span><span class='lparen'>(</span><span class='id identifier rubyid_rpc_test'>rpc_test</span><span class='period'>.</span><span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='symbol'>:add_instance_rand_num</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
||||
|
||||
<span class='id identifier rubyid_command'>command</span>
|
||||
<span class='kw'>end</span></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Generated on Fri May 8 17:03:37 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