Class: CMSScanner::Vulnerability

Inherits:
Object
  • Object
show all
Includes:
References
Defined in:
lib/cms_scanner/vulnerability.rb

Overview

Generic Vulnerability

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from References

#cve_url, #cve_urls, #cves, #exploitdb_ids, #exploitdb_url, #exploitdb_urls, #msf_modules, #msf_url, #msf_urls, #osvdb_ids, #osvdb_url, #osvdb_urls, #packetstorm_ids, #packetstorm_url, #packetstorm_urls, #references, #references=, #references_urls, #secunia_ids, #secunia_url, #secunia_urls, #securityfocus_ids, #securityfocus_url, #securityfocus_urls, #urls

Constructor Details

#initialize(title, references = {}, type = nil, fixed_in = nil) ⇒ Vulnerability

Returns a new instance of Vulnerability.

Parameters:

  • title (String)
  • references (Hash) (defaults to: {})
  • type (String) (defaults to: nil)
  • fixed_in (String) (defaults to: nil)

Options Hash (references):

  • cve (Array<String>, String)
  • secunia (Array<String>, String)
  • osvdb (Array<String>, String)
  • exploitdb (Array<String>, String)
  • url (Array<String>)

    URL(s) to related advisories etc

  • metasploit (Array<String>, String)

    The related metasploit module(s)



18
19
20
21
22
23
24
# File 'lib/cms_scanner/vulnerability.rb', line 18

def initialize(title, references = {}, type = nil, fixed_in = nil)
  @title    = title
  @type     = type
  @fixed_in = fixed_in

  self.references = references
end

Instance Attribute Details

#fixed_inObject (readonly)

Returns the value of attribute fixed_in.



6
7
8
# File 'lib/cms_scanner/vulnerability.rb', line 6

def fixed_in
  @fixed_in
end

#titleObject (readonly)

Returns the value of attribute title.



6
7
8
# File 'lib/cms_scanner/vulnerability.rb', line 6

def title
  @title
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/cms_scanner/vulnerability.rb', line 6

def type
  @type
end

Instance Method Details

#==(other) ⇒ Boolean

param [ Vulnerability ] other

Returns:

  • (Boolean)


29
30
31
32
33
34
# File 'lib/cms_scanner/vulnerability.rb', line 29

def ==(other)
  title == other.title &&
    type == other.type &&
    references == other.references &&
    fixed_in == other.fixed_in
end