Class: Nexpose::VulnerabilityDetail
- Inherits:
-
Object
- Object
- Nexpose::VulnerabilityDetail
- Defined in:
- lib/nexpose.rb
Overview
Description
Object that represents the details for an entry in the vulnerability database
Instance Attribute Summary collapse
-
#added ⇒ Object
readonly
The date this vulnerability was added to NeXpose.
-
#connection ⇒ Object
readonly
The NSC Connection associated with this object.
-
#cvssScore ⇒ Object
readonly
The CVSS score of this vulnerability.
-
#cvssVector ⇒ Object
readonly
The CVSS vector of this vulnerability.
-
#description ⇒ Object
readonly
The HTML Description of this vulnerability.
-
#error ⇒ Object
readonly
true if an error condition exists; false otherwise.
-
#error_msg ⇒ Object
readonly
Error message string.
-
#id ⇒ Object
readonly
The unique ID string for this vulnerability.
-
#modified ⇒ Object
readonly
The last date this vulnerability was modified.
-
#pciSeverity ⇒ Object
readonly
The pciSeverity of this vulnerability.
-
#published ⇒ Object
readonly
The date this vulnerability was published.
-
#references ⇒ Object
readonly
External References for this vulnerability Array containing (Reference).
-
#request_xml ⇒ Object
readonly
The last XML request sent by this object.
-
#response_xml ⇒ Object
readonly
The last XML response received by this object.
-
#severity ⇒ Object
readonly
The severity of this vulnerability (1 – 10).
-
#solution ⇒ Object
readonly
The HTML Solution for this vulnerability.
-
#title ⇒ Object
readonly
The title of this vulnerability.
Instance Method Summary collapse
-
#initialize(connection, id) ⇒ VulnerabilityDetail
constructor
Constructor VulnerabilityListing(connection,id).
Constructor Details
#initialize(connection, id) ⇒ VulnerabilityDetail
Constructor VulnerabilityListing(connection,id)
1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 |
# File 'lib/nexpose.rb', line 1815 def initialize(connection, id) @error = false @connection = connection @id = id @references = [] r = @connection.execute('<VulnerabilityDetailsRequest session-id="' + @connection.session_id + '" vuln-id="' + @id + '"/>') if (r.success) r.res.elements.each('VulnerabilityDetailsResponse/Vulnerability') do |v| @id = v.attributes['id'] @title = v.attributes["title"] @severity = v.attributes["severity"] @pciSeverity = v.attributes['pciSeverity'] @cvssScore = v.attributes['cvssScore'] @cvssVector = v.attributes['cvssVector'] @published = v.attributes['published'] @added = v.attributes['added'] @modified = v.attributes['modified'] v.elements.each('description') do |d| @description = d.to_s.gsub(/\<\/?description\>/i, '') end v.elements.each('solution') do |s| @solution = s.to_s.gsub(/\<\/?solution\>/i, '') end v.elements.each('references/reference') do |r| @references.push(Reference.new(r.attributes['source'],r.text)) end end else @error = true @error_msg = 'VulnerabilitySummaryRequest Parse Error' end end |
Instance Attribute Details
#added ⇒ Object (readonly)
The date this vulnerability was added to NeXpose
1802 1803 1804 |
# File 'lib/nexpose.rb', line 1802 def added @added end |
#connection ⇒ Object (readonly)
The NSC Connection associated with this object
1786 1787 1788 |
# File 'lib/nexpose.rb', line 1786 def connection @connection end |
#cvssScore ⇒ Object (readonly)
The CVSS score of this vulnerability
1796 1797 1798 |
# File 'lib/nexpose.rb', line 1796 def cvssScore @cvssScore end |
#cvssVector ⇒ Object (readonly)
The CVSS vector of this vulnerability
1798 1799 1800 |
# File 'lib/nexpose.rb', line 1798 def cvssVector @cvssVector end |
#description ⇒ Object (readonly)
The HTML Description of this vulnerability
1806 1807 1808 |
# File 'lib/nexpose.rb', line 1806 def description @description end |
#error ⇒ Object (readonly)
true if an error condition exists; false otherwise
1778 1779 1780 |
# File 'lib/nexpose.rb', line 1778 def error @error end |
#error_msg ⇒ Object (readonly)
Error message string
1780 1781 1782 |
# File 'lib/nexpose.rb', line 1780 def error_msg @error_msg end |
#id ⇒ Object (readonly)
The unique ID string for this vulnerability
1788 1789 1790 |
# File 'lib/nexpose.rb', line 1788 def id @id end |
#modified ⇒ Object (readonly)
The last date this vulnerability was modified
1804 1805 1806 |
# File 'lib/nexpose.rb', line 1804 def modified @modified end |
#pciSeverity ⇒ Object (readonly)
The pciSeverity of this vulnerability
1794 1795 1796 |
# File 'lib/nexpose.rb', line 1794 def pciSeverity @pciSeverity end |
#published ⇒ Object (readonly)
The date this vulnerability was published
1800 1801 1802 |
# File 'lib/nexpose.rb', line 1800 def published @published end |
#references ⇒ Object (readonly)
External References for this vulnerability Array containing (Reference)
1809 1810 1811 |
# File 'lib/nexpose.rb', line 1809 def references @references end |
#request_xml ⇒ Object (readonly)
The last XML request sent by this object
1782 1783 1784 |
# File 'lib/nexpose.rb', line 1782 def request_xml @request_xml end |
#response_xml ⇒ Object (readonly)
The last XML response received by this object
1784 1785 1786 |
# File 'lib/nexpose.rb', line 1784 def response_xml @response_xml end |
#severity ⇒ Object (readonly)
The severity of this vulnerability (1 – 10)
1792 1793 1794 |
# File 'lib/nexpose.rb', line 1792 def severity @severity end |
#solution ⇒ Object (readonly)
The HTML Solution for this vulnerability
1811 1812 1813 |
# File 'lib/nexpose.rb', line 1811 def solution @solution end |
#title ⇒ Object (readonly)
The title of this vulnerability
1790 1791 1792 |
# File 'lib/nexpose.rb', line 1790 def title @title end |