Files
metasploit-gs/api/Msf/Exploit/Git/SmartHttp/Request.html
T
jenkins-metasploit c3f5bd3de2 Reboot gh-pages
2026-05-08 17:08:43 +00:00

918 lines
40 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Class: Msf::Exploit::Git::SmartHttp::Request
&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::Exploit::Git::SmartHttp::Request";
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> &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="../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Git.html" title="Msf::Exploit::Git (module)">Git</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../SmartHttp.html" title="Msf::Exploit::Git::SmartHttp (module)">SmartHttp</a></span></span>
&raquo;
<span class="title">Request</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::Exploit::Git::SmartHttp::Request
</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd>
<span class="inheritName"><span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html" title="Rex::Proto::Http::Request (class)">Rex::Proto::Http::Request</a></span></span>
<ul class="fullTree">
<li>Object</li>
<li class="next"><span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html" title="Rex::Proto::Http::Packet (class)">Rex::Proto::Http::Packet</a></span></li>
<li class="next"><span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html" title="Rex::Proto::Http::Request (class)">Rex::Proto::Http::Request</a></span></li>
<li class="next">Msf::Exploit::Git::SmartHttp::Request</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
</dl>
<dl>
<dt>Includes:</dt>
<dd><span class='object_link'><a href="../PktLine.html" title="Msf::Exploit::Git::PktLine (module)">PktLine</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>lib/msf/core/exploit/git/smart_http/request.rb</dd>
</dl>
</div>
<h2>Constant Summary</h2>
<h3 class="inherited">Constants included
from <span class='object_link'><a href="../PktLine.html" title="Msf::Exploit::Git::PktLine (module)">PktLine</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../PktLine.html#DELIM_PKT-constant" title="Msf::Exploit::Git::PktLine::DELIM_PKT (constant)">PktLine::DELIM_PKT</a></span>, <span class='object_link'><a href="../PktLine.html#FLUSH_PKT-constant" title="Msf::Exploit::Git::PktLine::FLUSH_PKT (constant)">PktLine::FLUSH_PKT</a></span>, <span class='object_link'><a href="../PktLine.html#RESPONSE_END_PKT-constant" title="Msf::Exploit::Git::PktLine::RESPONSE_END_PKT (constant)">PktLine::RESPONSE_END_PKT</a></span></p>
<h3 class="inherited">Constants inherited
from <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html" title="Rex::Proto::Http::Request (class)">Rex::Proto::Http::Request</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#PostRequests-constant" title="Rex::Proto::Http::Request::PostRequests (constant)">Rex::Proto::Http::Request::PostRequests</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="#haves-instance_method" title="#haves (instance method)">#<strong>haves</strong> &#x21d2; Object </a>
</span>
<span class="note title readonly">readonly</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute haves.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#method-instance_method" title="#method (instance method)">#<strong>method</strong> &#x21d2; Object </a>
</span>
<span class="note title readonly">readonly</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute method.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#service-instance_method" title="#service (instance method)">#<strong>service</strong> &#x21d2; Object </a>
</span>
<span class="note title readonly">readonly</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute service.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#type-instance_method" title="#type (instance method)">#<strong>type</strong> &#x21d2; Object </a>
</span>
<span class="note title readonly">readonly</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute type.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#uri-instance_method" title="#uri (instance method)">#<strong>uri</strong> &#x21d2; Object </a>
</span>
<span class="note title readonly">readonly</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute uri.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#wants-instance_method" title="#wants (instance method)">#<strong>wants</strong> &#x21d2; Object </a>
</span>
<span class="note title readonly">readonly</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute wants.</p>
</div></span>
</li>
</ul>
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html" title="Rex::Proto::Http::Request (class)">Rex::Proto::Http::Request</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#junk_directories-instance_method" title="Rex::Proto::Http::Request#junk_directories (method)">#junk_directories</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#junk_end_of_uri-instance_method" title="Rex::Proto::Http::Request#junk_end_of_uri (method)">#junk_end_of_uri</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#junk_param_start-instance_method" title="Rex::Proto::Http::Request#junk_param_start (method)">#junk_param_start</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#junk_params-instance_method" title="Rex::Proto::Http::Request#junk_params (method)">#junk_params</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#junk_pipeline-instance_method" title="Rex::Proto::Http::Request#junk_pipeline (method)">#junk_pipeline</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#junk_self_referring_directories-instance_method" title="Rex::Proto::Http::Request#junk_self_referring_directories (method)">#junk_self_referring_directories</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#junk_slashes-instance_method" title="Rex::Proto::Http::Request#junk_slashes (method)">#junk_slashes</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#proto-instance_method" title="Rex::Proto::Http::Request#proto (method)">#proto</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#raw_uri-instance_method" title="Rex::Proto::Http::Request#raw_uri (method)">#raw_uri</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#relative_resource-instance_method" title="Rex::Proto::Http::Request#relative_resource (method)">#relative_resource</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#uri_encode_mode-instance_method" title="Rex::Proto::Http::Request#uri_encode_mode (method)">#uri_encode_mode</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#uri_parts-instance_method" title="Rex::Proto::Http::Request#uri_parts (method)">#uri_parts</a></span></p>
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html" title="Rex::Proto::Http::Packet (class)">Rex::Proto::Http::Packet</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#auto_cl-instance_method" title="Rex::Proto::Http::Packet#auto_cl (method)">#auto_cl</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#body-instance_method" title="Rex::Proto::Http::Packet#body (method)">#body</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#body_bytes_left-instance_method" title="Rex::Proto::Http::Packet#body_bytes_left (method)">#body_bytes_left</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#bufq-instance_method" title="Rex::Proto::Http::Packet#bufq (method)">#bufq</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#chunk_max_size-instance_method" title="Rex::Proto::Http::Packet#chunk_max_size (method)">#chunk_max_size</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#chunk_min_size-instance_method" title="Rex::Proto::Http::Packet#chunk_min_size (method)">#chunk_min_size</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#compress-instance_method" title="Rex::Proto::Http::Packet#compress (method)">#compress</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#error-instance_method" title="Rex::Proto::Http::Packet#error (method)">#error</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#headers-instance_method" title="Rex::Proto::Http::Packet#headers (method)">#headers</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#incomplete-instance_method" title="Rex::Proto::Http::Packet#incomplete (method)">#incomplete</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#inside_chunk-instance_method" title="Rex::Proto::Http::Packet#inside_chunk (method)">#inside_chunk</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#keepalive-instance_method" title="Rex::Proto::Http::Packet#keepalive (method)">#keepalive</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#max_data-instance_method" title="Rex::Proto::Http::Packet#max_data (method)">#max_data</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#state-instance_method" title="Rex::Proto::Http::Packet#state (method)">#state</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#transfer_chunked-instance_method" title="Rex::Proto::Http::Packet#transfer_chunked (method)">#transfer_chunked</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="#parse_raw_request-class_method" title="parse_raw_request (class method)">.<strong>parse_raw_request</strong>(request) &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
</ul>
<h2>
Instance Method Summary
<small><a href="#" class="summary_toggle">collapse</a></small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(opts = {}) &#x21d2; Request </a>
</span>
<span class="note title constructor">constructor</span>
<span class="summary_desc"><div class='inline'>
<p>A new instance of Request.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#populate_wants_haves-instance_method" title="#populate_wants_haves (instance method)">#<strong>populate_wants_haves</strong> &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
</ul>
<h3 class="inherited">Methods included from <span class='object_link'><a href="../PktLine.html" title="Msf::Exploit::Git::PktLine (module)">PktLine</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../PktLine.html#generate_data_pkt-class_method" title="Msf::Exploit::Git::PktLine.generate_data_pkt (method)">generate_data_pkt</a></span>, <span class='object_link'><a href="../PktLine.html#generate_pkt_line-class_method" title="Msf::Exploit::Git::PktLine.generate_pkt_line (method)">generate_pkt_line</a></span>, <span class='object_link'><a href="../PktLine.html#get_pkt_line_data-class_method" title="Msf::Exploit::Git::PktLine.get_pkt_line_data (method)">get_pkt_line_data</a></span>, <span class='object_link'><a href="../PktLine.html#get_pkt_lines-class_method" title="Msf::Exploit::Git::PktLine.get_pkt_lines (method)">get_pkt_lines</a></span>, <span class='object_link'><a href="../PktLine.html#has_pkt_line_data%3F-class_method" title="Msf::Exploit::Git::PktLine.has_pkt_line_data? (method)">has_pkt_line_data?</a></span>, <span class='object_link'><a href="../PktLine.html#request_ends-class_method" title="Msf::Exploit::Git::PktLine.request_ends (method)">request_ends</a></span></p>
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html" title="Rex::Proto::Http::Request (class)">Rex::Proto::Http::Request</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#body-instance_method" title="Rex::Proto::Http::Request#body (method)">#body</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#cmd_string-instance_method" title="Rex::Proto::Http::Request#cmd_string (method)">#cmd_string</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#meta_vars-instance_method" title="Rex::Proto::Http::Request#meta_vars (method)">#meta_vars</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#normalize!-instance_method" title="Rex::Proto::Http::Request#normalize! (method)">#normalize!</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#param_string-instance_method" title="Rex::Proto::Http::Request#param_string (method)">#param_string</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#parse_cgi_qstring-instance_method" title="Rex::Proto::Http::Request#parse_cgi_qstring (method)">#parse_cgi_qstring</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#qstring-instance_method" title="Rex::Proto::Http::Request#qstring (method)">#qstring</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#resource-instance_method" title="Rex::Proto::Http::Request#resource (method)">#resource</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#resource=-instance_method" title="Rex::Proto::Http::Request#resource= (method)">#resource=</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#to_s-instance_method" title="Rex::Proto::Http::Request#to_s (method)">#to_s</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#update_cmd_parts-instance_method" title="Rex::Proto::Http::Request#update_cmd_parts (method)">#update_cmd_parts</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#update_uri_parts-instance_method" title="Rex::Proto::Http::Request#update_uri_parts (method)">#update_uri_parts</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Request.html#uri=-instance_method" title="Rex::Proto::Http::Request#uri= (method)">#uri=</a></span></p>
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html" title="Rex::Proto::Http::Packet (class)">Rex::Proto::Http::Packet</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#[]-instance_method" title="Rex::Proto::Http::Packet#[] (method)">#[]</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#[]=-instance_method" title="Rex::Proto::Http::Packet#[]= (method)">#[]=</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#check_100-instance_method" title="Rex::Proto::Http::Packet#check_100 (method)">#check_100</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#chunk-instance_method" title="Rex::Proto::Http::Packet#chunk (method)">#chunk</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#cmd_string-instance_method" title="Rex::Proto::Http::Packet#cmd_string (method)">#cmd_string</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#completed%3F-instance_method" title="Rex::Proto::Http::Packet#completed? (method)">#completed?</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#from_s-instance_method" title="Rex::Proto::Http::Packet#from_s (method)">#from_s</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#output_packet-instance_method" title="Rex::Proto::Http::Packet#output_packet (method)">#output_packet</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#parse-instance_method" title="Rex::Proto::Http::Packet#parse (method)">#parse</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#parse_body-instance_method" title="Rex::Proto::Http::Packet#parse_body (method)">#parse_body</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#parse_header-instance_method" title="Rex::Proto::Http::Packet#parse_header (method)">#parse_header</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#reset-instance_method" title="Rex::Proto::Http::Packet#reset (method)">#reset</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#reset_except_queue-instance_method" title="Rex::Proto::Http::Packet#reset_except_queue (method)">#reset_except_queue</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#to_s-instance_method" title="Rex::Proto::Http::Packet#to_s (method)">#to_s</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#to_terminal_output-instance_method" title="Rex::Proto::Http::Packet#to_terminal_output (method)">#to_terminal_output</a></span>, <span class='object_link'><a href="../../../../Rex/Proto/Http/Packet.html#update_cmd_parts-instance_method" title="Rex::Proto::Http::Packet#update_cmd_parts (method)">#update_cmd_parts</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>(opts = {}) &#x21d2; <tt><span class='object_link'><a href="" title="Msf::Exploit::Git::SmartHttp::Request (class)">Request</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns a new instance of Request.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
8
9
10
11
12
13
14
15
16
17
18</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/git/smart_http/request.rb', line 8</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
<span class='ivar'>@uri</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uri</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/</span><span class='tstring_end'>&#39;</span></span>
<span class='ivar'>@type</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span>
<span class='ivar'>@method</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:method</span><span class='rbracket'>]</span>
<span class='kw'>super</span><span class='lparen'>(</span><span class='ivar'>@method</span><span class='comma'>,</span> <span class='ivar'>@uri</span><span class='rparen'>)</span>
<span class='ivar'>@service</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:service</span><span class='rbracket'>]</span>
<span class='ivar'>@body</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:body</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
<span class='ivar'>@wants</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:wants</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='ivar'>@haves</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:haves</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='lbracket'>[</span><span class='rbracket'>]</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=""></span>
<div class="method_details first">
<h3 class="signature first" id="haves-instance_method">
#<strong>haves</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute haves.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
6
7
8</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/git/smart_http/request.rb', line 6</span>
<span class='kw'>def</span> <span class='id identifier rubyid_haves'>haves</span>
<span class='ivar'>@haves</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id=""></span>
<div class="method_details ">
<h3 class="signature " id="method-instance_method">
#<strong>method</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute method.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
6
7
8</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/git/smart_http/request.rb', line 6</span>
<span class='kw'>def</span> <span class='id identifier rubyid_method'>method</span>
<span class='ivar'>@method</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id=""></span>
<div class="method_details ">
<h3 class="signature " id="service-instance_method">
#<strong>service</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute service.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
6
7
8</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/git/smart_http/request.rb', line 6</span>
<span class='kw'>def</span> <span class='id identifier rubyid_service'>service</span>
<span class='ivar'>@service</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id=""></span>
<div class="method_details ">
<h3 class="signature " id="type-instance_method">
#<strong>type</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute type.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
6
7
8</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/git/smart_http/request.rb', line 6</span>
<span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span>
<span class='ivar'>@type</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id=""></span>
<div class="method_details ">
<h3 class="signature " id="uri-instance_method">
#<strong>uri</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute uri.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
6
7
8</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/git/smart_http/request.rb', line 6</span>
<span class='kw'>def</span> <span class='id identifier rubyid_uri'><span class='object_link'><a href="../../../../top-level-namespace.html#uri-instance_method" title="#uri (method)">uri</a></span></span>
<span class='ivar'>@uri</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id=""></span>
<div class="method_details ">
<h3 class="signature " id="wants-instance_method">
#<strong>wants</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute wants.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
6
7
8</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/git/smart_http/request.rb', line 6</span>
<span class='kw'>def</span> <span class='id identifier rubyid_wants'>wants</span>
<span class='ivar'>@wants</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="class_method_details" class="method_details_list">
<h2>Class Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="parse_raw_request-class_method">
.<strong>parse_raw_request</strong>(request) &#x21d2; <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/git/smart_http/request.rb', line 34</span>
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_parse_raw_request'>parse_raw_request</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_request'>request</span>
<span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
<span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uri</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_raw_uri'>raw_uri</span>
<span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:method</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_method'>method</span>
<span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:body</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_body'>body</span>
<span class='comment'># only the ref-discovery request should have a query
</span> <span class='comment'># string and no body
</span> <span class='id identifier rubyid_service_str'>service_str</span> <span class='op'>=</span> <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_uri_parts'>uri_parts</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>QueryString</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
<span class='kw'>if</span> <span class='id identifier rubyid_service_str'>service_str</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>service</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_service_str'>service_str</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>service</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
<span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:service</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_service_str'>service_str</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>service</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
<span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>ref-discovery</span><span class='tstring_end'>&#39;</span></span>
<span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:uri</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_raw_uri'>raw_uri</span>
<span class='kw'>return</span> <span class='const'><span class='object_link'><a href="" title="Msf::Exploit::Git::SmartHttp::Request (class)">Request</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Msf::Exploit::Git::SmartHttp::Request#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_type_str'>type_str</span> <span class='op'>=</span> <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_raw_uri'>raw_uri</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span>
<span class='kw'>if</span> <span class='id identifier rubyid_type_str'>type_str</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>git-(\w+-\w+)</span><span class='regexp_end'>/</span></span>
<span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='backref'>$1</span>
<span class='kw'>else</span>
<span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:type</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>other</span><span class='tstring_end'>&#39;</span></span>
<span class='kw'>end</span>
<span class='const'><span class='object_link'><a href="" title="Msf::Exploit::Git::SmartHttp::Request (class)">Request</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Msf::Exploit::Git::SmartHttp::Request#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</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="populate_wants_haves-instance_method">
#<strong>populate_wants_haves</strong> &#x21d2; <tt>Object</tt>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
20
21
22
23
24
25
26
27
28
29
30
31
32</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/msf/core/exploit/git/smart_http/request.rb', line 20</span>
<span class='kw'>def</span> <span class='id identifier rubyid_populate_wants_haves'>populate_wants_haves</span>
<span class='id identifier rubyid_pkt_lines'>pkt_lines</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="../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Git.html" title="Msf::Exploit::Git (module)">Git</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../PktLine.html" title="Msf::Exploit::Git::PktLine (module)">PktLine</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get_pkt_lines'><span class='object_link'><a href="../PktLine.html#get_pkt_lines-class_method" title="Msf::Exploit::Git::PktLine.get_pkt_lines (method)">get_pkt_lines</a></span></span><span class='lparen'>(</span><span class='ivar'>@body</span><span class='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_pkt_lines'>pkt_lines</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
<span class='kw'>return</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_pkt_lines'>pkt_lines</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_line'>line</span><span class='op'>|</span>
<span class='id identifier rubyid_data'>data</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="../../../Exploit.html" title="Msf::Exploit (class)">Exploit</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Git.html" title="Msf::Exploit::Git (module)">Git</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../PktLine.html" title="Msf::Exploit::Git::PktLine (module)">PktLine</a></span></span><span class='period'>.</span><span class='id identifier rubyid_get_pkt_line_data'><span class='object_link'><a href="../PktLine.html#get_pkt_line_data-class_method" title="Msf::Exploit::Git::PktLine.get_pkt_line_data (method)">get_pkt_line_data</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_line'>line</span><span class='rparen'>)</span>
<span class='id identifier rubyid_values'>values</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span>
<span class='ivar'>@wants</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_values'>values</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_values'>values</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>want</span><span class='tstring_end'>&#39;</span></span>
<span class='ivar'>@haves</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_values'>values</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_values'>values</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>have</span><span class='tstring_end'>&#39;</span></span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Fri May 8 17:03:39 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>