bugfixing
This commit is contained in:
@@ -67,6 +67,8 @@
|
||||
|
||||
<li><a href="#method-i-get_url">#get_url</a></li>
|
||||
|
||||
<li><a href="#method-i-get_url_without_filename">#get_url_without_filename</a></li>
|
||||
|
||||
<li><a href="#method-i-location_uri_from_file_url">#location_uri_from_file_url</a></li>
|
||||
|
||||
<li><a href="#method-i-to_s">#to_s</a></li>
|
||||
@@ -209,13 +211,13 @@
|
||||
<h3 class="section-header">Attributes</h3>
|
||||
|
||||
|
||||
<div id="base_url-attribute-method" class="method-detail">
|
||||
<a name="base_url"></a>
|
||||
<div id="path-attribute-method" class="method-detail">
|
||||
<a name="path"></a>
|
||||
|
||||
<a name="base_url="></a>
|
||||
<a name="path="></a>
|
||||
|
||||
<div class="method-heading attribute-method-heading">
|
||||
<span class="method-name">base_url</span><span
|
||||
<span class="method-name">path</span><span
|
||||
class="attribute-access-type">[RW]</span>
|
||||
</div>
|
||||
|
||||
@@ -226,13 +228,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="path-attribute-method" class="method-detail">
|
||||
<a name="path"></a>
|
||||
<div id="url-attribute-method" class="method-detail">
|
||||
<a name="url"></a>
|
||||
|
||||
<a name="path="></a>
|
||||
<a name="url="></a>
|
||||
|
||||
<div class="method-heading attribute-method-heading">
|
||||
<span class="method-name">path</span><span
|
||||
<span class="method-name">url</span><span
|
||||
class="attribute-access-type">[RW]</span>
|
||||
</div>
|
||||
|
||||
@@ -288,7 +290,7 @@
|
||||
|
||||
<div class="method-source-code" id="3C-3D-3E-source">
|
||||
<pre>
|
||||
<span class="ruby-comment"># File lib/wpscan/modules/wp_item.rb, line 54</span>
|
||||
<span class="ruby-comment"># File lib/wpscan/modules/wp_item.rb, line 59</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-operator"><=></span>(<span class="ruby-identifier">item</span>)
|
||||
<span class="ruby-identifier">item</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator"><=></span> <span class="ruby-ivar">@name</span>
|
||||
<span class="ruby-keyword">end</span></pre>
|
||||
@@ -321,7 +323,7 @@
|
||||
|
||||
<div class="method-source-code" id="3D-3D-source">
|
||||
<pre>
|
||||
<span class="ruby-comment"># File lib/wpscan/modules/wp_item.rb, line 50</span>
|
||||
<span class="ruby-comment"># File lib/wpscan/modules/wp_item.rb, line 55</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">item</span>)
|
||||
<span class="ruby-identifier">item</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-ivar">@name</span>
|
||||
<span class="ruby-keyword">end</span></pre>
|
||||
@@ -354,7 +356,7 @@
|
||||
|
||||
<div class="method-source-code" id="directory_listing-3F-source">
|
||||
<pre>
|
||||
<span class="ruby-comment"># File lib/wpscan/modules/wp_item.rb, line 36</span>
|
||||
<span class="ruby-comment"># File lib/wpscan/modules/wp_item.rb, line 41</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">directory_listing?</span>
|
||||
<span class="ruby-comment"># Need to remove to file part from the url</span>
|
||||
<span class="ruby-constant">Browser</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">location_uri_from_file_url</span>(<span class="ruby-identifier">get_url</span>.<span class="ruby-identifier">to_s</span>)).<span class="ruby-identifier">body</span>[<span class="ruby-regexp">%{<title>Index of}</span>] <span class="ruby-operator">?</span> <span class="ruby-keyword">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword">false</span>
|
||||
@@ -388,7 +390,7 @@
|
||||
|
||||
<div class="method-source-code" id="extract_name_from_url-source">
|
||||
<pre>
|
||||
<span class="ruby-comment"># File lib/wpscan/modules/wp_item.rb, line 41</span>
|
||||
<span class="ruby-comment"># File lib/wpscan/modules/wp_item.rb, line 46</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">extract_name_from_url</span>(<span class="ruby-identifier">url</span>)
|
||||
<span class="ruby-identifier">url</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-regexp">%{^(https?://.*/([^/]+)/)}</span>, <span class="ruby-value">2</span>]
|
||||
<span class="ruby-keyword">end</span></pre>
|
||||
@@ -423,7 +425,7 @@
|
||||
<pre>
|
||||
<span class="ruby-comment"># File lib/wpscan/modules/wp_item.rb, line 23</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_url</span>
|
||||
<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-node">"#{@base_url.to_s}#@wp_content_dir/#@path"</span>)
|
||||
<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-node">"#{@url.to_s}#@wp_content_dir/#@path"</span>)
|
||||
<span class="ruby-keyword">end</span></pre>
|
||||
</div><!-- get_url-source -->
|
||||
|
||||
@@ -435,6 +437,40 @@
|
||||
</div><!-- get_url-method -->
|
||||
|
||||
|
||||
<div id="get_url_without_filename-method" class="method-detail ">
|
||||
<a name="method-i-get_url_without_filename"></a>
|
||||
|
||||
|
||||
<div class="method-heading">
|
||||
<span class="method-name">get_url_without_filename</span><span
|
||||
class="method-args">()</span>
|
||||
<span class="method-click-advice">click to toggle source</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="method-description">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="method-source-code" id="get_url_without_filename-source">
|
||||
<pre>
|
||||
<span class="ruby-comment"># File lib/wpscan/modules/wp_item.rb, line 27</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_url_without_filename</span>
|
||||
<span class="ruby-identifier">uri</span> = <span class="ruby-identifier">get_url</span>
|
||||
<span class="ruby-constant">URI</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-node">"#{uri.scheme}://#{uri.host}#{File.dirname(uri.path)}"</span>)
|
||||
<span class="ruby-keyword">end</span></pre>
|
||||
</div><!-- get_url_without_filename-source -->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- get_url_without_filename-method -->
|
||||
|
||||
|
||||
<div id="location_uri_from_file_url-method" class="method-detail ">
|
||||
<a name="method-i-location_uri_from_file_url"></a>
|
||||
|
||||
@@ -454,7 +490,7 @@
|
||||
|
||||
<div class="method-source-code" id="location_uri_from_file_url-source">
|
||||
<pre>
|
||||
<span class="ruby-comment"># File lib/wpscan/modules/wp_item.rb, line 58</span>
|
||||
<span class="ruby-comment"># File lib/wpscan/modules/wp_item.rb, line 63</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">location_uri_from_file_url</span>(<span class="ruby-identifier">location_url</span>)
|
||||
<span class="ruby-identifier">valid_location_url</span> = <span class="ruby-identifier">location_url</span>[<span class="ruby-regexp">%{^(https?://.*/)[^.]+\.[^/]+$}</span>, <span class="ruby-value">1</span>]
|
||||
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">valid_location_url</span>
|
||||
@@ -491,7 +527,7 @@
|
||||
|
||||
<div class="method-source-code" id="to_s-source">
|
||||
<pre>
|
||||
<span class="ruby-comment"># File lib/wpscan/modules/wp_item.rb, line 45</span>
|
||||
<span class="ruby-comment"># File lib/wpscan/modules/wp_item.rb, line 50</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
|
||||
<span class="ruby-identifier">item_version</span> = <span class="ruby-identifier">version</span>
|
||||
<span class="ruby-node">"#@name#{' v' + item_version if item_version}"</span>
|
||||
@@ -525,7 +561,7 @@
|
||||
|
||||
<div class="method-source-code" id="version-source">
|
||||
<pre>
|
||||
<span class="ruby-comment"># File lib/wpscan/modules/wp_item.rb, line 27</span>
|
||||
<span class="ruby-comment"># File lib/wpscan/modules/wp_item.rb, line 32</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">version</span>
|
||||
<span class="ruby-keyword">unless</span> <span class="ruby-ivar">@version</span>
|
||||
<span class="ruby-identifier">response</span> = <span class="ruby-constant">Browser</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">get_url</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-string">"readme.txt"</span>).<span class="ruby-identifier">to_s</span>)
|
||||
|
||||
Reference in New Issue
Block a user