Updated rdoc.
This commit is contained in:
@@ -100,6 +100,8 @@
|
||||
|
||||
<li><a href="#method-i-version">#version</a>
|
||||
|
||||
<li><a href="#method-i-wp_org_url">#wp_org_url</a>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
@@ -405,7 +407,7 @@
|
||||
|
||||
|
||||
<div class="method-source-code" id="3C-3D-3E-source">
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 122</span>
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 128</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-operator"><=></span>(<span class="ruby-identifier">other</span>)
|
||||
<span class="ruby-identifier">other</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator"><=></span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">name</span>
|
||||
<span class="ruby-keyword">end</span></pre>
|
||||
@@ -435,7 +437,7 @@
|
||||
|
||||
|
||||
<div class="method-source-code" id="3D-3D-source">
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 112</span>
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 118</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">other</span>)
|
||||
<span class="ruby-identifier">other</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">name</span>
|
||||
<span class="ruby-keyword">end</span></pre>
|
||||
@@ -465,7 +467,7 @@
|
||||
|
||||
|
||||
<div class="method-source-code" id="3D-3D-3D-source">
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 117</span>
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 123</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-operator">===</span>(<span class="ruby-identifier">other</span>)
|
||||
<span class="ruby-identifier">other</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">name</span>
|
||||
<span class="ruby-keyword">end</span></pre>
|
||||
@@ -495,7 +497,7 @@
|
||||
|
||||
|
||||
<div class="method-source-code" id="changelog_url-source">
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 132</span>
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 138</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">changelog_url</span>
|
||||
<span class="ruby-identifier">get_url_without_filename</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-string">"changelog.txt"</span>)
|
||||
<span class="ruby-keyword">end</span></pre>
|
||||
@@ -525,7 +527,7 @@
|
||||
|
||||
|
||||
<div class="method-source-code" id="directory_listing-3F-source">
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 95</span>
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 101</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">get_url_without_filename</span>).<span class="ruby-identifier">body</span>[<span class="ruby-regexp">%r{<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>
|
||||
@@ -556,7 +558,7 @@
|
||||
|
||||
|
||||
<div class="method-source-code" id="extract_name_from_url-source">
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 101</span>
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 107</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">extract_name_from_url</span>
|
||||
<span class="ruby-identifier">get_full_url</span>.<span class="ruby-identifier">to_s</span>[<span class="ruby-regexp">%r{^(https?://.*/([^/]+)/)}</span>, <span class="ruby-value">2</span>]
|
||||
<span class="ruby-keyword">end</span></pre>
|
||||
@@ -586,7 +588,7 @@
|
||||
|
||||
|
||||
<div class="method-source-code" id="get_full_url-source">
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 57</span>
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 63</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_full_url</span>
|
||||
<span class="ruby-identifier">url</span> = <span class="ruby-ivar">@base_url</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">end_with?</span>(<span class="ruby-string">"/"</span>) <span class="ruby-operator">?</span> <span class="ruby-ivar">@base_url</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">:</span> <span class="ruby-node">"#@base_url/"</span>
|
||||
<span class="ruby-comment"># remove first and last /</span>
|
||||
@@ -630,7 +632,7 @@
|
||||
|
||||
|
||||
<div class="method-source-code" id="get_sub_folder-source">
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 43</span>
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 49</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_sub_folder</span>
|
||||
<span class="ruby-keyword">case</span> <span class="ruby-ivar">@type</span>
|
||||
<span class="ruby-keyword">when</span> <span class="ruby-string">"themes"</span>
|
||||
@@ -669,7 +671,7 @@
|
||||
|
||||
|
||||
<div class="method-source-code" id="get_url_without_filename-source">
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 76</span>
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 82</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_url_without_filename</span>
|
||||
<span class="ruby-identifier">location_url</span> = <span class="ruby-identifier">get_full_url</span>.<span class="ruby-identifier">to_s</span>
|
||||
<span class="ruby-identifier">valid_location_url</span> = <span class="ruby-identifier">location_url</span>[<span class="ruby-regexp">%r{^(https?://.*/)[^.]+\.[^/]+$}</span>, <span class="ruby-value">1</span>]
|
||||
@@ -704,7 +706,7 @@
|
||||
|
||||
|
||||
<div class="method-source-code" id="has_changelog-3F-source">
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 146</span>
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 152</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">has_changelog?</span>
|
||||
<span class="ruby-keyword">unless</span> <span class="ruby-ivar">@changelog</span>
|
||||
<span class="ruby-identifier">status</span> = <span class="ruby-constant">Browser</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">changelog_url</span>).<span class="ruby-identifier">code</span>
|
||||
@@ -738,7 +740,7 @@
|
||||
|
||||
|
||||
<div class="method-source-code" id="has_readme-3F-source">
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 137</span>
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 143</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">has_readme?</span>
|
||||
<span class="ruby-keyword">unless</span> <span class="ruby-ivar">@readme</span>
|
||||
<span class="ruby-identifier">status</span> = <span class="ruby-constant">Browser</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">readme_url</span>).<span class="ruby-identifier">code</span>
|
||||
@@ -772,7 +774,7 @@
|
||||
|
||||
|
||||
<div class="method-source-code" id="readme_url-source">
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 127</span>
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 133</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">readme_url</span>
|
||||
<span class="ruby-identifier">get_url_without_filename</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-string">"readme.txt"</span>)
|
||||
<span class="ruby-keyword">end</span></pre>
|
||||
@@ -802,7 +804,7 @@
|
||||
|
||||
|
||||
<div class="method-source-code" id="to_s-source">
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 106</span>
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 112</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.strip if item_version}"</span>
|
||||
@@ -833,7 +835,7 @@
|
||||
|
||||
|
||||
<div class="method-source-code" id="version-source">
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 86</span>
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 92</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_full_url</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-string">"readme.txt"</span>).<span class="ruby-identifier">to_s</span>)
|
||||
@@ -851,6 +853,37 @@
|
||||
</div><!-- version-method -->
|
||||
|
||||
|
||||
<div id="method-i-wp_org_url" class="method-detail ">
|
||||
|
||||
<div class="method-heading">
|
||||
<span class="method-name">wp_org_url</span><span
|
||||
class="method-args">()</span>
|
||||
<span class="method-click-advice">click to toggle source</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="method-description">
|
||||
|
||||
<p>The wordpress.org plugins directory URL See: <a
|
||||
href="https://github.com/wpscanteam/wpscan/issues/100">github.com/wpscanteam/wpscan/issues/100</a></p>
|
||||
|
||||
|
||||
|
||||
<div class="method-source-code" id="wp_org_url-source">
|
||||
<pre><span class="ruby-comment"># File lib/wpscan/wp_item.rb, line 45</span>
|
||||
<span class="ruby-keyword">def</span> <span class="ruby-identifier">wp_org_url</span>
|
||||
<span class="ruby-constant">URI</span>(<span class="ruby-string">'http://wordpress.org/extend/plugins/'</span>).<span class="ruby-identifier">merge</span>(<span class="ruby-node">"#@name/"</span>)
|
||||
<span class="ruby-keyword">end</span></pre>
|
||||
</div><!-- wp_org_url-source -->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- wp_org_url-method -->
|
||||
|
||||
|
||||
</section><!-- public-instance-method-details -->
|
||||
|
||||
</section><!-- 5Buntitled-5D -->
|
||||
|
||||
Reference in New Issue
Block a user