588 lines
32 KiB
HTML
588 lines
32 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
|
|
|
|
— 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";
|
|
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">Console</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
|
|
|
|
|
|
|
|
</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</li>
|
|
|
|
</ul>
|
|
<a href="#" class="inheritanceTree">show all</a>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Includes:</dt>
|
|
<dd><span class='object_link'><a href="../../Sql/Ui/Console.html" title="Rex::Post::Sql::Ui::Console (module)">Sql::Ui::Console</a></span>, <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html" title="Rex::Ui::Text::DispatcherShell (module)">Ui::Text::DispatcherShell</a></span></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl>
|
|
<dt>Defined in:</dt>
|
|
<dd>lib/rex/post/mysql/ui/console.rb</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
<h2>Overview</h2><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>This class provides a shell driven interface to the MySQL client API.</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
|
|
</div><h2>Defined Under Namespace</h2>
|
|
<p class="children">
|
|
|
|
|
|
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Console/CommandDispatcher.html" title="Rex::Post::MySQL::Ui::Console::CommandDispatcher (module)">CommandDispatcher</a></span>
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<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="#client-instance_method" title="#client (instance method)">#<strong>client</strong> ⇒ MySQL::Client </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="protected ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#commands-instance_method" title="#commands (instance method)">#<strong>commands</strong> ⇒ Object </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="note title protected">protected</span>
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>:nodoc:.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="public ">
|
|
<span class="summary_signature">
|
|
|
|
<a href="#session-instance_method" title="#session (instance method)">#<strong>session</strong> ⇒ Msf::Sessions::MySQL </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'></div></span>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Attributes included from <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html" title="Rex::Ui::Text::DispatcherShell (module)">Ui::Text::DispatcherShell</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#blocked-instance_method" title="Rex::Ui::Text::DispatcherShell#blocked (method)">#blocked</a></span>, <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#busy-instance_method" title="Rex::Ui::Text::DispatcherShell#busy (method)">#busy</a></span>, <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#dispatcher_stack-instance_method" title="Rex::Ui::Text::DispatcherShell#dispatcher_stack (method)">#dispatcher_stack</a></span></p>
|
|
|
|
|
|
|
|
<h3 class="inherited">Attributes included from <span class='object_link'><a href="../../../Ui/Text/Shell.html" title="Rex::Ui::Text::Shell (module)">Ui::Text::Shell</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../../Ui/Text/Shell.html#cont_flag-instance_method" title="Rex::Ui::Text::Shell#cont_flag (method)">#cont_flag</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#cont_prompt-instance_method" title="Rex::Ui::Text::Shell#cont_prompt (method)">#cont_prompt</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#disable_output-instance_method" title="Rex::Ui::Text::Shell#disable_output (method)">#disable_output</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#framework-instance_method" title="Rex::Ui::Text::Shell#framework (method)">#framework</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#hist_last_saved-instance_method" title="Rex::Ui::Text::Shell#hist_last_saved (method)">#hist_last_saved</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#histfile-instance_method" title="Rex::Ui::Text::Shell#histfile (method)">#histfile</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#history_manager-instance_method" title="Rex::Ui::Text::Shell#history_manager (method)">#history_manager</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#input-instance_method" title="Rex::Ui::Text::Shell#input (method)">#input</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#local_hostname-instance_method" title="Rex::Ui::Text::Shell#local_hostname (method)">#local_hostname</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#local_username-instance_method" title="Rex::Ui::Text::Shell#local_username (method)">#local_username</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#log_source-instance_method" title="Rex::Ui::Text::Shell#log_source (method)">#log_source</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#name-instance_method" title="Rex::Ui::Text::Shell#name (method)">#name</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#on_command_proc-instance_method" title="Rex::Ui::Text::Shell#on_command_proc (method)">#on_command_proc</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#on_print_proc-instance_method" title="Rex::Ui::Text::Shell#on_print_proc (method)">#on_print_proc</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#output-instance_method" title="Rex::Ui::Text::Shell#output (method)">#output</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#prompt-instance_method" title="Rex::Ui::Text::Shell#prompt (method)">#prompt</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#prompt_char-instance_method" title="Rex::Ui::Text::Shell#prompt_char (method)">#prompt_char</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#stop_count-instance_method" title="Rex::Ui::Text::Shell#stop_count (method)">#stop_count</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#stop_flag-instance_method" title="Rex::Ui::Text::Shell#stop_flag (method)">#stop_flag</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#tab_complete_proc-instance_method" title="Rex::Ui::Text::Shell#tab_complete_proc (method)">#tab_complete_proc</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="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(session) ⇒ Console </a>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
<span class="note title constructor">constructor</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="summary_desc"><div class='inline'>
|
|
<p>Initialize the MySQL console.</p>
|
|
</div></span>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html" title="Rex::Ui::Text::DispatcherShell (module)">Ui::Text::DispatcherShell</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#append_dispatcher-instance_method" title="Rex::Ui::Text::DispatcherShell#append_dispatcher (method)">#append_dispatcher</a></span>, <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#block_command-instance_method" title="Rex::Ui::Text::DispatcherShell#block_command (method)">#block_command</a></span>, <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#blocked_command%3F-instance_method" title="Rex::Ui::Text::DispatcherShell#blocked_command? (method)">#blocked_command?</a></span>, <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#current_dispatcher-instance_method" title="Rex::Ui::Text::DispatcherShell#current_dispatcher (method)">#current_dispatcher</a></span>, <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#destack_dispatcher-instance_method" title="Rex::Ui::Text::DispatcherShell#destack_dispatcher (method)">#destack_dispatcher</a></span>, <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#enstack_dispatcher-instance_method" title="Rex::Ui::Text::DispatcherShell#enstack_dispatcher (method)">#enstack_dispatcher</a></span>, <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#help_to_s-instance_method" title="Rex::Ui::Text::DispatcherShell#help_to_s (method)">#help_to_s</a></span>, <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#remove_dispatcher-instance_method" title="Rex::Ui::Text::DispatcherShell#remove_dispatcher (method)">#remove_dispatcher</a></span>, <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#run_command-instance_method" title="Rex::Ui::Text::DispatcherShell#run_command (method)">#run_command</a></span>, <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#run_single-instance_method" title="Rex::Ui::Text::DispatcherShell#run_single (method)">#run_single</a></span>, <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#shellsplitex-instance_method" title="Rex::Ui::Text::DispatcherShell#shellsplitex (method)">#shellsplitex</a></span>, <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#tab_complete-instance_method" title="Rex::Ui::Text::DispatcherShell#tab_complete (method)">#tab_complete</a></span>, <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#tab_complete_helper-instance_method" title="Rex::Ui::Text::DispatcherShell#tab_complete_helper (method)">#tab_complete_helper</a></span>, <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#tab_complete_stub-instance_method" title="Rex::Ui::Text::DispatcherShell#tab_complete_stub (method)">#tab_complete_stub</a></span>, <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#unblock_command-instance_method" title="Rex::Ui::Text::DispatcherShell#unblock_command (method)">#unblock_command</a></span>, <span class='object_link'><a href="../../../Ui/Text/DispatcherShell.html#unknown_command-instance_method" title="Rex::Ui::Text::DispatcherShell#unknown_command (method)">#unknown_command</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../../Ui/Text/Shell.html" title="Rex::Ui::Text::Shell (module)">Ui::Text::Shell</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../../Ui/Text/Shell.html#_print_prompt-instance_method" title="Rex::Ui::Text::Shell#_print_prompt (method)">#_print_prompt</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#format_prompt-instance_method" title="Rex::Ui::Text::Shell#format_prompt (method)">#format_prompt</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#get_input_line-instance_method" title="Rex::Ui::Text::Shell#get_input_line (method)">#get_input_line</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#init_tab_complete-instance_method" title="Rex::Ui::Text::Shell#init_tab_complete (method)">#init_tab_complete</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#init_ui-instance_method" title="Rex::Ui::Text::Shell#init_ui (method)">#init_ui</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#log_input-instance_method" title="Rex::Ui::Text::Shell#log_input (method)">#log_input</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#log_output-instance_method" title="Rex::Ui::Text::Shell#log_output (method)">#log_output</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#parse_line-instance_method" title="Rex::Ui::Text::Shell#parse_line (method)">#parse_line</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#print-instance_method" title="Rex::Ui::Text::Shell#print (method)">#print</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#print_error-instance_method" title="Rex::Ui::Text::Shell#print_error (method)">#print_error</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#print_good-instance_method" title="Rex::Ui::Text::Shell#print_good (method)">#print_good</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#print_line-instance_method" title="Rex::Ui::Text::Shell#print_line (method)">#print_line</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#print_status-instance_method" title="Rex::Ui::Text::Shell#print_status (method)">#print_status</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#print_warning-instance_method" title="Rex::Ui::Text::Shell#print_warning (method)">#print_warning</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#prompt_yesno-instance_method" title="Rex::Ui::Text::Shell#prompt_yesno (method)">#prompt_yesno</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#reset_ui-instance_method" title="Rex::Ui::Text::Shell#reset_ui (method)">#reset_ui</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#run-instance_method" title="Rex::Ui::Text::Shell#run (method)">#run</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#set_log_source-instance_method" title="Rex::Ui::Text::Shell#set_log_source (method)">#set_log_source</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#stop-instance_method" title="Rex::Ui::Text::Shell#stop (method)">#stop</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#stopped%3F-instance_method" title="Rex::Ui::Text::Shell#stopped? (method)">#stopped?</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#supports_color%3F-instance_method" title="Rex::Ui::Text::Shell#supports_color? (method)">#supports_color?</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#tab_complete-instance_method" title="Rex::Ui::Text::Shell#tab_complete (method)">#tab_complete</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#unset_log_source-instance_method" title="Rex::Ui::Text::Shell#unset_log_source (method)">#unset_log_source</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#update_prompt-instance_method" title="Rex::Ui::Text::Shell#update_prompt (method)">#update_prompt</a></span>, <span class='object_link'><a href="../../../Ui/Text/Shell.html#with_history_manager_context-instance_method" title="Rex::Ui::Text::Shell#with_history_manager_context (method)">#with_history_manager_context</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../../Ui/Text/Resource.html" title="Rex::Ui::Text::Resource (module)">Ui::Text::Resource</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../../Ui/Text/Resource.html#load_resource-instance_method" title="Rex::Ui::Text::Resource#load_resource (method)">#load_resource</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../Sql/Ui/Console.html" title="Rex::Post::Sql::Ui::Console (module)">Sql::Ui::Console</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../Sql/Ui/Console.html#current_database-instance_method" title="Rex::Post::Sql::Ui::Console#current_database (method)">#current_database</a></span>, <span class='object_link'><a href="../../Sql/Ui/Console.html#format_prompt-instance_method" title="Rex::Post::Sql::Ui::Console#format_prompt (method)">#format_prompt</a></span>, <span class='object_link'><a href="../../Sql/Ui/Console.html#help_to_s-instance_method" title="Rex::Post::Sql::Ui::Console#help_to_s (method)">#help_to_s</a></span>, <span class='object_link'><a href="../../Sql/Ui/Console.html#interact-instance_method" title="Rex::Post::Sql::Ui::Console#interact (method)">#interact</a></span>, <span class='object_link'><a href="../../Sql/Ui/Console.html#interact_with_client-instance_method" title="Rex::Post::Sql::Ui::Console#interact_with_client (method)">#interact_with_client</a></span>, <span class='object_link'><a href="../../Sql/Ui/Console.html#interact_with_client_notification-instance_method" title="Rex::Post::Sql::Ui::Console#interact_with_client_notification (method)">#interact_with_client_notification</a></span>, <span class='object_link'><a href="../../Sql/Ui/Console.html#log_error-instance_method" title="Rex::Post::Sql::Ui::Console#log_error (method)">#log_error</a></span>, <span class='object_link'><a href="../../Sql/Ui/Console.html#queue_cmd-instance_method" title="Rex::Post::Sql::Ui::Console#queue_cmd (method)">#queue_cmd</a></span>, <span class='object_link'><a href="../../Sql/Ui/Console.html#run_command-instance_method" title="Rex::Post::Sql::Ui::Console#run_command (method)">#run_command</a></span>, <span class='object_link'><a href="../../Sql/Ui/Console.html#sql_prompt-instance_method" title="Rex::Post::Sql::Ui::Console#sql_prompt (method)">#sql_prompt</a></span></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="inherited">Methods included from <span class='object_link'><a href="../../SessionCompatibleModules.html" title="Rex::Post::SessionCompatibleModules (module)">SessionCompatibleModules</a></span></h3>
|
|
<p class="inherited"><span class='object_link'><a href="../../SessionCompatibleModules.html#format_session_compatible_modules-instance_method" title="Rex::Post::SessionCompatibleModules#format_session_compatible_modules (method)">#format_session_compatible_modules</a></span>, <span class='object_link'><a href="../../SessionCompatibleModules.html#session_compatible_modules-instance_method" title="Rex::Post::SessionCompatibleModules#session_compatible_modules (method)">#session_compatible_modules</a></span></p>
|
|
<div id="constructor_details" class="method_details_list">
|
|
<h2>Constructor Details</h2>
|
|
|
|
<div class="method_details first">
|
|
<h3 class="signature first" id="initialize-instance_method">
|
|
|
|
#<strong>initialize</strong>(session) ⇒ <tt><span class='object_link'><a href="" title="Rex::Post::MySQL::Ui::Console (class)">Console</a></span></tt>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>Initialize the MySQL console.</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
<p class="tag_title">Parameters:</p>
|
|
<ul class="param">
|
|
|
|
<li>
|
|
|
|
<span class='name'>session</span>
|
|
|
|
|
|
<span class='type'>(<tt><span class='object_link'><a href="../../../../Msf/Sessions/MySQL.html" title="Msf::Sessions::MySQL (class)">Msf::Sessions::MySQL</a></span></tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
23
|
|
24
|
|
25
|
|
26
|
|
27
|
|
28
|
|
29
|
|
30
|
|
31
|
|
32
|
|
33
|
|
34
|
|
35
|
|
36
|
|
37
|
|
38
|
|
39
|
|
40
|
|
41
|
|
42
|
|
43
|
|
44
|
|
45</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/rex/post/mysql/ui/console.rb', line 23</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_session'>session</span><span class='rparen'>)</span>
|
|
<span class='comment'># The mysql client context
|
|
</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_session'>session</span> <span class='op'>=</span> <span class='id identifier rubyid_session'>session</span>
|
|
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_client'>client</span> <span class='op'>=</span> <span class='id identifier rubyid_session'>session</span><span class='period'>.</span><span class='id identifier rubyid_client'>client</span>
|
|
<span class='id identifier rubyid_prompt'>prompt</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>%undMySQL @ </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_peerinfo'>peerinfo</span><span class='embexpr_end'>}</span><span class='tstring_content'> (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_current_database'>current_database</span><span class='embexpr_end'>}</span><span class='tstring_content'>)%clr</span><span class='tstring_end'>"</span></span>
|
|
<span class='id identifier rubyid_history_file'>history_file</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="../../../../Msf/Config.html" title="Msf::Config (class)">Config</a></span></span><span class='period'>.</span><span class='id identifier rubyid_history_file_for_session_type'><span class='object_link'><a href="../../../../Msf/Config.html#history_file_for_session_type-class_method" title="Msf::Config.history_file_for_session_type (method)">history_file_for_session_type</a></span></span><span class='lparen'>(</span><span class='label'>session_type:</span> <span class='id identifier rubyid_session'>session</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='label'>interactive:</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
|
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_prompt'>prompt</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>></span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_history_file'>history_file</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='symbol'>:mysql</span><span class='rparen'>)</span>
|
|
|
|
<span class='comment'># Queued commands array
|
|
</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_commands'>commands</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
|
|
|
<span class='comment'># Point the input/output handles elsewhere
|
|
</span> <span class='id identifier rubyid_reset_ui'>reset_ui</span>
|
|
|
|
<span class='id identifier rubyid_enstack_dispatcher'>enstack_dispatcher</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../Post.html" title="Rex::Post (module)">Post</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../MySQL.html" title="Rex::Post::MySQL (module)">MySQL</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Ui.html" title="Rex::Post::MySQL::Ui (module)">Ui</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Rex::Post::MySQL::Ui::Console (class)">Console</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Console/CommandDispatcher.html" title="Rex::Post::MySQL::Ui::Console::CommandDispatcher (module)">CommandDispatcher</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Console/CommandDispatcher/Core.html" title="Rex::Post::MySQL::Ui::Console::CommandDispatcher::Core (class)">Core</a></span></span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_enstack_dispatcher'>enstack_dispatcher</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Rex.html" title="Rex (module)">Rex</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../Post.html" title="Rex::Post (module)">Post</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../MySQL.html" title="Rex::Post::MySQL (module)">MySQL</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Ui.html" title="Rex::Post::MySQL::Ui (module)">Ui</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="" title="Rex::Post::MySQL::Ui::Console (class)">Console</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Console/CommandDispatcher.html" title="Rex::Post::MySQL::Ui::Console::CommandDispatcher (module)">CommandDispatcher</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Console/CommandDispatcher/Client.html" title="Rex::Post::MySQL::Ui::Console::CommandDispatcher::Client (class)">Client</a></span></span><span class='rparen'>)</span>
|
|
<span class='id identifier rubyid_enstack_dispatcher'>enstack_dispatcher</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="../../../../Msf/Ui.html" title="Msf::Ui (module)">Ui</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Msf/Ui/Console.html" title="Msf::Ui::Console (module)">Console</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Msf/Ui/Console/CommandDispatcher.html" title="Msf::Ui::Console::CommandDispatcher (module)">CommandDispatcher</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../../../Msf/Ui/Console/CommandDispatcher/LocalFileSystem.html" title="Msf::Ui::Console::CommandDispatcher::LocalFileSystem (class)">LocalFileSystem</a></span></span><span class='rparen'>)</span>
|
|
|
|
<span class='comment'># Set up logging to whatever logsink 'core' is using
|
|
</span> <span class='kw'>if</span> <span class='op'>!</span> <span class='gvar'>$dispatcher</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mysql</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
|
<span class='gvar'>$dispatcher</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mysql</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='gvar'>$dispatcher</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>core</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
|
<span class='kw'>end</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="instance_attr_details" class="attr_details">
|
|
<h2>Instance Attribute Details</h2>
|
|
|
|
|
|
<span id="client=-instance_method"></span>
|
|
<div class="method_details first">
|
|
<h3 class="signature first" id="client-instance_method">
|
|
|
|
#<strong>client</strong> ⇒ <tt>MySQL::Client</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>MySQL::Client</tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
51
|
|
52
|
|
53</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/rex/post/mysql/ui/console.rb', line 51</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_client'>client</span>
|
|
<span class='ivar'>@client</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<span id="commands=-instance_method"></span>
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="commands-instance_method">
|
|
|
|
#<strong>commands</strong> ⇒ <tt>Object</tt> <span class="extras">(protected)</span>
|
|
|
|
|
|
|
|
|
|
|
|
</h3><div class="docstring">
|
|
<div class="discussion">
|
|
|
|
<p>:nodoc:</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tags">
|
|
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
56
|
|
57
|
|
58</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/rex/post/mysql/ui/console.rb', line 56</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_commands'>commands</span>
|
|
<span class='ivar'>@commands</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<span id="session=-instance_method"></span>
|
|
<div class="method_details ">
|
|
<h3 class="signature " id="session-instance_method">
|
|
|
|
#<strong>session</strong> ⇒ <tt><span class='object_link'><a href="../../../../Msf/Sessions/MySQL.html" title="Msf::Sessions::MySQL (class)">Msf::Sessions::MySQL</a></span></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><span class='object_link'><a href="../../../../Msf/Sessions/MySQL.html" title="Msf::Sessions::MySQL (class)">Msf::Sessions::MySQL</a></span></tt>)</span>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div><table class="source_code">
|
|
<tr>
|
|
<td>
|
|
<pre class="lines">
|
|
|
|
|
|
48
|
|
49
|
|
50</pre>
|
|
</td>
|
|
<td>
|
|
<pre class="code"><span class="info file"># File 'lib/rex/post/mysql/ui/console.rb', line 48</span>
|
|
|
|
<span class='kw'>def</span> <span class='id identifier rubyid_session'>session</span>
|
|
<span class='ivar'>@session</span>
|
|
<span class='kw'>end</span></pre>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div id="footer">
|
|
Generated on Fri May 8 17:04:17 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> |