Files
wpscan/doc_yard/WpItem/Vulnerable.html
Christian Mehlmauer cd5b45f98b docs
2013-06-09 16:07:04 +02:00

486 lines
12 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>
Module: WpItem::Vulnerable
&mdash; Documentation by YARD 0.8.6.1
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" 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 (V)</a> &raquo;
<span class='title'><span class='object_link'><a href="../WpItem.html" title="WpItem (class)">WpItem</a></span></span>
&raquo;
<span class="title">Vulnerable</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>Module: WpItem::Vulnerable
</h1>
<dl class="box">
<dt class="r1">Included in:</dt>
<dd class="r1"><span class='object_link'><a href="../WpItem.html" title="WpItem (class)">WpItem</a></span></dd>
<dt class="r2 last">Defined in:</dt>
<dd class="r2 last">lib/common/models/wp_item/vulnerable.rb</dd>
</dl>
<div class="clear"></div>
<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="#vulns_file-instance_method" title="#vulns_file (instance method)">- (Object) <strong>vulns_file</strong> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute vulns_file.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#vulns_xpath-instance_method" title="#vulns_xpath (instance method)">- (Object) <strong>vulns_xpath</strong> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns the value of attribute vulns_xpath.</p>
</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="#vulnerabilities-instance_method" title="#vulnerabilities (instance method)">- (Vulnerabilities) <strong>vulnerabilities</strong> </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Get the vulnerabilities associated to the WpItem Filters out already fixed
vulnerabilities.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#vulnerable_to%3F-instance_method" title="#vulnerable_to? (instance method)">- (Boolean) <strong>vulnerable_to?</strong>(vuln) </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Checks if a item is vulnerable to a specific vulnerability.</p>
</div></span>
</li>
</ul>
<div id="instance_attr_details" class="attr_details">
<h2>Instance Attribute Details</h2>
<span id="vulns_file=-instance_method"></span>
<div class="method_details first">
<h3 class="signature first" id="vulns_file-instance_method">
- (<tt>Object</tt>) <strong>vulns_file</strong>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute vulns_file</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
5
6
7</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/common/models/wp_item/vulnerable.rb', line 5</span>
<span class='kw'>def</span> <span class='id identifier rubyid_vulns_file'>vulns_file</span>
<span class='ivar'>@vulns_file</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<span id="vulns_xpath=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="vulns_xpath-instance_method">
- (<tt>Object</tt>) <strong>vulns_xpath</strong>
</h3><div class="docstring">
<div class="discussion">
<p>Returns the value of attribute vulns_xpath</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
5
6
7</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/common/models/wp_item/vulnerable.rb', line 5</span>
<span class='kw'>def</span> <span class='id identifier rubyid_vulns_xpath'>vulns_xpath</span>
<span class='ivar'>@vulns_xpath</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="vulnerabilities-instance_method">
- (<tt><span class='object_link'><a href="../Vulnerabilities.html" title="Vulnerabilities (class)">Vulnerabilities</a></span></tt>) <strong>vulnerabilities</strong>
</h3><div class="docstring">
<div class="discussion">
<p>Get the vulnerabilities associated to the WpItem Filters out already fixed
vulnerabilities</p>
</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="../Vulnerabilities.html" title="Vulnerabilities (class)">Vulnerabilities</a></span></tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
11
12
13
14
15
16
17
18
19
20
21
22</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/common/models/wp_item/vulnerable.rb', line 11</span>
<span class='kw'>def</span> <span class='id identifier rubyid_vulnerabilities'>vulnerabilities</span>
<span class='id identifier rubyid_xml'>xml</span> <span class='op'>=</span> <span class='id identifier rubyid_xml'>xml</span><span class='lparen'>(</span><span class='id identifier rubyid_vulns_file'>vulns_file</span><span class='rparen'>)</span>
<span class='id identifier rubyid_vulnerabilities'>vulnerabilities</span> <span class='op'>=</span> <span class='const'>Vulnerabilities</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='id identifier rubyid_xml'>xml</span><span class='period'>.</span><span class='id identifier rubyid_xpath'>xpath</span><span class='lparen'>(</span><span class='id identifier rubyid_vulns_xpath'>vulns_xpath</span><span class='rparen'>)</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_node'>node</span><span class='op'>|</span>
<span class='id identifier rubyid_vuln'>vuln</span> <span class='op'>=</span> <span class='const'>Vulnerability</span><span class='period'>.</span><span class='id identifier rubyid_load_from_xml_node'>load_from_xml_node</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_vulnerable_to?'>vulnerable_to?</span><span class='lparen'>(</span><span class='id identifier rubyid_vuln'>vuln</span><span class='rparen'>)</span>
<span class='id identifier rubyid_vulnerabilities'>vulnerabilities</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_vuln'>vuln</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_vulnerabilities'>vulnerabilities</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="vulnerable_to?-instance_method">
- (<tt>Boolean</tt>) <strong>vulnerable_to?</strong>(vuln)
</h3><div class="docstring">
<div class="discussion">
<p>Checks if a item is vulnerable to a specific vulnerability</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>vuln</span>
<span class='type'>(<tt><span class='object_link'><a href="../Vulnerability.html" title="Vulnerability (class)">Vulnerability</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>Vulnerability to check the item against</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
29
30
31
32
33
34
35
36
37
38</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/common/models/wp_item/vulnerable.rb', line 29</span>
<span class='kw'>def</span> <span class='id identifier rubyid_vulnerable_to?'>vulnerable_to?</span><span class='lparen'>(</span><span class='id identifier rubyid_vuln'>vuln</span><span class='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_version'>version</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_vuln'>vuln</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_vuln'>vuln</span><span class='period'>.</span><span class='id identifier rubyid_fixed_in'>fixed_in</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_vuln'>vuln</span><span class='period'>.</span><span class='id identifier rubyid_fixed_in'>fixed_in</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
<span class='kw'>unless</span> <span class='const'>VersionCompare</span><span class='op'>::</span><span class='id identifier rubyid_is_newer_or_same?'>is_newer_or_same?</span><span class='lparen'>(</span><span class='id identifier rubyid_vuln'>vuln</span><span class='period'>.</span><span class='id identifier rubyid_fixed_in'>fixed_in</span><span class='comma'>,</span> <span class='id identifier rubyid_version'>version</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='kw'>true</span>
<span class='kw'>end</span>
<span class='kw'>else</span>
<span class='kw'>return</span> <span class='kw'>true</span>
<span class='kw'>end</span>
<span class='kw'>return</span> <span class='kw'>false</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Sun Jun 9 16:05:16 2013 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.6.1 (ruby-1.9.3).
</div>
</body>
</html>