549 lines
28 KiB
HTML
549 lines
28 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>
|
|
Class: Rex::Post::MySQL::Ui::Console::CommandDispatcher::Client
|
|
|
|
— 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::MySQL::Ui::Console::CommandDispatcher::Client";
|
|
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="../../../../../../Rex.html" title="Rex (module)">Rex</a></span></span> » <span class='title'><span class='object_link'><a href="../../../../../Post.html" title="Rex::Post (module)">Post</a></span></span> » <span class='title'><span class='object_link'><a href="../../../../MySQL.html" title="Rex::Post::MySQL (module)">MySQL</a></span></span> » <span class='title'><span class='object_link'><a href="../../../Ui.html" title="Rex::Post::MySQL::Ui (module)">Ui</a></span></span> » <span class='title'><span class='object_link'><a href="../../Console.html" title="Rex::Post::MySQL::Ui::Console (class)">Console</a></span></span> » <span class='title'><span class='object_link'><a href="../CommandDispatcher.html" title="Rex::Post::MySQL::Ui::Console::CommandDispatcher (module)">CommandDispatcher</a></span></span>
|
|
»
|
|
<span class="title">Client</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: Rex::Post::MySQL::Ui::Console::CommandDispatcher::Client
|
|
|
|
|
|
|
|
</h1>
|
|
<div class="box_info">
|
|
|
|
<dl>
|
|
<dt>Inherits:</dt>
|
|
<dd>
|
|
<span class="inheritName">Object</span>
|
|
|
|
<ul class="fullTree">
|
|
<li>Object</li>
|
|
|
|
<li class="next">Rex::Post::MySQL::Ui::Console::CommandDispatcher::Client</li>
|
|
|
|
</ul>
|
|
<a href="#" class="inheritanceTree">show all</a>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Includes:</dt>
|
|
<dd><span class='object_link'><a href="../CommandDispatcher.html" title="Rex::Post::MySQL::Ui::Console::CommandDispatcher (module)">Rex::Post::MySQL::Ui::Console::CommandDispatcher</a></span>, <span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher/Client.html" title="Rex::Post::Sql::Ui::Console::CommandDispatcher::Client (module)">Sql::Ui::Console::CommandDispatcher::Client</a></span></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Defined in:</dt>
|
|
<dd>lib/rex/post/mysql/ui/console/command_dispatcher/client.rb</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
<h2>Overview</h2><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Core MySQL client commands</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h2>Instance Attribute Summary</h2>
|
|
|
|
<h3 class="inherited">Attributes included from <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher (module)">Ui::Text::DispatcherShell::CommandDispatcher</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#shell-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#shell (method)">#shell</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#tab_complete_items-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#tab_complete_items (method)">#tab_complete_items</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="#cmd_query_help-instance_method" title="#cmd_query_help (instance method)">#<strong>cmd_query_help</strong> ⇒ Object </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#handle_error-instance_method" title="#handle_error (instance method)">#<strong>handle_error</strong>(e) ⇒ Object </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> ⇒ String </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#normalise_sql_result-instance_method" title="#normalise_sql_result (instance method)">#<strong>normalise_sql_result</strong>(result) ⇒ Hash </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Hash containing rows, columns and errors.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="../CommandDispatcher.html" title="Rex::Post::MySQL::Ui::Console::CommandDispatcher (module)">Rex::Post::MySQL::Ui::Console::CommandDispatcher</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../CommandDispatcher.html#docs_dir-instance_method" title="Rex::Post::MySQL::Ui::Console::CommandDispatcher#docs_dir (method)">#docs_dir</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher.html" title="Rex::Post::Sql::Ui::Console::CommandDispatcher (module)">Sql::Ui::Console::CommandDispatcher</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher.html#client-instance_method" title="Rex::Post::Sql::Ui::Console::CommandDispatcher#client (method)">#client</a></span>, <span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher.html#filter_commands-instance_method" title="Rex::Post::Sql::Ui::Console::CommandDispatcher#filter_commands (method)">#filter_commands</a></span>, <span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher.html#initialize-instance_method" title="Rex::Post::Sql::Ui::Console::CommandDispatcher#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher.html#msf_loaded%3F-instance_method" title="Rex::Post::Sql::Ui::Console::CommandDispatcher#msf_loaded? (method)">#msf_loaded?</a></span>, <span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher.html#session-instance_method" title="Rex::Post::Sql::Ui::Console::CommandDispatcher#session (method)">#session</a></span>, <span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher.html#unknown_command-instance_method" title="Rex::Post::Sql::Ui::Console::CommandDispatcher#unknown_command (method)">#unknown_command</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../../../../../Msf/Ui/Console/CommandDispatcher/Session.html" title="Msf::Ui::Console::CommandDispatcher::Session (module)">Msf::Ui::Console::CommandDispatcher::Session</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../../../../../Msf/Ui/Console/CommandDispatcher/Session.html#cmd_background-instance_method" title="Msf::Ui::Console::CommandDispatcher::Session#cmd_background (method)">#cmd_background</a></span>, <span class='object_link'><a href="../../../../../../Msf/Ui/Console/CommandDispatcher/Session.html#cmd_background_help-instance_method" title="Msf::Ui::Console::CommandDispatcher::Session#cmd_background_help (method)">#cmd_background_help</a></span>, <span class='object_link'><a href="../../../../../../Msf/Ui/Console/CommandDispatcher/Session.html#cmd_exit-instance_method" title="Msf::Ui::Console::CommandDispatcher::Session#cmd_exit (method)">#cmd_exit</a></span>, <span class='object_link'><a href="../../../../../../Msf/Ui/Console/CommandDispatcher/Session.html#cmd_irb-instance_method" title="Msf::Ui::Console::CommandDispatcher::Session#cmd_irb (method)">#cmd_irb</a></span>, <span class='object_link'><a href="../../../../../../Msf/Ui/Console/CommandDispatcher/Session.html#cmd_irb_help-instance_method" title="Msf::Ui::Console::CommandDispatcher::Session#cmd_irb_help (method)">#cmd_irb_help</a></span>, <span class='object_link'><a href="../../../../../../Msf/Ui/Console/CommandDispatcher/Session.html#cmd_irb_tabs-instance_method" title="Msf::Ui::Console::CommandDispatcher::Session#cmd_irb_tabs (method)">#cmd_irb_tabs</a></span>, <span class='object_link'><a href="../../../../../../Msf/Ui/Console/CommandDispatcher/Session.html#cmd_pry-instance_method" title="Msf::Ui::Console::CommandDispatcher::Session#cmd_pry (method)">#cmd_pry</a></span>, <span class='object_link'><a href="../../../../../../Msf/Ui/Console/CommandDispatcher/Session.html#cmd_pry_help-instance_method" title="Msf::Ui::Console::CommandDispatcher::Session#cmd_pry_help (method)">#cmd_pry_help</a></span>, <span class='object_link'><a href="../../../../../../Msf/Ui/Console/CommandDispatcher/Session.html#cmd_resource-instance_method" title="Msf::Ui::Console::CommandDispatcher::Session#cmd_resource (method)">#cmd_resource</a></span>, <span class='object_link'><a href="../../../../../../Msf/Ui/Console/CommandDispatcher/Session.html#cmd_resource_help-instance_method" title="Msf::Ui::Console::CommandDispatcher::Session#cmd_resource_help (method)">#cmd_resource_help</a></span>, <span class='object_link'><a href="../../../../../../Msf/Ui/Console/CommandDispatcher/Session.html#cmd_resource_tabs-instance_method" title="Msf::Ui::Console::CommandDispatcher::Session#cmd_resource_tabs (method)">#cmd_resource_tabs</a></span>, <span class='object_link'><a href="../../../../../../Msf/Ui/Console/CommandDispatcher/Session.html#cmd_sessions-instance_method" title="Msf::Ui::Console::CommandDispatcher::Session#cmd_sessions (method)">#cmd_sessions</a></span>, <span class='object_link'><a href="../../../../../../Msf/Ui/Console/CommandDispatcher/Session.html#cmd_sessions_help-instance_method" title="Msf::Ui::Console::CommandDispatcher::Session#cmd_sessions_help (method)">#cmd_sessions_help</a></span>, <span class='object_link'><a href="../../../../../../Msf/Ui/Console/CommandDispatcher/Session.html#commands-instance_method" title="Msf::Ui::Console::CommandDispatcher::Session#commands (method)">#commands</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher (module)">Ui::Text::DispatcherShell::CommandDispatcher</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#cmd_help-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#cmd_help (method)">#cmd_help</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#cmd_help_help-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#cmd_help_help (method)">#cmd_help_help</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#cmd_help_tabs-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#cmd_help_tabs (method)">#cmd_help_tabs</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#commands-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#commands (method)">#commands</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#deprecated_cmd-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#deprecated_cmd (method)">#deprecated_cmd</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#deprecated_commands-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#deprecated_commands (method)">#deprecated_commands</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#deprecated_help-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#deprecated_help (method)">#deprecated_help</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#docs_dir-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#docs_dir (method)">#docs_dir</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#help_to_s-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#help_to_s (method)">#help_to_s</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#included-class_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher.included (method)">included</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#initialize-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#print-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#print (method)">#print</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#print_error-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#print_error (method)">#print_error</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#print_good-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#print_good (method)">#print_good</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#print_line-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#print_line (method)">#print_line</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#print_status-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#print_status (method)">#print_status</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#print_warning-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#print_warning (method)">#print_warning</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#tab_complete_directory-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#tab_complete_directory (method)">#tab_complete_directory</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#tab_complete_filenames-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#tab_complete_filenames (method)">#tab_complete_filenames</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#tab_complete_generic-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#tab_complete_generic (method)">#tab_complete_generic</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#tab_complete_source_address-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#tab_complete_source_address (method)">#tab_complete_source_address</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#unknown_command-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#unknown_command (method)">#unknown_command</a></span>, <span class='object_link'><a href="../../../../../Ui/Text/DispatcherShell/CommandDispatcher.html#update_prompt-instance_method" title="Rex::Ui::Text::DispatcherShell::CommandDispatcher#update_prompt (method)">#update_prompt</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher/Client.html" title="Rex::Post::Sql::Ui::Console::CommandDispatcher::Client (module)">Sql::Ui::Console::CommandDispatcher::Client</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher/Client.html#cmd_query-instance_method" title="Rex::Post::Sql::Ui::Console::CommandDispatcher::Client#cmd_query (method)">#cmd_query</a></span>, <span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher/Client.html#cmd_query_interactive-instance_method" title="Rex::Post::Sql::Ui::Console::CommandDispatcher::Client#cmd_query_interactive (method)">#cmd_query_interactive</a></span>, <span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher/Client.html#cmd_query_interactive_help-instance_method" title="Rex::Post::Sql::Ui::Console::CommandDispatcher::Client#cmd_query_interactive_help (method)">#cmd_query_interactive_help</a></span>, <span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher/Client.html#commands-instance_method" title="Rex::Post::Sql::Ui::Console::CommandDispatcher::Client#commands (method)">#commands</a></span>, <span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher/Client.html#format_result-instance_method" title="Rex::Post::Sql::Ui::Console::CommandDispatcher::Client#format_result (method)">#format_result</a></span>, <span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher/Client.html#help_args%3F-instance_method" title="Rex::Post::Sql::Ui::Console::CommandDispatcher::Client#help_args? (method)">#help_args?</a></span>, <span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher/Client.html#initialize-instance_method" title="Rex::Post::Sql::Ui::Console::CommandDispatcher::Client#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher/Client.html#process_query-instance_method" title="Rex::Post::Sql::Ui::Console::CommandDispatcher::Client#process_query (method)">#process_query</a></span>, <span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher/Client.html#query_interactive_help-instance_method" title="Rex::Post::Sql::Ui::Console::CommandDispatcher::Client#query_interactive_help (method)">#query_interactive_help</a></span>, <span class='object_link'><a href="../../../../Sql/Ui/Console/CommandDispatcher/Client.html#run_query-instance_method" title="Rex::Post::Sql::Ui::Console::CommandDispatcher::Client#run_query (method)">#run_query</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="cmd_query_help-instance_method">
|
|
|
|
#<strong>cmd_query_help</strong> ⇒ <tt>Object</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>Object</tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
21
|
|
22
|
|
23
|
|
24
|
|
25
|
|
26
|
|
27
|
|
28
|
|
29
|
|
30
|
|
31
|
|
32
|
|
33</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/rex/post/mysql/ui/console/command_dispatcher/client.rb', line 21</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_cmd_query_help'>cmd_query_help</span>
|
|
<span class='id identifier rubyid_print_line'>print_line</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Usage: query</span><span class='tstring_end'>'</span></span>
|
|
<span class='id identifier rubyid_print_line'>print_line</span>
|
|
<span class='id identifier rubyid_print_line'>print_line</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Run a single SQL query on the target.</span><span class='tstring_end'>'</span></span>
|
|
<span class='id identifier rubyid_print_line'>print_line</span> <span class='cvar'>@@query_opts</span><span class='period'>.</span><span class='id identifier rubyid_usage'>usage</span>
|
|
<span class='id identifier rubyid_print_line'>print_line</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Examples:</span><span class='tstring_end'>'</span></span>
|
|
<span class='id identifier rubyid_print_line'>print_line</span>
|
|
<span class='id identifier rubyid_print_line'>print_line</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> query SHOW DATABASES;</span><span class='tstring_end'>'</span></span>
|
|
<span class='id identifier rubyid_print_line'>print_line</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> query USE information_schema;</span><span class='tstring_end'>'</span></span>
|
|
<span class='id identifier rubyid_print_line'>print_line</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> query SELECT * FROM SQL_FUNCTIONS;</span><span class='tstring_end'>'</span></span>
|
|
<span class='id identifier rubyid_print_line'>print_line</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> query SELECT version();</span><span class='tstring_end'>'</span></span>
|
|
<span class='id identifier rubyid_print_line'>print_line</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="handle_error-instance_method">
|
|
|
|
#<strong>handle_error</strong>(e) ⇒ <tt>Object</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
43
|
|
44
|
|
45
|
|
46
|
|
47
|
|
48
|
|
49</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/rex/post/mysql/ui/console/command_dispatcher/client.rb', line 43</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_handle_error'>handle_error</span><span class='lparen'>(</span><span class='id identifier rubyid_e'>e</span><span class='rparen'>)</span>
|
|
<span class='kw'>case</span> <span class='id identifier rubyid_e'>e</span>
|
|
<span class='kw'>when</span> <span class='const'>Mysql</span><span class='op'>::</span><span class='const'>ClientError</span><span class='op'>::</span><span class='const'>ServerLost</span>
|
|
<span class='id identifier rubyid__close_session'>_close_session</span>
|
|
<span class='kw'>end</span>
|
|
<span class='kw'>super</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="name-instance_method">
|
|
|
|
#<strong>name</strong> ⇒ <tt>String</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>String</tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</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/mysql/ui/console/command_dispatcher/client.rb', line 16</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
|
|
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>MySQL Client</span><span class='tstring_end'>'</span></span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="normalise_sql_result-instance_method">
|
|
|
|
#<strong>normalise_sql_result</strong>(result) ⇒ <tt>Hash</tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Returns Hash containing rows, columns and errors.</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>result</span>
|
|
|
|
|
|
<span class='type'>(<tt>Mysql::Result</tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'>
|
|
<p>The MySQL query result</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<p class="tag_title">Returns:</p>
|
|
<ul class="return">
|
|
|
|
<li>
|
|
|
|
|
|
<span class='type'>(<tt>Hash</tt>)</span>
|
|
|
|
|
|
|
|
—
|
|
<div class='inline'>
|
|
<p>Hash containing rows, columns and errors.</p>
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
37
|
|
38
|
|
39
|
|
40
|
|
41</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/rex/post/mysql/ui/console/command_dispatcher/client.rb', line 37</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_normalise_sql_result'>normalise_sql_result</span><span class='lparen'>(</span><span class='id identifier rubyid_result'>result</span><span class='rparen'>)</span>
|
|
<span class='comment'># MySQL errors are handled by raising an exception when querying,
|
|
</span> <span class='comment'># meaning we don't have that in the Result object.
|
|
</span> <span class='lbrace'>{</span> <span class='label'>rows:</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_entries'>entries</span><span class='comma'>,</span> <span class='label'>columns:</span> <span class='id identifier rubyid_result'>result</span><span class='period'>.</span><span class='id identifier rubyid_fields'>fields</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:name</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='label'>errors:</span> <span class='lbracket'>[</span><span class='rbracket'>]</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:04:31 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> |