Files
wpscan/doc_yard/WpItems.html
Christian Mehlmauer bf10b25291 docs
2013-07-19 23:10:56 +02:00

770 lines
23 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Class: WpItems
&mdash; Documentation by YARD 0.8.5.2
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
hasFrames = window.top.frames.main ? true : false;
relpath = '';
framesUrl = "frames.html#!" + escape(window.location.href);
</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 id="header">
<div id="menu">
<a href="_index.html">Index (W)</a> &raquo;
<span class="title">WpItems</span>
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="class_list.html">
Class List
</a>
<a class="full_list_link" id="method_list_link"
href="method_list.html">
Method List
</a>
<a class="full_list_link" id="file_list_link"
href="file_list.html">
File List
</a>
</div>
<div class="clear"></div>
</div>
<iframe id="search_frame"></iframe>
<div id="content"><h1>Class: WpItems
</h1>
<dl class="box">
<dt class="r1">Inherits:</dt>
<dd class="r1">
<span class="inheritName"><span class='object_link'><a href="Array.html" title="Array (class)">Array</a></span></span>
<ul class="fullTree">
<li>Object</li>
<li class="next"><span class='object_link'><a href="Array.html" title="Array (class)">Array</a></span></li>
<li class="next">WpItems</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
<dt class="r2">Extended by:</dt>
<dd class="r2"><span class='object_link'><a href="WpItems/Detectable.html" title="WpItems::Detectable (module)">Detectable</a></span></dd>
<dt class="r1">Includes:</dt>
<dd class="r1"><span class='object_link'><a href="WpItems/Output.html" title="WpItems::Output (module)">Output</a></span></dd>
<dt class="r2 last">Defined in:</dt>
<dd class="r2 last">lib/common/collections/wp_items.rb<span class="defines">,<br />
lib/common/collections/wp_items/output.rb,<br /> lib/common/collections/wp_items/detectable.rb</span>
</dd>
</dl>
<div class="clear"></div>
<div id="subclasses">
<h2>Direct Known Subclasses</h2>
<p class="children"><span class='object_link'><a href="WpPlugins.html" title="WpPlugins (class)">WpPlugins</a></span>, <span class='object_link'><a href="WpThemes.html" title="WpThemes (class)">WpThemes</a></span>, <span class='object_link'><a href="WpTimthumbs.html" title="WpTimthumbs (class)">WpTimthumbs</a></span>, <span class='object_link'><a href="WpUsers.html" title="WpUsers (class)">WpUsers</a></span></p>
</div>
<h2>Defined Under Namespace</h2>
<p class="children">
<strong class="modules">Modules:</strong> <span class='object_link'><a href="WpItems/Detectable.html" title="WpItems::Detectable (module)">Detectable</a></span>, <span class='object_link'><a href="WpItems/Output.html" title="WpItems::Output (module)">Output</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="#wp_target-instance_method" title="#wp_target (instance method)">- (Object) <strong>wp_target</strong> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute wp_target.</p>
</div></span>
</li>
</ul>
<h3 class="inherited">Attributes included from <span class='object_link'><a href="WpItems/Detectable.html" title="WpItems::Detectable (module)">Detectable</a></span></h3>
<p class="inherited"><span class='object_link'><a href="WpItems/Detectable.html#item_xpath-instance_method" title="WpItems::Detectable#item_xpath (method)">#item_xpath</a></span>, <span class='object_link'><a href="WpItems/Detectable.html#vulns_file-instance_method" title="WpItems::Detectable#vulns_file (method)">#vulns_file</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="#%2B-instance_method" title="#+ (instance method)">- (self) <strong>+</strong>(other) </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#add-instance_method" title="#add (instance method)">- (void) <strong>add</strong>(*args) </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#create_item-instance_method" title="#create_item (instance method)">- (WpItem) <strong>create_item</strong>(name, attrs = {}) </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#initialize-instance_method" title="#initialize (instance method)">- (WpItems) <strong>initialize</strong>(wp_target = nil) </a>
</span>
<span class="note title constructor">constructor</span>
<span class="summary_desc"><div class='inline'>
<p>A new instance of WpItems.</p>
</div></span>
</li>
<li class="protected ">
<span class="summary_signature">
<a href="#item_class-instance_method" title="#item_class (instance method)">- (Class) <strong>item_class</strong> </a>
</span>
<span class="note title protected">protected</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
</ul>
<h3 class="inherited">Methods included from <span class='object_link'><a href="WpItems/Detectable.html" title="WpItems::Detectable (module)">Detectable</a></span></h3>
<p class="inherited"><span class='object_link'><a href="WpItems/Detectable.html#aggressive_detection-instance_method" title="WpItems::Detectable#aggressive_detection (method)">aggressive_detection</a></span>, <span class='object_link'><a href="WpItems/Detectable.html#item_options-instance_method" title="WpItems::Detectable#item_options (method)">item_options</a></span>, <span class='object_link'><a href="WpItems/Detectable.html#passive_detection-instance_method" title="WpItems::Detectable#passive_detection (method)">passive_detection</a></span>, <span class='object_link'><a href="WpItems/Detectable.html#progress_bar-instance_method" title="WpItems::Detectable#progress_bar (method)">progress_bar</a></span>, <span class='object_link'><a href="WpItems/Detectable.html#request_params-instance_method" title="WpItems::Detectable#request_params (method)">request_params</a></span>, <span class='object_link'><a href="WpItems/Detectable.html#targets_items-instance_method" title="WpItems::Detectable#targets_items (method)">targets_items</a></span>, <span class='object_link'><a href="WpItems/Detectable.html#targets_items_from_file-instance_method" title="WpItems::Detectable#targets_items_from_file (method)">targets_items_from_file</a></span>, <span class='object_link'><a href="WpItems/Detectable.html#vulnerable_targets_items-instance_method" title="WpItems::Detectable#vulnerable_targets_items (method)">vulnerable_targets_items</a></span></p>
<h3 class="inherited">Methods included from <span class='object_link'><a href="WpItems/Output.html" title="WpItems::Output (module)">Output</a></span></h3>
<p class="inherited"><span class='object_link'><a href="WpItems/Output.html#output-instance_method" title="WpItems::Output#output (method)">#output</a></span></p>
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="Array.html" title="Array (class)">Array</a></span></h3>
<p class="inherited"><span class='object_link'><a href="Array.html#_grep_-instance_method" title="Array#_grep_ (method)">#_grep_</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">
- (<tt><span class='object_link'><a href="" title="WpItems (class)">WpItems</a></span></tt>) <strong>initialize</strong>(wp_target = nil)
</h3><div class="docstring">
<div class="discussion">
<p>A new instance of WpItems</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>wp_target</span>
<span class='type'>(<tt><span class='object_link'><a href="WpTarget.html" title="WpTarget (class)">WpTarget</a></span></tt>)</span>
<em class="default">(defaults to: <tt>nil</tt>)</em>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
13
14
15</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/common/collections/wp_items.rb', line 13</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_wp_target'>wp_target</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_wp_target'>wp_target</span> <span class='op'>=</span> <span class='id identifier rubyid_wp_target'>wp_target</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="wp_target=-instance_method"></span>
<div class="method_details first">
<h3 class="signature first" id="wp_target-instance_method">
- (<tt>Object</tt>) <strong>wp_target</strong>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute wp_target</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
10
11
12</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/common/collections/wp_items.rb', line 10</span>
<span class='kw'>def</span> <span class='id identifier rubyid_wp_target'>wp_target</span>
<span class='ivar'>@wp_target</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="+-instance_method">
- (<tt>self</tt>) <strong>+</strong>(other)
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>other</span>
<span class='type'>(<tt><span class='object_link'><a href="" title="WpItems (class)">WpItems</a></span></tt>)</span>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>self</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
64
65
66
67</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/common/collections/wp_items.rb', line 64</span>
<span class='kw'>def</span> <span class='op'>+</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
<span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_item'>item</span><span class='op'>|</span> <span class='kw'>self</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_item'>item</span> <span class='rbrace'>}</span>
<span class='kw'>self</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="add-instance_method">
- (<tt>void</tt>) <strong>add</strong>(*args)
</h3><div class="docstring">
<div class="discussion">
<p class="note returns_void">This method returns an undefined value.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>argv</span>
<span class='type'>(<tt>String</tt>, <tt></tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/common/collections/wp_items.rb', line 20</span>
<span class='kw'>def</span> <span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
<span class='id identifier rubyid_index'>index</span> <span class='op'>=</span> <span class='int'>0</span>
<span class='kw'>until</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='id identifier rubyid_index'>index</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
<span class='id identifier rubyid_arg'>arg</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='id identifier rubyid_index'>index</span><span class='rbracket'>]</span>
<span class='kw'>if</span> <span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span>
<span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_next_arg'>next_arg</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='id identifier rubyid_index'>index</span> <span class='op'>+</span> <span class='int'>1</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
<span class='id identifier rubyid_item'>item</span> <span class='op'>=</span> <span class='id identifier rubyid_create_item'>create_item</span><span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='comma'>,</span> <span class='id identifier rubyid_next_arg'>next_arg</span><span class='rparen'>)</span>
<span class='id identifier rubyid_index'>index</span> <span class='op'>+=</span> <span class='int'>1</span>
<span class='kw'>else</span>
<span class='id identifier rubyid_item'>item</span> <span class='op'>=</span> <span class='id identifier rubyid_create_item'>create_item</span><span class='lparen'>(</span><span class='id identifier rubyid_arg'>arg</span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='kw'>elsif</span> <span class='id identifier rubyid_arg'>arg</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Item</span><span class='rparen'>)</span>
<span class='id identifier rubyid_item'>item</span> <span class='op'>=</span> <span class='id identifier rubyid_arg'>arg</span>
<span class='kw'>else</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Invalid arguments</span><span class='tstring_end'>'</span></span>
<span class='kw'>end</span>
<span class='kw'>self</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_item'>item</span>
<span class='id identifier rubyid_index'>index</span> <span class='op'>+=</span> <span class='int'>1</span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="create_item-instance_method">
- (<tt><span class='object_link'><a href="WpItem.html" title="WpItem (class)">WpItem</a></span></tt>) <strong>create_item</strong>(name, attrs = {})
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>name</span>
<span class='type'>(<tt>String</tt>)</span>
</li>
<li>
<span class='name'>attrs</span>
<span class='type'>(<tt>Hash</tt>)</span>
<em class="default">(defaults to: <tt>{}</tt>)</em>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt><span class='object_link'><a href="WpItem.html" title="WpItem (class)">WpItem</a></span></tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
48
49
50
51
52
53
54
55
56
57
58
59</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/common/collections/wp_items.rb', line 48</span>
<span class='kw'>def</span> <span class='id identifier rubyid_create_item'>create_item</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_attrs'>attrs</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>wp_target must be set</span><span class='tstring_end'>'</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_wp_target'>wp_target</span>
<span class='id identifier rubyid_item_class'>item_class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
<span class='id identifier rubyid_wp_target'>wp_target</span><span class='period'>.</span><span class='id identifier rubyid_uri'>uri</span><span class='comma'>,</span>
<span class='id identifier rubyid_attrs'>attrs</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span>
<span class='label'>name:</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span>
<span class='label'>wp_content_dir:</span> <span class='id identifier rubyid_wp_target'>wp_target</span><span class='period'>.</span><span class='id identifier rubyid_wp_content_dir'>wp_content_dir</span><span class='comma'>,</span>
<span class='label'>wp_plugins_dir:</span> <span class='id identifier rubyid_wp_target'>wp_target</span><span class='period'>.</span><span class='id identifier rubyid_wp_plugins_dir'>wp_plugins_dir</span>
<span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_oldval'>oldval</span><span class='comma'>,</span> <span class='id identifier rubyid_newval'>newval</span><span class='op'>|</span> <span class='id identifier rubyid_oldval'>oldval</span> <span class='rbrace'>}</span>
<span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="item_class-instance_method">
- (<tt>Class</tt>) <strong>item_class</strong> <span class="extras">(protected)</span>
</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>Class</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
71
72
73</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/common/collections/wp_items.rb', line 71</span>
<span class='kw'>def</span> <span class='id identifier rubyid_item_class'>item_class</span>
<span class='const'>Object</span><span class='period'>.</span><span class='id identifier rubyid_const_get'>const_get</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>.$</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Fri Jul 19 23:10:17 2013 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.5.2 (ruby-1.9.3).
</div>
</body>
</html>